:root {
    --bg-color: #0f0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #fffffe;
    --text-secondary: #a7a9be;
    --accent-color: #ff006e; /* Vibrant Pink */
    --accent-hover: #ff477e;
    
    --crous-color: #00f5d4; /* Bright Teal */
    --prison-color: #ff006e; /* Vibrant Pink */
    
    --font-display: 'Outfit', sans-serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

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

body {
    background-color: var(--bg-color);
    /* More vibrant gradient background */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 0, 110, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(131, 56, 236, 0.15), transparent 25%);
    font-family: var(--font-sans);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    z-index: 1;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to bottom, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.title-wrapper h1 {
    margin-bottom: 0;
    line-height: 1;
}

.version-ribbon {
    position: absolute;
    top: -8px;
    right: -20px;
    background: linear-gradient(45deg, #7f1d1d, #991b1b);
    color: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    font-size: 0.6rem;
    font-weight: 600;
    transform: rotate(12deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.05);
    text-shadow: none;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

.version-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
    pointer-events: none;
}

.game-page-container {
    max-width: 1600px;
}

/* Game Layout with Sidebars */
.game-layout {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(auto, 900px) minmax(250px, 1fr);
    align-items: start;
    gap: 0; /* Collé */
    width: 100%;
}

.game-main {
    grid-column: 2;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    z-index: 2; /* Ensure game is above sidebars if overlap */
}

.sidebar {
    width: 250px;
    height: 100%; /* Ensure full height for sticky */
    /* Visible by default, layout handled by grid */
}

.sidebar-left {
    grid-column: 1;
    justify-self: end;
    padding-right: 10px; /* Small visual gap */
}

.sidebar-right {
    grid-column: 3;
    justify-self: start;
    padding-left: 10px; /* Small visual gap */
}

.sidebar-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 20px;
}

/* ... (rest of sidebar styles) ... */

/* Rules List Styling */
.rules-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.rules-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.rule-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 0px; /* Align with text */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rules-list li:hover .rule-number {
    background: var(--accent-color);
    color: white;
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .game-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 100%;
        max-width: 600px; /* Prevent full width stretch on tablets */
        margin-top: 20px;
    }

    .sidebar-content {
        position: static; /* Remove sticky on mobile */
    }

    /* Reorder for Mobile: Game first, then Hints/Rules, then Leaderboard */
    .game-main { order: 1; }
    .sidebar-left { order: 2; }
    .sidebar-right { order: 3; }
}

@media (min-width: 1200px) {
    /* Desktop specific adjustments if needed */
}

/* Lives Display */
.lives-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 1.5rem;
}

.heart {
    transition: transform 0.2s ease;
}

.heart.full {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.heart.empty {
    color: rgba(255, 255, 255, 0.2);
}

.no-lives-overlay {
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
}

.lives-timer {
    font-family: monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 10px;
}

.timer-container {
    margin-top: 20px;
    text-align: center;
}

#lives-refill-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

/* Modern Card */
.game-card, .hub-card, .terms-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image Container */
.image-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    /* aspect-ratio: 4/3; Removed to fit image size */
    min-height: auto;
    background: #151515;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid var(--card-border);
}

.image-container img {
    width: 60%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.loading {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.controls.binary-choice {
    flex-direction: row;
}

.controls.binary-choice .btn {
    flex: 1;
}

/* Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

input[type="text"], input[type="email"], input[type="password"], .hextech-input {
    width: 100%;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: white;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, .hextech-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn, .hextech-btn, #submit-btn, #next-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5), 0 2px 4px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before, .hextech-btn::before, #submit-btn::before, #next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before, .hextech-btn:hover::before, #submit-btn:hover::before, #next-btn:hover::before {
    left: 100%;
}

.btn:hover, .hextech-btn:hover, #submit-btn:hover, #next-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.7), 0 4px 8px rgba(139, 92, 246, 0.4);
}

.btn:active, .hextech-btn:active, #submit-btn:active, #next-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #313338;
}

.btn:disabled::before {
    display: none;
}

/* Specific Button Variants */
.btn-primary {
    background: linear-gradient(135deg, #ff006e 0%, #d90057 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.5), 0 2px 8px rgba(255, 0, 110, 0.3);
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.btn-primary::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff1a7a 0%, #f0006e 100%);
    box-shadow: 0 8px 30px rgba(255, 0, 110, 0.7), 0 4px 12px rgba(255, 0, 110, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.btn-crous {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 2px 8px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-crous::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-crous:hover {
    background: linear-gradient(135deg, #14d99b 0%, #10b981 100%);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6), 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.btn-prison {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4), 0 2px 8px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-prison::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-prison:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.6), 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-3px) scale(1.02);
}

/* Bouton "Suivant" - Style spécial */
#next-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    border: 2px solid rgba(139, 92, 246, 0.4);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5), 0 2px 8px rgba(139, 92, 246, 0.3);
    position: relative;
    padding: 0.7rem 1.2rem;
    margin-top: 0.6rem;
}

#next-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

#next-btn:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 10px 36px rgba(139, 92, 246, 0.7), 0 4px 12px rgba(139, 92, 246, 0.4);
    transform: translateY(-4px) scale(1.03);
}

#next-btn:active {
    transform: translateY(-2px) scale(1.01);
}

/* Result Overlay */
.result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 2rem;
    text-align: center;
    z-index: 10;
    border-radius: var(--radius-md);
}

.result-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

#result-status {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.1);
}

.correct #result-status { 
    background: rgba(0, 245, 212, 0.2);
    color: #00f5d4;
    border: 1px solid rgba(0, 245, 212, 0.3);
}

.wrong #result-status { 
    background: rgba(255, 0, 110, 0.2);
    color: #ff006e;
    border: 1px solid rgba(255, 0, 110, 0.3);
}

#image-name, #correct-answer {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
    line-height: 1.1;
}

#result-text, .stats-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
    flex-wrap: wrap;
    align-items: center;
}

/* Hide Discord and Ko-fi buttons in games */
body.game-page .game-only-hide {
    display: none !important;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
}

.lang-dropdown-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

.current-lang-flag {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    width: 100%;
    height: 100%;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    visibility: visible !important;
    opacity: 1 !important;
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 150px;
    z-index: 1000;
}

.lang-dropdown-menu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.lang-dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
}

.lang-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.lang-dropdown-item.active {
    background: rgba(255, 0, 110, 0.15);
    color: var(--accent-color);
    font-weight: 600;
}

.lang-dropdown-item span:first-child {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Legacy lang-btn support (if needed elsewhere) */
.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Navigation Buttons */
.nav-buttons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.nav-btn {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border-radius: 100px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
    cursor: pointer;
    font-weight: 500;
}

button.nav-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
}

.nav-btn:hover {
    color: white;
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Back to Hub (Legacy support if needed, but we'll use nav-buttons) */
.back-to-hub {
    /* position: absolute; Removed to allow flex container */
    /* top: 20px; */
    /* left: 20px; */
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* z-index: 100; */
}

.back-to-hub:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer Terms Link */
#footer-terms {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 20px;
    border-radius: 100px;
    transition: all 0.2s ease;
    margin-top: 2rem;
}

#footer-terms:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Hub Styles */
.hub-container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    z-index: 1;
    position: relative;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.hub-card {
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

.hub-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.hub-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #151515;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
}

.hub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-card:hover .hub-card-image img {
    transform: scale(1.05);
}

.maintenance-mode {
    opacity: 0.8;
}

.maintenance-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f59e0b;
    color: black;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.disabled-mode {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}

.disabled-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444; /* Red */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.hub-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.hub-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Terms Page Styles */
.terms-wrapper {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    z-index: 1;
    position: relative;
}

.terms-container {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.terms-container h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.terms-container h2 {
    color: white;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-family: var(--font-display);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.terms-container ul {
    padding-left: 20px;
    margin-bottom: 1rem;
}

.terms-container li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-email {
    color: white;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

/* Score Display */
.score-display {
    display: inline-block;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.2rem;
    border: 1px solid var(--card-border);
}

.score-display .separator {
    margin: 0 10px;
    opacity: 0.5;
    font-weight: 300;
}

/* Leaderboard / Game Over */
.game-over-container {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 0.8rem;
    width: 100%;
    gap: 0.8rem;
    max-height: 80vh;
    overflow-y: auto;
}

.game-over-container.visible {
    display: flex;
}

.game-over-left {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.leaderboard-form {
    margin-top: 0.8rem;
    width: 100%;
    max-width: 400px;
}

.leaderboard-display, #leaderboard-container {
    flex: 1;
    min-width: 300px;
    display: none; /* Hidden initially */
    width: 100%;
}

.leaderboard-list {
    margin-top: 1rem;
    width: 100%;
    text-align: left;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--card-border);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:first-child {
    color: #fbbf24; /* Gold */
    font-weight: bold;
}




.skip-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 10px;
}

.skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Autocomplete Suggestions */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--card-border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    margin-top: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: none;
}

.suggestions-list.visible {
    display: block;
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.suggestion-item:hover, .suggestion-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.input-group {
    position: relative; /* Ensure suggestions are positioned relative to input group */
}

/* Stats Grid */
.stats-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    font-size: 0.8em;
    margin-top: 8px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-weight: bold;
    font-size: 1.2em;
}

.stat-label-small {
    font-size: 0.7em;
    opacity: 0.7;
}

.stat-correct { color: #4ade80; }
.stat-wrong { color: #f87171; }
.stat-total { color: var(--text-primary); }

/* Discord Hub Button */
.discord-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.5), 0 0 25px rgba(88, 101, 242, 0.3);
}

.discord-hub-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.7), 0 0 35px rgba(88, 101, 242, 0.4);
}

/* Bouton Discord avec style spécifique */
.social-discord-btn {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.social-discord-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

/* Bouton Ko-fi avec style spécifique */
.social-kofi-btn {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.social-kofi-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

/* Bouton User Profile avec style spécifique */
.user-profile-btn {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.user-profile-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

/* Badges */
.badges-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: white;
    width: fit-content;
}

.new-badge {
    background: #3b82f6; /* Blue */
}

.trending-badge {
    background: #8b5cf6; /* Purple */
    background: linear-gradient(45deg, #8b5cf6, #d946ef);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .language-selector {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin: 10px auto 20px auto;
        width: 100%;
    }

    .lang-dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .lang-dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }

    .nav-buttons {
        position: relative;
        top: auto;
        left: auto;
        justify-content: center;
        margin: 10px auto;
        width: 100%;
        flex-wrap: wrap;
    }

    header {
        margin-top: 1rem;
    }

    .score-display {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 12px;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .container, .hub-container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }

    .version-ribbon {
        font-size: 0.5rem;
        padding: 2px 6px;
        right: -15px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation Bar - Fixed and Compact */
    body {
        padding-top: 50px; /* Space for fixed navbar */
    }

    .nav-buttons {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(15, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--card-border);
        padding: 8px 10px;
        margin: 0 !important;
        z-index: 1000;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .language-selector {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: auto !important;
        background: transparent;
        padding: 8px 10px;
        margin: 0 !important;
        z-index: 1001;
        justify-content: flex-end !important;
        display: flex !important;
        gap: 6px;
    }

    .social-discord-btn,
    .social-kofi-btn {
        padding: 8px !important;
        min-width: auto !important;
    }

    .social-text {
        display: none !important;
    }

    .nav-btn {
        padding: 8px !important;
        min-width: auto !important;
    }

    .nav-btn-text {
        display: none !important;
    }

    .nav-btn svg {
        margin: 0 !important;
    }

    .lang-dropdown-btn {
        padding: 8px !important;
        min-width: auto !important;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .social-icon-btn {
        padding: 8px !important;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0 !important;
    }

    .social-icon-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .social-icon-btn .social-text {
        display: none !important;
    }

    .discord-hub-btn {
        padding: 8px !important;
        font-size: 0 !important;
        gap: 0 !important;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .discord-hub-btn svg {
        margin: 0 !important;
        width: 20px !important;
        height: 20px !important;
    }

    .discord-hub-btn .login-text,
    .discord-hub-btn .username-text {
        display: none !important;
    }

    .user-profile-btn {
        padding: 8px !important;
        min-width: auto !important;
        height: 36px;
    }

    .user-avatar {
        width: 24px !important;
        height: 24px !important;
        font-size: 18px !important;
    }

    .login-btn-with-bonus {
        padding: 8px !important;
        height: 36px;
    }

    .login-bonus-badge {
        top: -6px !important;
        right: -6px !important;
    }

    .game-page-container {
        padding: 10px 15px;
    }

    .controls.binary-choice {
        flex-direction: row; /* Garder côte à côte même sur mobile */
        gap: 12px; /* Espacement entre les boutons */
    }

    .controls.binary-choice .btn {
        padding: 1.5rem;
        font-size: 1.2rem;
        flex: 1; /* Chaque bouton prend la même largeur */
    }

    .lang-dropdown-btn {
        padding: 6px 10px;
        font-size: 1rem;
    }

    .lang-dropdown-item {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-card {
        padding: 16px;
    }

    .image-container img {
        width: 80%;
    }

    .game-card {
        padding: 16px;
    }
}

/* --- Enhanced Leaderboard Styles --- */

/* Sidebar Mini Leaderboard */
.sidebar-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.mini-leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.mini-leaderboard-rank {
    font-weight: 700;
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.mini-leaderboard-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.mini-leaderboard-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.mini-leaderboard-score {
    font-weight: 700;
    color: var(--accent-color);
}

/* Rank Colors */
.rank-1 .mini-leaderboard-rank, .rank-1 td:first-child { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); } /* Gold */
.rank-2 .mini-leaderboard-rank, .rank-2 td:first-child { color: #94a3b8; text-shadow: 0 0 10px rgba(148, 163, 184, 0.3); } /* Silver */
.rank-3 .mini-leaderboard-rank, .rank-3 td:first-child { color: #b45309; text-shadow: 0 0 10px rgba(180, 83, 9, 0.3); } /* Bronze */

/* Main Leaderboard Table */
.leaderboard-table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.leaderboard-table th {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--card-border);
}

.leaderboard-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-table .score-col {
    text-align: right;
    font-weight: 700;
    color: var(--accent-color);
}

.leaderboard-table .percent-col {
    text-align: right;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none; /* Changed from flex to none to ensure it is hidden */
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Increased z-index */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex; /* Show when visible */
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #1a1a1a; /* Fallback if var not set */
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Replay Button */
.replay-btn {
    width: 100%;
    padding: 1.25rem;
    background: #10b981; /* Emerald 500 */
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.replay-btn:hover {
    background: #059669; /* Emerald 600 */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.6);
}

/* Extra Lives (Yellow Hearts) */
.heart.extra {
    color: #fbbf24; /* Gold/Yellow */
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Infinite Lives Animation */
@keyframes pulse-infinite {
    0% { transform: scale(1); text-shadow: 0 0 10px rgba(255, 0, 110, 0.5); }
    50% { transform: scale(1.2); text-shadow: 0 0 20px rgba(255, 0, 110, 0.8); }
    100% { transform: scale(1); text-shadow: 0 0 10px rgba(255, 0, 110, 0.5); }
}

.heart.infinite {
    display: inline-block;
    animation: pulse-infinite 2s infinite ease-in-out;
    font-size: 1.2em; /* Slightly larger */
    color: var(--accent-color);
}


.bonus-life-msg {
    color: #ef4444;
    font-weight: bold;
    margin-top: 10px;
    font-size: 1.2rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Login Bonus Badge - Modern & Subtle */
.login-bonus-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-subtle 3s infinite;
    pointer-events: none;
    white-space: nowrap;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
    display: inline-block;
}

@keyframes pulse-subtle {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

.login-btn-with-bonus {
    overflow: visible !important;
    position: relative;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.login-btn-with-bonus:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.3) !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3)) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

.login-btn-with-bonus:hover .login-bonus-badge {
    animation: bounce-hearts 0.6s ease;
}

@keyframes bounce-hearts {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(5deg); }
}

/* Game Over Screen Redesign */
.final-score-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.final-score-value {
    font-size: 4rem;
    font-weight: 800;
    color: #4ade80;
    line-height: 1;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.final-score-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.save-score-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.save-score-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.game-over-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

.action-btn {
    min-width: 140px;
    justify-content: center;
}

/* Game Over Buttons */
#restart-btn {
    background: #10b981; /* Emerald 500 */
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    flex: 1;
}

#restart-btn:hover {
    background: #059669; /* Emerald 600 */
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

#back-menu-btn {
    background: #334155; /* Slate 700 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

#back-menu-btn:hover {
    background: #475569; /* Slate 600 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    color: white;
}

/* Responsive adjustments for Game Over */
@media (max-width: 600px) {
    .final-score-value {
        font-size: 3rem;
    }
    
    .game-over-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-btn {
        width: 100%;
    }
    
    /* Game-over responsive compact */
    .game-over-container {
        max-height: 80vh;
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .game-over-left {
        min-width: 180px;
    }
    
    .game-over-left h2 {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }
    
    .game-over-left p {
        font-size: 0.75rem;
        margin: 0.2rem 0;
    }
    
    #image-name, #correct-answer {
        font-size: 1.3rem;
    }
    
    #result-text, .stats-text {
        font-size: 0.75rem;
    }
    
    #next-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
        margin-top: 0.4rem;
    }
}

/* Extra small screens optimizations */
@media (max-width: 480px) {
    body {
        padding-top: 50px;
    }

    /* Game page specific optimizations */
    .game-page-container {
        padding: 0 8px !important;
    }

    .game-page-container header {
        margin-bottom: 0.5rem;
    }

    .game-page-container header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.25rem;
    }

    .game-page-container header p {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }

    .lives-display {
        font-size: 1.1rem;
        gap: 4px;
        margin-top: 0.25rem;
    }

    .score-display {
        font-size: 0.75rem !important;
        padding: 4px 8px;
        margin-top: 0.25rem !important;
        gap: 3px !important;
    }

    .score-display .separator {
        margin: 0 5px !important;
    }

    #streak-display {
        font-size: 0.75rem !important;
        margin-left: 5px !important;
    }

    .game-card {
        padding: 10px;
    }

    .image-container {
        margin-bottom: 12px;
    }

    /* Hub page optimizations */
    header h1 {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    header p {
        font-size: 0.7rem;
        margin-bottom: 0;
    }

    header {
        margin-bottom: 0.75rem;
    }

    .social-buttons-container {
        margin-top: 8px !important;
        gap: 8px !important;
    }

    .games-grid {
        margin-top: 20px !important;
    }

    .version-ribbon {
        font-size: 0.45rem;
        padding: 1px 4px;
        right: -10px;
        top: -6px;
    }

    .container, .hub-container {
        padding: 10px;
    }

    .hub-card {
        padding: 12px;
        border-radius: 16px;
    }

    .hub-card h2 {
        font-size: 1.25rem;
    }

    .hub-card p {
        font-size: 0.85rem;
    }

    .lang-dropdown-btn {
        padding: 5px 8px;
        font-size: 0.9rem;
        min-width: 45px;
    }

    .lang-dropdown-menu {
        min-width: 130px;
    }

    .lang-dropdown-item {
        padding: 7px 8px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .lang-dropdown-item span:first-child {
        font-size: 1rem;
        width: 18px;
    }

    .nav-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .btn, .hextech-btn, #submit-btn, #next-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }

    input[type="text"], input[type="email"], input[type="password"], .hextech-input {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .image-container img {
        width: 90%;
    }

    #image-name, #correct-answer {
        font-size: 2rem;
    }

    #result-text, .stats-text {
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-content h3 {
        font-size: 1.25rem;
    }

    .result-overlay {
        padding: 1rem;
    }

    .sidebar-content {
        padding: 16px;
    }

    .sidebar-title {
        font-size: 1rem;
    }

    .rules-list li {
        font-size: 0.85rem;
        padding: 8px;
    }

    .rule-number {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .final-score-value {
        font-size: 2.5rem;
    }

    .final-score-label {
        font-size: 1rem;
    }

    .leaderboard-table {
        font-size: 0.85rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 12px;
    }

    .discord-hub-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .discord-hub-btn svg {
        width: 18px;
        height: 18px;
    }

    .login-bonus-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
        top: -6px;
        right: -6px;
    }
}

/* Sidebar Improvements */
.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hints-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hint-btn {
    font-size: 0.85rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hint-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.hint-text {
    display: none; /* Toggled by JS */
    margin-top: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.4;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.btn-warning {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(202, 138, 4, 0.25) 100%);
    border: 2px solid rgba(234, 179, 8, 0.6);
    color: #fde047;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.3), 0 2px 6px rgba(234, 179, 8, 0.2);
}

.btn-warning::before {
    background: linear-gradient(90deg, transparent, rgba(253, 224, 71, 0.3), transparent);
}

.btn-warning:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35) 0%, rgba(202, 138, 4, 0.35) 100%);
    border-color: rgba(234, 179, 8, 0.8);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.4), 0 4px 10px rgba(234, 179, 8, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.25) 100%);
    border: 2px solid rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3), 0 2px 6px rgba(239, 68, 68, 0.2);
}

.btn-danger::before {
    background: linear-gradient(90deg, transparent, rgba(252, 165, 165, 0.3), transparent);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.35) 100%);
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4), 0 4px 10px rgba(239, 68, 68, 0.3);
    transform: translateY(-3px) scale(1.02);
}

/* Header Buttons - Unified Style */
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px; /* Fixed height */
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0 !important; /* Override any existing margin */
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.header-btn svg {
    width: 18px;
    height: 18px;
}

.btn-discord {
    background-color: #5865F2;
    border-color: #5865F2;
}

.btn-kofi {
    background-color: #13C3FF;
    border-color: #13C3FF;
}

.btn-login {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
}

.btn-profile {
    background-color: #1f2937;
    border-color: #374151;
}

/* Update Language Dropdown Button to match */
.lang-dropdown-btn {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

