/* Color Scheme from Logo */
:root {
    --primary-blue: #003d82;
    --secondary-blue: #a8c5d9;
    --light-blue: #e8f1f7;
    --accent-blue: #0066cc;
    --dark-text: #1a1a1a;
    --light-text: #666;
    --white: #ffffff;
    --grey-bg: #f5f7fa;
    --border-color: #e0e6ed;
    --success-green: #10b981;
    --shadow: 0 2px 8px rgba(0, 61, 130, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 61, 130, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
    min-height: 100vh;
    color: var(--dark-text);
    line-height: 1.6;
    position: relative;
}


/* Navigation Bar */
.nav {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
    border-radius: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo img {
    height: 50px;
    width: auto;
    background-color: white;
    padding: 5px;
    border-radius: 4px;
}

.nav-logo h2 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;  /* Remove default margins for proper alignment */
}

.nav-logo h2 a {
    color: var(--primary-blue) !important;
    text-decoration: none !important;
    transition: color 0.3s;
}

.nav-logo h2 a:visited {
    color: var(--primary-blue) !important;
}

.nav-logo h2 a:hover {
    color: var(--accent-blue) !important;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
    padding: 8px 0;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-user {
    color: var(--light-text);
    font-weight: 500;
    padding: 8px 0;
}

.nav-links button {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
    transition: color 0.3s;
    height: auto;
    line-height: 1.5;
    vertical-align: baseline;
}

.nav-links button:hover {
    color: var(--accent-blue);
    text-decoration: none;
    background: none;
    transform: none;
    box-shadow: none;
}

.nav-links form {
    display: inline-block;
    margin: 0;
    padding: 0;
}

/* Language Switcher */
.language-switcher {
    display: inline-block;
    margin: 0;
}

.language-select {
    background: var(--white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    height: auto;
    line-height: normal;
    vertical-align: middle;
}

.language-select:hover {
    background: var(--light-blue);
}

.language-select option {
    padding: 5px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Typography */
h1 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--light-text);
    font-size: 1.05rem;
    margin: 0.75rem 0;
}

/* Buttons */
button, .btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 12px 28px;
    border: none;
    border-radius: 0;  /* Changed from 8px to 0 for sharp edges */
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-transform: uppercase;  /* Make it more modern */
    letter-spacing: 1px;  /* Add spacing between letters */
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 61, 130, 0.3);  /* Stronger hover shadow */
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--light-blue) 100%);
    color: var(--primary-blue);
}

/* Race Grid */
.race-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.race-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.race-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
}

.race-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-blue);
}

.race-card.voted {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: var(--success-green);
}

.race-card.voted::before {
    background: var(--success-green);
}

.race-card h3 {
    margin-top: 10px;
    margin-bottom: 15px;
    color: var(--primary-blue);
    font-size: 1.4rem;
}

.race-date {
    font-weight: 600;
    color: var(--primary-blue);
    margin: 12px 0;
    font-size: 1rem;
}

.race-location {
    color: var(--light-text);
    margin: 8px 0;
    font-size: 0.95rem;
}

.race-description {
    color: var(--light-text);
    font-size: 0.95rem;
    margin: 12px 0;
    line-height: 1.5;
}

.voted-badge {
    background: var(--success-green);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Vote Form */
.vote-pair {
    margin: 30px 0;
    padding: 25px;
    background: var(--grey-bg);
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
}

.vote-pair h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.vote-pair label {
    display: block;
    padding: 15px 20px;
    margin: 12px 0;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1.05rem;
}

.vote-pair label:hover {
    border-color: var(--accent-blue);
    background: var(--light-blue);
    transform: translateX(5px);
}

.vote-pair input[type="radio"]:checked + label,
.vote-pair label:has(input[type="radio"]:checked) {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    font-weight: 600;
}

.vote-pair input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-blue);
}

/* Vote History */
.vote-history {
    background: var(--grey-bg);
    border-left: 5px solid var(--primary-blue);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.vote-history h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.vote-results {
    margin-top: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
}

.vote-results ul {
    list-style: none;
    padding-left: 0;
}

.vote-results li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-results li:last-child {
    border-bottom: none;
}

.vote-results li strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Forms */
form {
    margin-top: 25px;
}

form p {
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-weight: 600;
}

form input[type="email"],
form input[type="password"],
form input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

form input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.errorlist {
    background: #fee;
    border-left: 4px solid #c33;
    padding: 12px;
    margin: 10px 0;
    border-radius: 4px;
    color: #c33;
    list-style: none;
}

.helptext {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-top: 5px;
    display: block;
}

/* Home Page Hero */
.hero {
    text-align: center;
    padding: 40px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
    }
    
    .container {
        margin: 1.5rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .race-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
}


/* Authentication Pages Styling */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 550px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 247, 0.95) 100%);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.25), 0 0 100px rgba(0, 102, 204, 0.15);  /* Enhanced shadow */
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.logo-watermark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-content {
    position: relative;
    z-index: 1;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.auth-card > div > p:first-of-type {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.auth-card form {
    margin-top: 0;
}

.auth-card button[type="submit"] {
    width: 70%;  /* Narrower than password field */
    margin: 30px auto 0;  /* Center it */
    padding: 18px;
    font-size: 1rem;
    border-radius: 0;
    font-weight: 700;
    display: block;  /* Make margin auto work */
    
    /* Glass effect */
    background: linear-gradient(135deg, 
        rgba(0, 61, 130, 0.7) 0%, 
        rgba(0, 102, 204, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 61, 130, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Glass reflection effect */
.auth-card button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

/* Shine animation on hover */
.auth-card button[type="submit"]:hover::before {
    left: 100%;
}

.auth-card button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 61, 130, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.auth-card button[type="submit"]:active {
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive for auth pages */
@media (max-width: 768px) {
    .auth-card {
        padding: 40px 25px;
    }
    
    .logo-watermark {
        width: 300px;
        height: 300px;
        opacity: 0.05;
    }
}

/* Winter Theme - Snowfall Effect */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.2em;  /* Increased from 1.5em */
    font-family: Arial, sans-serif;
    text-shadow: 0 0 8px rgba(168, 197, 217, 0.9);
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.8;
    }
}

/* Different snowflake animations for variety - FASTER */
.snowflake:nth-child(1) { animation-duration: 6s; }  /* Was 10s */
.snowflake:nth-child(2) { animation-duration: 7s; font-size: 2.5em; }  /* Was 12s */
.snowflake:nth-child(3) { animation-duration: 8s; font-size: 1.8em; }  /* Was 15s */
.snowflake:nth-child(4) { animation-duration: 6.5s; }  /* Was 11s */
.snowflake:nth-child(5) { animation-duration: 7.5s; font-size: 2.8em; }  /* Was 14s */
.snowflake:nth-child(6) { animation-duration: 7s; }  /* Was 13s */
.snowflake:nth-child(7) { animation-duration: 8.5s; font-size: 2em; }  /* Was 16s */
.snowflake:nth-child(8) { animation-duration: 7s; }  /* Was 12s */
.snowflake:nth-child(9) { animation-duration: 7.5s; font-size: 2.4em; }  /* Was 14s */
.snowflake:nth-child(10) { animation-duration: 6.5s; }  /* Was 11s */
.snowflake:nth-child(11) { animation-duration: 8s; font-size: 1.9em; }  /* Was 15s */
.snowflake:nth-child(12) { animation-duration: 7s; }  /* Was 13s */
.snowflake:nth-child(13) { animation-duration: 7s; font-size: 3em; }  /* Was 12s */
.snowflake:nth-child(14) { animation-duration: 7.5s; }  /* Was 14s */
.snowflake:nth-child(15) { animation-duration: 8.5s; font-size: 2.1em; }  /* Was 16s */
.snowflake:nth-child(16) { animation-duration: 6.5s; }  /* Was 11s */
.snowflake:nth-child(17) { animation-duration: 7s; font-size: 2.6em; }  /* Was 13s */
.snowflake:nth-child(18) { animation-duration: 8s; }  /* Was 15s */

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


/* Custom Validation Modal */
.validation-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 61, 130, 0.4);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.validation-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 241, 247, 0.98) 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.validation-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.9;
}

.validation-content h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.validation-content p {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.validation-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.validation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 61, 130, 0.3);
}


/* Home Page Styling */
.home-hero {
    margin: 0;
    padding: 0;
}

.hero-banner {
    position: relative;
    height: 320px;  /* Reduced from 500px */
    background: linear-gradient(135deg, 
        rgba(0, 61, 130, 0.9) 0%, 
        rgba(0, 102, 204, 0.8) 50%,
        rgba(168, 197, 217, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* DEEPLY RECESSED - Much stronger inset shadows */
    box-shadow: 
        inset 0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 -10px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 100px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(0, 61, 130, 0.2);
}

/* Integrated Navigation in Banner */
.hero-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
}

/* Fix alignment for hero nav logo link */
.hero-nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-nav-logo span a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.hero-nav-logo span a:hover {
    opacity: 0.8;
}

.hero-nav-logo span {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-nav-logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-nav-logo span a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.hero-nav-logo img {
    background-color: white;
    padding: 0px;
    border-radius: 4px;
}


.hero-nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hero-nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    padding: 0;
}
.hero-nav-links a:hover {
    color: var(--light-blue);
    transform: translateY(-2px);
}

.hero-nav-links button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 20px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    margin: 0;
    height: auto;
    line-height: normal;
    vertical-align: middle;
}

.hero-nav-links form {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.hero-nav-links button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: none;
}

.logo-watermark-hero {
    position: absolute;
    width: 450px;  /* Reduced from 600px */
    height: 450px;  /* Reduced from 600px */
    opacity: 0.12;
    pointer-events: none;
}

.logo-watermark-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-logo {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 50px;
}

.fantabiathlon-logo {
    font-size: 4rem;  /* Reduced from 5rem */
    font-weight: 900;
    color: white;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0 40px 18px 40px;
    text-shadow: 
        3px 3px 0 rgba(0, 61, 130, 0.5),
        6px 6px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    display: inline-block;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
}

/* New York Giants style underline */
.fantabiathlon-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;  /* Reduced from 12px */
    background: white;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.home-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem 2rem;  /* Changed from transform to padding */
    position: relative;
    z-index: 10;
}

/* Logged In User Styles */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 61, 130, 0.15);
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 61, 130, 0.1);
    border: 2px solid transparent;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 61, 130, 0.2);
    border-color: var(--accent-blue);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-blue);
}

.info-card p {
    font-size: 1rem;
    color: var(--light-text);
    margin: 0;
}

/* Landing Page Styles (Logged Out) */
.landing-content {
    max-width: 900px;
    margin: 0 auto;
}

.landing-hero {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 247, 0.95) 100%);
    padding: 4rem 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.25), 0 0 100px rgba(0, 102, 204, 0.15);
    backdrop-filter: blur(10px);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

/* Add watermark to landing hero */
.landing-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background-image: url('../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.landing-hero h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 1.3rem;
    color: var(--light-text);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    
    /* Glass effect like register button */
    background: linear-gradient(135deg, 
        rgba(0, 61, 130, 0.7) 0%, 
        rgba(0, 102, 204, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 61, 130, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

/* Glass reflection effect */
.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

/* Shine animation on hover */
.btn-large:hover::before {
    left: 100%;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 61, 130, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary.btn-large {
    background: linear-gradient(135deg, 
        rgba(168, 197, 217, 0.6) 0%, 
        rgba(232, 241, 247, 0.5) 100%);
    color: var(--primary-blue);
    border: 2px solid rgba(0, 61, 130, 0.3);
}

.btn-secondary.btn-large:hover {
    border-color: rgba(0, 61, 130, 0.5);
}

.features-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 247, 0.95) 100%);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.25), 0 0 100px rgba(0, 102, 204, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Add watermark to features section */
.features-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background-image: url('../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
}

.features-section > * {
    position: relative;
    z-index: 1;
}

.features-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--primary-blue);
}

.feature-list {
    display: grid;
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 61, 130, 0.1);
}

.feature-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 61, 130, 0.3);
    box-shadow: 0 5px 20px rgba(0, 61, 130, 0.15);
}

.feature-emoji {
    font-size: 3rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.feature-item p {
    font-size: 1rem;
    color: var(--light-text);
    margin: 0;
}

/* Logged In User Styles */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 247, 0.95) 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.25), 0 0 100px rgba(0, 102, 204, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Add watermark to welcome section */
.welcome-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background-image: url('../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
}

.welcome-section > * {
    position: relative;
    z-index: 1;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.welcome-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Make dashboard buttons glass effect too */
.welcome-section .btn,
.welcome-section .btn-secondary {
    width: auto;
    min-width: 250px;
    
    /* Glass effect */
    background: linear-gradient(135deg, 
        rgba(0, 61, 130, 0.7) 0%, 
        rgba(0, 102, 204, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 61, 130, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.welcome-section .btn::before,
.welcome-section .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.welcome-section .btn:hover::before,
.welcome-section .btn-secondary:hover::before {
    left: 100%;
}

.welcome-section .btn:hover,
.welcome-section .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 61, 130, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.welcome-section .btn-secondary {
    background: linear-gradient(135deg, 
        rgba(168, 197, 217, 0.6) 0%, 
        rgba(232, 241, 247, 0.5) 100%);
    color: var(--primary-blue);
    border: 2px solid rgba(0, 61, 130, 0.3);
}

.welcome-section .btn-secondary:hover {
    border-color: rgba(0, 61, 130, 0.5);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 241, 247, 0.95) 100%);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 61, 130, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Add subtle watermark to each card */
.info-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background-image: url('../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
}

.info-card > * {
    position: relative;
    z-index: 1;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 61, 130, 0.25);
    border-color: var(--accent-blue);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-blue);
}

.info-card p {
    font-size: 1rem;
    color: var(--light-text);
    margin: 0;
}


/* Stage Section Styling */
.stage-section {
    margin-bottom: 2rem;
}

.stage-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 61, 130, 0.2);
}

.stage-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 61, 130, 0.3);
}

.stage-header.active {
    border-radius: 16px 16px 0 0;
}

.stage-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-header h2 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.stage-info {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

.stage-description {
    color: rgba(255, 255, 255, 0.9);
    margin: 1rem 0 0 0;
    font-size: 1rem;
}

.stage-toggle {
    margin-left: 20px;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
    display: inline-block;
}

.stage-races {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 241, 247, 0.98) 100%);
    padding: 0 2rem;
    border-radius: 0 0 16px 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.5s ease;
    box-shadow: inset 0 5px 15px rgba(0, 61, 130, 0.1);
    border: 2px solid rgba(0, 61, 130, 0.15);
    border-top: none;
}

.stage-races.open {
    max-height: 3000px;
    opacity: 1;
    padding: 2rem;
    box-shadow: 
        inset 0 5px 15px rgba(0, 61, 130, 0.1),
        0 10px 30px rgba(0, 61, 130, 0.15);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stage-header {
        padding: 1.5rem;
    }
    
    .stage-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stage-toggle {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .stage-header h2 {
        font-size: 1.5rem;
    }
}

/* Language Switcher */
.language-switcher {
    display: inline-block;
    margin-left: 10px;
}

.language-select {
    background: var(--white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.language-select:hover {
    background: var(--light-blue);
}

.language-select option {
    padding: 5px;
}



/* Leaderboard Styling */
.leaderboard-table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 61, 130, 0.15);
    overflow-x: auto;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
}

.leaderboard-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Align headers with their columns */
.leaderboard-table th:nth-child(1) {
    text-align: center;
    width: 80px;
}

.leaderboard-table th:nth-child(2) {
    text-align: left;
}

.leaderboard-table th:nth-child(3) {
    text-align: left;
}

.leaderboard-table th:nth-child(4) {
    text-align: left;
}

.leaderboard-table th:nth-child(5) {
    text-align: left;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.leaderboard-table tbody tr:hover {
    background-color: var(--light-blue);
}

.leaderboard-table tbody tr.current-user {
    background-color: #fff3cd;
    font-weight: 600;
}

.leaderboard-table tbody tr.current-user:hover {
    background-color: #ffe69c;
}

.leaderboard-table td {
    padding: 1rem;
}

.leaderboard-table .rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    width: 80px;
}

.leaderboard-table .username {
    font-weight: 600;
    color: var(--dark-text);
}

.leaderboard-table .score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.leaderboard-table .accuracy {
    font-weight: 600;
    color: var(--success-green);
}

.you-badge {
    background: var(--accent-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .leaderboard-table {
        padding: 1rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .leaderboard-table .rank {
        font-size: 1.2rem;
        width: 50px;
    }
    
    .leaderboard-table th:nth-child(1) {
        width: 50px;
    }
}


/* Your Position Card */
.your-position-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 193, 7, 0.15) 100%);
    border: 3px solid #ffc107;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.3);
}

.your-position-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.position-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 1rem;
}

.position-rank {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-blue);
}

.position-stats {
    text-align: left;
}

.position-stats p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-info {
    padding: 10px 20px;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .position-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .position-stats {
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
    }
}

/* My Votes Page Styling */
.vote-section {
    margin-bottom: 2rem;
}

.vote-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.vote-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 61, 130, 0.3);
}

.vote-header.active {
    border-radius: 16px 16px 0 0;
}

.vote-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vote-header h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.vote-meta {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    margin: 0;
}

.vote-toggle {
    margin-left: 20px;
}

.vote-details {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 241, 247, 0.98) 100%);
    padding: 0;
    border-radius: 0 0 16px 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.5s ease;
    box-shadow: inset 0 5px 15px rgba(0, 61, 130, 0.1);
    border: 2px solid rgba(0, 61, 130, 0.15);
    border-top: none;
}

.vote-details.open {
    max-height: 1000px;
    opacity: 1;
    padding: 2rem;
    box-shadow: 
        inset 0 5px 15px rgba(0, 61, 130, 0.1),
        0 10px 30px rgba(0, 61, 130, 0.15);
}

/* Vote Table */
.vote-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.1);
}

.vote-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
}

.vote-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
}

.vote-table th:first-child {
    width: 100px;
    text-align: center;
}

.vote-table th:last-child {
    width: 200px;
}

.vote-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.vote-table tbody tr:last-child {
    border-bottom: none;
}

.vote-table tbody tr:hover {
    background-color: var(--light-blue);
}

.vote-table tbody tr.correct {
    background-color: rgba(16, 185, 129, 0.1);
}

.vote-table tbody tr.incorrect {
    background-color: rgba(239, 68, 68, 0.05);
}

.vote-table td {
    padding: 1rem;
}

.vote-table .matchup-number {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-blue);
}

.vote-table .choice {
    font-weight: 600;
    color: var(--dark-text);
}

.vote-table .result {
    text-align: left;
}

/* Result Badges */
.correct-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.incorrect-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pending-badge {
    display: inline-block;
    background: #6b7280;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .vote-header {
        padding: 1rem;
    }
    
    .vote-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .vote-toggle {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .vote-header h3 {
        font-size: 1.1rem;
    }
    
    .vote-table {
        font-size: 0.9rem;
    }
    
    .vote-table th,
    .vote-table td {
        padding: 0.5rem;
    }
    
    .vote-table th:first-child {
        width: 50px;
    }
    
    .vote-table th:last-child {
        width: auto;
    }
    
    .correct-badge,
    .incorrect-badge,
    .pending-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}


/* Stage Section Styling */
.stage-section {
    margin-bottom: 2rem;
}

.stage-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 61, 130, 0.2);
}

.stage-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 61, 130, 0.3);
}

.stage-header.active {
    border-radius: 16px 16px 0 0;
}



/* Enhance text readability */
.stage-header h2,
.stage-header .stage-info,
.stage-header .stage-description {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7), 
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.stage-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 61, 130, 0.3);
}

.stage-header.active {
    border-radius: 16px 16px 0 0;
}

.stage-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.stage-header h2 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.stage-info {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

.stage-description {
    color: rgba(255, 255, 255, 0.9);
    margin: 1rem 0 0 0;
    font-size: 1rem;
}

.stage-toggle {
    margin-left: 20px;
    position: relative;
    z-index: 1;
}

.toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.4s ease;
    display: inline-block;
}

/* ============================================
   MOBILE MENU TOGGLE BUTTON
   ============================================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Navigation */
    .nav {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .nav-logo {
        flex: 1;
    }
    
    .nav-logo img {
        height: 35px;
    }
    
    .nav-logo h2 {
        font-size: 1.2rem;
    }
    
    /* Hide nav links by default on mobile */
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: var(--primary-blue);
        padding: 1rem;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        gap: 0;
    }
    
    /* Show nav links when active */
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a,
    .nav-links button,
    .nav-links .nav-user,
    .nav-links form {
        width: 100%;
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0;
    }
    
    .nav-links button {
        background: transparent;
        border: none;
        color: white;
        font-size: 1rem;
        cursor: pointer;
    }
    
    .nav-user {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.8);
        padding: 0.75rem 1rem;
    }
    
    .language-switcher {
        padding: 1rem !important;
        border-bottom: none;
    }
    
    .language-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Container */
    .container {
        padding: 1rem;
    }
    
    /* Home page hero */
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Stage cards */
    .stage-header {
        padding: 1.5rem 1rem;
    }
    
    .stage-header h2 {
        font-size: 1.5rem;
    }
    
    .stage-info {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Race grid */
    .race-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .race-card {
        padding: 1.5rem;
    }
    
    .race-card h3 {
        font-size: 1.25rem;
    }
    
    /* Vote form */
    .vote-pair {
        padding: 1rem;
    }
    
    .vote-pair h3 {
        font-size: 1.1rem;
    }
    
    .vote-pair label {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Leaderboard */
    .leaderboard-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .leaderboard-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .nav-logo h2 {
        font-size: 1rem;
    }
    
    .nav-logo img {
        height: 30px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .stage-header h2 {
        font-size: 1.25rem;
    }
    
    .race-card h3 {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .leaderboard-table {
        font-size: 0.8rem;
    }
}


/* ===== MOBILE SIDEBAR (All Pages) ===== */

/* Hamburger Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--primary-blue);  /* Changed from white */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary-blue);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header img {
    height: 40px;
}

.sidebar-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-links {
    padding: 1rem 0;
}

.sidebar-links a,
.sidebar-links button {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.sidebar-links a:hover,
.sidebar-links button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-links form {
    margin: 0;
}

.sidebar-language {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-language select {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-language select option {
    background: var(--primary-blue);
    color: white;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Show hamburger button */
    .mobile-menu-btn {
        display: flex;
        order: 3;  /* Put it last, on the right */
    }

    /* Hide old mobile toggle if it exists */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* Hide desktop nav links on mobile */
    .nav-links {
        display: none !important;
    }

    /* Adjust nav layout for mobile */
    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-logo {
        order: 1;  /* Logo on left */
    }
}

@media (max-width: 480px) {
    .mobile-sidebar {
        width: 250px;
    }
}

/* Mobile nav layout fix */
@media (max-width: 768px) {
    .nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 1rem !important;
    }
    
    .nav-logo {
        order: 1;
    }
    
    .mobile-menu-btn {
        order: 2;
        margin-left: auto;
    }
}