.index-page {
    background: linear-gradient(135deg, #2e3048, #5a6987);
    background-size: cover;
    font-family: Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
}

.home-page {
    background: linear-gradient(135deg, #004e92, #000428, #40E0D0);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    font-family: Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
}

p {
    font-family: Verdana, sans-serif;
    font-size: 12px;
    margin-top: 0px;
    color: white;
    font-weight: normal;
}

h1, h2, h3 {
    font-weight: bold;
    color: white;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.main-container-index {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 75%;
    max-width: 1000px;
}

.player-controls-container {
    width: 100%; 
    margin-left: auto;
    margin-right: auto;
}

.main-container-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-button {
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #0087a2;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-block;
    margin-bottom: 15px;
}

.auth-button:hover {
    background: #00B4D8;
}

.auth-button-container {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    width: 50%
}

.empty-line-container {
    justify-content: center;
    border-radius: 5px;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.thin-line {
    width: 75%;
    max-width: 1000px;
    height: 1px;
    background: white;
    margin: 0 auto 0px auto;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    gap: 10px;
    padding: 0 0;
}

.footer-logo {
    height: 40px;
}

.left{
    margin: auto;
}

.right{
    margin: auto;
}

.intro-container {
    border-radius: 5px;
    text-align: left;
    line-height: 115%;
    padding: 32px;
    background-color: #000428;
    margin-bottom: 10px;
}

.logout-button {
    display: flex;
    line-height: 1;
    align-items: center;
    margin-left: auto;
}

.logout-button a {
    color: #00B4D8;
    text-decoration: none;
    font-size: 14px; 
    line-height: 1; 
    transition: color 0.3s ease;
}

.logout-button a:hover {
    color: #5a6987;
}

.p-name {
    font-family: Verdana, sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.p-name-skeleton {
    height: 1em;
    width: 4em;
    animation: skeleton-loading 0.5s ease-in-out infinite alternate;
    border-radius: 2px;
}

.track-controls {
    display: flex;
    border-radius: 5px;
    align-items: center;
    justify-content: center;
    height: 64px;
    width: 100%;
    margin-bottom: 10px;
    background-color: #000428;
    margin-left: auto;
    margin-right: auto;
}

.track-button{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-width: 0px;
    margin-left: 16px;
    margin-right: 16px;
    transition: opacity 0.3s ease;
}

.track-button:hover {
    opacity: 30%;
}

.track-button-skeleton {
    animation: skeleton-loading 0.5s ease-in-out infinite alternate;
}

.player-container {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1000px;
}

.version-container {
    border-radius: 5px;
    align-items: center;
    padding: 32px;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    background-color: #000428;
    margin-left: auto;
    margin-right: auto;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.version-container.selected {
    background-color: #00B4D8;
}

.version-container.playing {
    animation: pulse 0.5s ease-in-out infinte alternate;
}

.version-name {
    font-weight: bold;
    text-align: center;
    line-height: 64px;
    font-size: 64px;
}

.version-button {
    font-size: 18px;
    border-radius:5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000428;
    transition: background 0.3s ease;
    border: 1px solid #E7E7E7;
    margin-bottom: 16px;
    width: 100%;
    height: 32px;
    color: #E7E7E7;
    max-width: 100px;
}

.version-button:last-child {
    margin-bottom: 0px;
}

.version-button:hover {
    background-color: #00B4D8;
}

.same {
    width: auto;
}

.audio-loaded {
    animation: main-fade-in 0.5s ease-in-out 1;
}

.playing{
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes skeleton-loading {
0% {
    background-color: hsl(0, 0%, 95%);
}

100% {
    background-color: hsl(0, 0%, 85%);
}
}

@keyframes main-fade-in {
0% {
    opacity: 0;
}

100% {
    opacity: 100;
}
}

@keyframes pulse {
    0% { background-color: #0087a2; opacity: 0.8; }
    100% { background-color: #00B4D8; opacity: 1; }
}

.loading-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.spinner {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #000428;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Consent page specific */


.consent-page {
    background: linear-gradient(135deg, #2e3048, #5a6987);
    background-size: cover;
    font-family: Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
}

.main-container-consent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 75%;
    max-width: 1000px;
}

.consent-container {
    border-radius: 5px;
    text-align: left;
    line-height: 115%;
    padding: 32px;
    background-color: #000428;
    margin-bottom: 10px;
}

.consent-footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 300px; 
    width: 75%;
    margin: 0 auto; 
}

.consent-footer-bg {
    justify-content: center;
    border-radius: 5px;
    align-items: center;
    line-height: 115%;
    background-color: #000428;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 32px;
    border-radius: 5px;
}

#consent-form label {
    font-family: Verdana, sans-serif;
    font-size: 12px;
    margin-top: 0px;
    color: white;
    font-weight: normal;
  }

.consent-page a {
    color: #00B4D8;
    font-family: Verdana, sans-serif;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
}

.consent-page a:hover {
    color: #5a6987;
}

.submit-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: auto; /* pushes it down */
}

#submit-button {
    font-size: 12px;
    color: white;
    background: #0087a2;
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-block;
    margin-bottom: 0px;
}

#submit-button:hover {
    background: #00B4D8;
}

#submit-button:disabled {
    background-color: #888;
}

.consent-page label {
    display: block;
    padding-left: 24px;
    text-indent: -24px;
    margin-bottom: 10px;
}
.consent-page label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: top;
}
.consent-page input[type="checkbox"] {
    vertical-align: text-top;
}

/* For calibration page button */

.calibration-button-container {
    width: 100%;
    margin-top: auto;
}

#calibration-button {
    width: 100%;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #0087a2;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-block;
    margin-bottom: 15px;
}

#calibration-button:hover {
    background: #00B4D8;
}

#calibration-button:disabled {
    background-color: #888;
}

/* For forcing logout right in complete page */
.complete-logout-button {
    line-height: 1;
    align-items: center;
}

.complete-logout-button a {
    color: #00B4D8;
    text-decoration: none;
    font-size: 14px; 
    line-height: 1; 
    transition: color 0.3s ease;
}

.complete-logout-button a:hover {
    color: #5a6987;
}


/* For training colour changes */

.version-container.correct {
    background-color: #00d97f
}

.version-container.incorrect {
    background-color: #d80053
}

/* For headphone test boxes*/
.headphone-button-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
}

.headphone-button-container {
    width: 33%;
    margin-top: auto;
}

#headphone-button {
    width: 100%;
    height: 75px;
    font-size: 30px;
    font-weight: bold;
    color: white;
    background: #0087a2;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
    display: inline-block;
    margin-bottom: 15px;
}

#headphone-button:hover {
    background: #00B4D8;
}

/* For flash popup */
.flash-popup {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000428;
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 90vw;
  }
  .flash-popup-message {
    flex: 1;
    line-height: 1.3;
  }

/* Global privacy link */
.privacy-link-container {
    position: fixed;
    bottom: 8px;
    right: 10px;
    z-index: 10000;
    opacity: 0.85;
}

.privacy-link {
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.privacy-link:hover {
    color: #00B4D8;
    opacity: 1;
}

/* Ensure privacy link is white on consent page too */
.consent-page .privacy-link {
    color: #ffffff;
}

.consent-page .privacy-link:hover {
    color: #00B4D8;
}

/* Policy/long-form content pages */
.policy-page {
    background: linear-gradient(135deg, #2e3048, #5a6987);
    background-size: cover;
    font-family: Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    text-align: left;
}

.main-container-policy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 75%;
    max-width: 1000px;
    padding-top: 24px;
}

.policy-container {
    border-radius: 5px;
    text-align: left;
    line-height: 140%;
    padding: 32px;
    background-color: #000428;
    margin-bottom: 10px;
    color: white;
}

.policy-container section {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid #ffffff33; /* lighter divider */
}

.policy-container h1,
.policy-container h2,
.policy-container h3 { color: white; }

.policy-container p,
.policy-container li,
.policy-container a { font-size: 12px; }

.policy-container ul {
    margin: 0.5em 0 0.5em 1.25em; /* indent bullets */
    padding: 0;
}

.policy-container li {
    list-style: disc;
    margin: 0.25em 0;
}

.policy-page a {
    color: #00B4D8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.policy-page a:hover {
    color: #5a6987;
}

.policy-footer-bg {
    justify-content: center;
    border-radius: 5px;
    align-items: center;
    line-height: 115%;
    background-color: #000428;
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 32px;
    border-radius: 5px;
}