/* Theme variables */
.dark-mode {
    color-scheme: dark;
    --text-primary: rgba(255, 255, 245, .86);
    --text-secondary: rgba(255, 255, 245, .6);
    --text-tertiary: rgba(255, 255, 245, .38);
    --text-disabled: rgba(255, 255, 245, .25);
    --text-ghost: rgba(255, 255, 245, .25);
    --accent-color: #e36002;
    --bg-primary: #1e1e20;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #505053;
    --bg-overlay: rgba(255, 255, 255, 0.06);
    --bg-accent: #e360021f;
    --border-color: rgba(255, 255, 255, 0.1);
    --scrollbar-color: rgba(255, 255, 255, 0.24);
    --scrollbar-color-active: rgba(255, 255, 255, 0.48);
    --lifted-brightness: 1.45;
    --backdrop-brightness: 0.5;
    --shadow-small: 0 1px 3px 0 rgb(0, 0, 0, 0.1);
    --shadow-large: rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, 0.1);
    --button-bg: #f6f6f6;
    --button-text: #000;
    --button-hover: #e7e7e7;
    --color-success: #3dd68c;
    --color-error: #f66f81;
    --color-warning: #f9b44e;
    --color-info: #5c73e7;
    --color-orange: #ff8d4d;
    --color-purple: #b191f9;
}

.light-mode {
    --color-success: #069061;
    --color-error: #ef0006;
    --color-warning: #edbe20;
    --color-info: #0082d0;
    --color-orange: #ff5800;
    --color-purple: #5203d1;
    --link-color: var(--text-primary);
    --link-color-hover: var(--link-color);
    --button-bg: rgba(0, 0, 0, 1);
    --button-hover: rgba(0, 0, 0, 0.8);
    --button-text: rgba(255, 255, 255, 0.9);
    --tooltip-background: color-mix(in srgb, #1a1a1a, transparent 10%);
    --tooltip-color: color-mix(in srgb, #fff, transparent 15%);
    --color-alert: color-mix(in srgb, var(--color-orange), var(--text-primary) 20%);
    --color-danger: color-mix(in srgb, var(--color-error), var(--text-primary) 20%);
    --bg-alert: color-mix(in srgb, var(--color-orange), var(--bg-primary) 95%);
    --bg-danger: color-mix(in srgb, var(--color-error), var(--bg-primary) 95%);
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
}


#heading {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    animation: gradientShift 4s ease infinite;
    color: var(--color-orange);
}

#message {
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-large);
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

#message.link {
    text-decoration: none;
    color: inherit;
    line-height: 1;
}

#message.link:hover {
    background: var(--bg-accent);
    border-color: var(--accent-color);
}

/* Login page specific styles */
.login-page #message {
    border-radius: 20px;
    background: var(--bg-overlay);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-large);
    animation: loginPulseGlow 2s ease-in-out infinite alternate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    width: 90%;
}

#throbber {
    width: 40px;
    height: 40px;
    border: 3px solid var(--scrollbar-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes pulseGlow {
    from {
        box-shadow: var(--shadow-large), 0 0 20px color-mix(in srgb, var(--accent-color), transparent 80%);
    }
    to {
        box-shadow: var(--shadow-large), 0 0 30px color-mix(in srgb, var(--accent-color), transparent 50%), 0 0 40px color-mix(in srgb, var(--accent-color), transparent 70%);
    }
}

@keyframes loginPulseGlow {
    from {
        box-shadow: 0 12px 40px color-mix(in srgb, #000000, transparent 60%), 0 0 20px color-mix(in srgb, var(--accent-color), transparent 90%), 0 0 30px color-mix(in srgb, var(--accent-color), transparent 80%);
    }
    to {
        box-shadow: 0 12px 40px color-mix(in srgb, #000000, transparent 60%), 0 0 30px color-mix(in srgb, var(--accent-color), transparent 70%), 0 0 50px color-mix(in srgb, var(--accent-color), transparent 60%);
    }
}

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

@media (max-width: 768px) {
    #heading-link {
        text-decoration: none;
        display: block;
        text-align: center;
    }
    #heading {
        font-size: 2rem;
    }
    #message {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    .login-page #message {
        gap: 0.8rem;
    }
    #throbber {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }
}
