/* ==========================================================================
   CAP JOUR J — DAILY GAMES LUXURY DESIGN SYSTEM 2026
   Glassmorphism, Neon Glows, Mobile-First Touch Interactions & Micro-Animations
   ========================================================================== */

:root {
    --bg-dark: #080614;
    --bg-card: rgba(22, 17, 46, 0.75);
    --bg-card-hover: rgba(36, 28, 75, 0.85);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-active: rgba(255, 183, 3, 0.8);

    --gold: #ffb703;
    --gold-glow: rgba(255, 183, 3, 0.4);
    --neon-pink: #ff2a85;
    --neon-cyan: #00f0ff;
    --neon-green: #39ff14;
    --neon-purple: #9d4edd;

    /* Connections Categories Colors */
    --cat-yellow: #f9c74f;
    --cat-yellow-dark: #9a7812;
    --cat-green: #90be6d;
    --cat-green-dark: #437022;
    --cat-blue: #4d908e;
    --cat-blue-dark: #1f504f;
    --cat-purple: #9d4edd;
    --cat-purple-dark: #581c87;

    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-pixel: 'Press Start 2P', monospace;
}

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

.hidden {
    display: none !important;
}

html {
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: var(--font-main);
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 50% 10%, rgba(157, 78, 221, 0.18) 0%, transparent 65%),
        radial-gradient(circle at 85% 85%, rgba(0, 240, 255, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, #080614 0%, #120d2d 100%);
    background-attachment: fixed;
    box-sizing: border-box;
}

/* --- DAILY GAMES HEADER: COMPACT LUXURY RIBBON (SINGLE ROW NO-SCROLL) --- */
.daily-header {
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
    padding: 3px 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: rgba(14, 10, 32, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.5) !important;
    z-index: 50 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.daily-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.daily-badge {
    background: linear-gradient(135deg, #ff5500, #ff2a85) !important;
    font-family: var(--font-pixel) !important;
    font-size: 0.48rem !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(255, 42, 133, 0.5) !important;
}

.daily-title {
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    background: linear-gradient(180deg, #ffffff 0%, var(--gold) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-transform: uppercase !important;
}

/* Horizontal Swipeable Track Ribbon (Single row, never wraps, no vertical inflation) */
.daily-nav-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 4px !important;
    width: auto !important;
    max-width: calc(100% - 130px) !important;
    padding: 2px 2px !important;
}

.daily-nav-actions::-webkit-scrollbar {
    display: none !important;
}

.daily-btn-icon {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--border-glass) !important;
    color: #e2e8f0 !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
    touch-action: manipulation !important;
}

.daily-btn-icon:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    transform: translateY(-1px) !important;
}

.daily-btn-icon.active {
    background: linear-gradient(135deg, #ffb703, #fb8500) !important;
    color: #0d0926 !important;
    border-color: #ffb703 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.4) !important;
}

/* Validated Games Coloration (Emerald Glow & Badge Check) */
.daily-btn-icon.validated {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.45) !important;
}

.daily-btn-icon.validated:hover {
    background: rgba(16, 185, 129, 0.4) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
}

.daily-btn-icon.active.validated {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.75) !important;
}

.daily-btn-icon {
    position: relative !important;
}

.val-check {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #10b981 !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 900 !important;
    width: 15px !important;
    height: 15px !important;
    border-radius: 50% !important;
    border: 1.5px solid #0d0926 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.9) !important;
    animation: popCheck 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 10 !important;
}

.daily-btn-icon.active.validated .val-check {
    background: #ffffff !important;
    color: #059669 !important;
    border-color: #059669 !important;
}

@keyframes popCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.daily-btn-icon.leaderboard-nav-btn {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.25), rgba(251, 133, 0, 0.25)) !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
    font-weight: 800 !important;
}

.daily-btn-icon.leaderboard-nav-btn:hover {
    background: linear-gradient(135deg, #ffb703, #fb8500) !important;
    color: #0d0926 !important;
    box-shadow: 0 0 14px var(--gold-glow) !important;
}

/* Level Badges in Menu Navigation */
.nav-lvl {
    display: inline-block !important;
    padding: 1px 3px !important;
    font-size: 0.54rem !important;
    font-weight: 900 !important;
    border-radius: 3px !important;
    letter-spacing: 0.3px !important;
    line-height: 1 !important;
    margin-left: 2px !important;
    vertical-align: middle !important;
    transition: all 0.2s ease !important;
}

.nav-lvl.lvl-1 {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
}

.nav-lvl.lvl-2 {
    background: rgba(56, 189, 248, 0.25) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
}

.nav-lvl.lvl-3 {
    background: rgba(167, 139, 250, 0.25) !important;
    color: #c4b5fd !important;
    border: 1px solid rgba(167, 139, 250, 0.45) !important;
}

.nav-lvl.lvl-4 {
    background: rgba(251, 191, 36, 0.25) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.45) !important;
}

.nav-lvl.lvl-5 {
    background: rgba(251, 146, 60, 0.25) !important;
    color: #fb923c !important;
    border: 1px solid rgba(251, 146, 60, 0.45) !important;
}

.nav-lvl.lvl-6 {
    background: rgba(244, 63, 94, 0.25) !important;
    color: #fb7185 !important;
    border: 1px solid rgba(244, 63, 94, 0.45) !important;
}

.daily-btn-icon.active .nav-lvl {
    background: #ffffff !important;
    color: #0f0c29 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6) !important;
}

@media (max-width: 900px) {
    .daily-header {
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding: 2px 8px !important;
        gap: 6px !important;
    }

    .daily-brand {
        margin-bottom: 0 !important;
    }

    .daily-nav-actions {
        max-width: calc(100% - 100px) !important;
        gap: 3px !important;
    }

    .daily-btn-icon {
        padding: 2px 5px !important;
        font-size: 0.60rem !important;
        border-radius: 4px !important;
    }

    .daily-title {
        font-size: 0.75rem !important;
    }
}

/* --- BACKGROUND PARTICLES CANVAS --- */
.daily-particles-bg {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* --- MAIN CONTAINER (AUTO-FIT SCREEN 100dvh NO SCROLL) --- */
.daily-container {
    width: 100%;
    max-width: 640px;
    flex: 1 1 auto;
    height: calc(100dvh - 42px);
    max-height: calc(100dvh - 42px);
    padding: 4px 10px 42px 10px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.daily-container::-webkit-scrollbar {
    display: none;
}

@media (max-width: 600px) {
    .daily-container {
        height: calc(100dvh - 38px);
        max-height: calc(100dvh - 38px);
        padding: 2px 8px 38px 8px !important;
    }
}

/* Instructions & Puzzle Info Bar with Calendar Picker */
.puzzle-info-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(2px, 0.6vh, 6px);
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    gap: 6px;
}

.puzzle-day-pill {
    font-family: var(--font-pixel);
    font-size: 0.58rem;
    color: var(--gold);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* In-game Community Real-time Stats Badge */
.game-community-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 2px 8px;
    font-size: 0.68rem;
    color: #c4c2dc;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.game-community-badge .comm-pill-item strong {
    color: var(--gold);
    font-weight: 800;
}

.game-community-badge .comm-pill-sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
}

@media (max-width: 600px) {
    .puzzle-info-bar {
        padding: 3px 6px;
        gap: 4px;
    }

    .game-community-badge {
        order: 3;
        width: 100%;
        justify-content: center;
        font-size: 0.64rem;
        padding: 2px 6px;
    }
}

.puzzle-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.calendar-trigger-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    touch-action: manipulation;
    white-space: nowrap;
}

.calendar-trigger-btn:hover {
    background: rgba(255, 183, 3, 0.2);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 183, 3, 0.3);
}

.calendar-trigger-btn .cal-icon {
    font-size: 0.8rem;
}

.cal-quick-arrows {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.cal-nav-arrow {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #ddd;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

.cal-nav-arrow:hover:not(:disabled) {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.cal-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   DAILY CALENDAR MODAL / POPOVER
   ========================================================================== */
.calendar-modal-content {
    max-width: 520px !important;
    padding: 20px 16px !important;
}

.calendar-grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin: 12px 0 16px 0;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 480px) {
    .calendar-grid-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
}

.cal-day-cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border-glass);
    border-radius: 8px;
    padding: 6px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    user-select: none;
}

.cal-day-cell:hover:not(.locked) {
    background: rgba(255, 183, 3, 0.15);
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 183, 3, 0.25);
}

.cal-day-cell.active {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    border-color: #ffd166;
    color: #0d0926;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.5);
}

.cal-day-cell.active .cal-day-date {
    color: #0d0926;
}

.cal-day-cell.validated:not(.active) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.cal-day-cell.locked {
    opacity: 0.35;
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    color: #777;
}

.cal-day-num {
    font-size: 0.78rem;
    font-weight: 800;
}

.cal-day-date {
    font-size: 0.58rem;
    color: #a09cb8;
    white-space: nowrap;
}

.cal-day-badge {
    font-size: 0.60rem;
    margin-top: 1px;
}

.daily-instruction {
    text-align: center;
    font-size: clamp(0.72rem, 1.3vh, 0.82rem);
    color: #c4c2dc;
    margin-bottom: clamp(2px, 0.6vh, 6px);
    line-height: 1.25;
}

/* ==========================================================================
   CONNECTIONS (LES 4 TRIBUS) GRID
   ========================================================================== */
.connections-board {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 8px);
    margin-bottom: clamp(4px, 1vh, 8px);
}

/* Solved Category Banner */
.solved-category-card {
    width: 100%;
    padding: clamp(6px, 1vh, 10px) 8px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: popSolved 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

@keyframes popSolved {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.solved-cat-title {
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.solved-cat-items {
    font-size: 0.76rem;
    font-weight: 500;
    opacity: 0.92;
}

.cat-yellow-bg {
    background: linear-gradient(135deg, #f9c74f, #f39c12);
    color: #111;
}

.cat-green-bg {
    background: linear-gradient(135deg, #90be6d, #43aa8b);
    color: #111;
}

.cat-blue-bg {
    background: linear-gradient(135deg, #4d908e, #277da1);
    color: #fff;
}

.cat-purple-bg {
    background: linear-gradient(135deg, #9d4edd, #7209b7);
    color: #fff;
}

/* 4x4 Tiles Grid */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(4px, 0.8vh, 8px);
    width: 100%;
}

.tile-btn {
    aspect-ratio: 1.6 / 1;
    background: var(--bg-card);
    border: 1.5px solid var(--border-glass);
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: clamp(0.70rem, 1.4vh, 0.82rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3px, 0.6vh, 6px) 3px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.tile-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tile-btn.selected {
    background: #3b2d71;
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 14px var(--gold-glow);
    transform: translateY(-2px) scale(1.02);
}

.tile-btn.shake {
    animation: tileShake 0.4s ease;
}

@keyframes tileShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Mistakes Remaining Indicator */
.mistakes-tracker {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: clamp(3px, 0.6vh, 6px) 0;
    font-size: 0.78rem;
    color: #a8a5c7;
    font-weight: 600;
}

.mistake-dots {
    display: flex;
    gap: 5px;
}

.mistake-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon-pink);
    box-shadow: 0 0 6px rgba(255, 42, 133, 0.6);
    transition: all 0.3s ease;
}

.mistake-dot.lost {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transform: scale(0.7);
}

/* Action Buttons Toolbar */
.actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 3px;
}

.action-btn {
    padding: clamp(5px, 0.9vh, 9px) clamp(10px, 1.8vw, 16px);
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: clamp(0.74rem, 1.4vh, 0.84rem);
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    touch-action: manipulation;
}

.action-btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.action-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.action-btn-primary {
    background: linear-gradient(135deg, var(--gold), #ff8800);
    border: 1.5px solid var(--gold);
    color: #000000;
    box-shadow: 0 3px 12px var(--gold-glow);
}

.action-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 5px 16px rgba(255, 183, 3, 0.6);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================================
   TIMELINE (LA FRISE CHRONOLOGIQUE)
   ========================================================================== */
.timeline-track-container {
    width: 100%;
    margin: clamp(4px, 0.8vh, 10px) 0;
    position: relative;
}

.timeline-axis {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 0 6px;
    font-family: var(--font-pixel);
    font-size: 0.54rem;
    color: var(--neon-cyan);
    letter-spacing: 0.5px;
}

.timeline-cards-list {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.7vh, 8px);
    width: 100%;
}

.timeline-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-glass);
    border-radius: 10px;
    padding: clamp(6px, 1vh, 10px) 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: grab;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.timeline-card:active {
    cursor: grabbing;
}

.timeline-card.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    border-color: var(--gold);
}

.timeline-card.correct {
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
}

.timeline-card-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.timeline-order-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 0.56rem;
    color: var(--gold);
    flex-shrink: 0;
}

.timeline-event-text {
    font-size: clamp(0.74rem, 1.4vh, 0.85rem);
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

.timeline-date-reveal {
    font-family: var(--font-pixel);
    font-size: 0.56rem;
    color: var(--neon-cyan);
    margin-top: 2px;
    display: none;
}

.timeline-card-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow-shift-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 26px;
    height: 22px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.arrow-shift-btn:hover:not(:disabled) {
    background: var(--gold);
    color: #000;
}

.arrow-shift-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* ==========================================================================
   MODAL / VICTORY OVERLAYS & SHARE (RESPONSIVE & AUTO-ADAPTIVE)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 3, 12, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 100;
    animation: fadeIn 0.25s ease forwards;
    overflow-y: auto;
}

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

.modal-content {
    background: #151033;
    border: 2px solid var(--border-active);
    border-radius: 18px;
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 14px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px var(--gold-glow);
    position: relative;
    margin: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(0, 0, 0, 0.3);
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.modal-icon-trophy {
    font-size: 2rem;
    margin-bottom: 4px;
    line-height: 1;
    animation: trophyBounce 1s ease infinite alternate;
}

@keyframes trophyBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 2px;
    color: var(--gold);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.modal-subtitle {
    font-size: 0.80rem;
    color: #c4c2dc;
    margin-bottom: 8px;
    line-height: 1.3;
}

.funfact-box {
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.25);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #fef08a;
    margin-bottom: 10px;
    text-align: left;
}

.share-preview-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 8px;
    font-family: monospace;
    font-size: 0.88rem;
    line-height: 1.35;
    letter-spacing: 1px;
    margin-bottom: 10px;
    user-select: all;
}

/* Next Game Action Container */
.next-game-container {
    width: 100%;
    margin-bottom: 8px;
}

.next-game-btn {
    background: linear-gradient(135deg, var(--gold) 0%, #fb8500 100%);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #0d0926;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 4px 14px var(--gold-glow);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    width: 100%;
}

.next-game-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 183, 3, 0.6);
    color: #000;
}

.next-game-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.88;
}

.next-game-title {
    font-size: 0.95rem;
    font-weight: 900;
}

/* Streamlined Luxury Victory Action Pills */
.victory-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
}

.victory-action-pill {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 16px;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
}

.victory-action-pill:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
}

.victory-action-pill.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    border-color: #25d366;
    color: #25d366;
}

.victory-action-pill.whatsapp:hover {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.5);
}

.victory-action-pill.twitter {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
}

.victory-action-pill.twitter:hover {
    background: #ffffff;
    color: #000000;
}

.victory-action-pill.copy {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.victory-action-pill.copy:hover {
    background: var(--neon-cyan);
    color: #0d0926;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.victory-action-pill.close {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #a09cb8;
    flex: 0 0 auto;
    padding: 6px 10px;
}

.victory-action-pill.close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.share-btn-copy:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

/* Floating Toast Alert */
.daily-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: #ffffff;
    color: #000000;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 8px 16px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 200;
}

.daily-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Rules */
@media (max-width: 600px) {
    .tiles-grid {
        gap: 4px;
    }

    .tile-btn {
        font-size: 0.68rem;
        padding: 4px 2px;
        aspect-ratio: 1.5 / 1;
        border-radius: 6px;
    }

    .daily-title {
        font-size: 0.78rem;
    }

    .action-btn {
        padding: 6px 12px;
        font-size: 0.76rem;
    }
}

/* ==========================================================================
   WORDLE / MOT MYSTÈRE (LE PUZZLE DU JOUR)
   ========================================================================== */
.wordle-board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 0.6vh, 6px);
    margin-bottom: clamp(3px, 0.8vh, 8px);
    width: 100%;
    max-width: clamp(250px, 38vh, 320px);
}

.wordle-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(3px, 0.6vh, 6px);
    width: 100%;
}

.wordle-tile {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: clamp(32px, 4.8vh, 44px);
    max-height: clamp(32px, 4.8vh, 44px);
    background: rgba(22, 17, 46, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: clamp(6px, 1vh, 9px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.05rem, 2.2vh, 1.4rem);
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
    user-select: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.wordle-tile.filled {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.04);
}

.wordle-tile.pop {
    animation: tilePop 0.12s ease-in-out;
}

@keyframes tilePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); border-color: var(--gold); }
    100% { transform: scale(1); }
}

.wordle-tile.shake {
    animation: shakeRow 0.5s ease-in-out;
}

@keyframes shakeRow {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.wordle-tile.flip {
    animation: flipTile 0.55s ease-in-out forwards;
}

@keyframes flipTile {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

/* Tile State Colors */
.wordle-tile.correct {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
}

.wordle-tile.present {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #fbbf24 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5) !important;
}

.wordle-tile.absent {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Hint Banner */
.wordle-hint-box {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 183, 3, 0.08);
    border: 1px dashed rgba(255, 183, 3, 0.4);
    border-radius: 10px;
    padding: 4px 10px;
    margin-bottom: clamp(3px, 0.6vh, 6px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wordle-hint-text {
    font-size: 0.76rem;
    color: #f1ebd8;
    line-height: 1.25;
}

.wordle-hint-btn {
    background: rgba(255, 183, 3, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.70rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.wordle-hint-btn:hover:not(:disabled) {
    background: var(--gold);
    color: #000;
}

.wordle-hint-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Virtual Keyboard */
.virtual-keyboard {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.5vh, 5px);
    margin-top: clamp(2px, 0.4vh, 4px);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: clamp(2px, 0.4vh, 4px);
    width: 100%;
}

.key-btn {
    flex: 1;
    min-height: clamp(30px, 3.8vh, 40px);
    height: clamp(30px, 3.8vh, 40px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: #ffffff;
    font-size: clamp(0.72rem, 1.5vh, 0.86rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.key-btn:active {
    transform: scale(0.93);
}

.key-btn.wide-key {
    flex: 1.4;
    font-size: clamp(0.62rem, 1.2vh, 0.72rem);
    padding: 0 2px;
}

.key-btn.correct {
    background: #10b981 !important;
    border-color: #34d399 !important;
    color: #fff !important;
}

.key-btn.present {
    background: #f59e0b !important;
    border-color: #fbbf24 !important;
    color: #fff !important;
}

.key-btn.absent {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.25) !important;
}

/* Stats Section in Modal */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 10px 0 14px 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 6px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    font-size: 0.58rem;
    color: #a09cb8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.funfact-box {
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.4);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #e5d4f7;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.3;
}

@media (max-width: 500px) {
    .wordle-board-container {
        max-width: 270px;
        gap: 3px;
    }

    .wordle-row {
        gap: 3px;
    }

    .wordle-tile {
        font-size: 1.15rem;
        border-radius: 6px;
    }

    .key-btn {
        min-height: 32px;
        height: 32px;
        font-size: 0.74rem;
    }

    .key-btn.wide-key {
        font-size: 0.62rem;
    }
}

/* ==========================================================================
   CITATION DU JOUR (DAILY ROMANTIC QUOTE & POSTCARD GENERATOR)
   ========================================================================== */
.quote-card-container {
    width: 100%;
    max-width: 580px;
    margin: clamp(4px, 0.8vh, 10px) auto;
    position: relative;
}

.quote-card {
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.88), rgba(16, 12, 38, 0.95));
    border: 1.5px solid rgba(255, 183, 3, 0.35);
    border-radius: 16px;
    padding: clamp(12px, 1.8vh, 22px) clamp(12px, 2.5vw, 22px);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 183, 3, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quote-card:hover {
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 183, 3, 0.3);
}

.quote-watermark-icon {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.03);
    font-family: serif;
    pointer-events: none;
    line-height: 1;
}

.quote-theme-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 183, 3, 0.12);
    border: 1px solid rgba(255, 183, 3, 0.4);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: clamp(6px, 1vh, 12px);
}

.quote-content {
    font-size: clamp(0.92rem, 1.8vh, 1.2rem);
    line-height: 1.45;
    font-style: italic;
    color: #ffffff;
    font-weight: 400;
    margin-bottom: clamp(8px, 1.4vh, 14px);
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.quote-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: clamp(6px, 1vh, 10px);
    margin-bottom: clamp(8px, 1.2vh, 14px);
    flex-wrap: wrap;
    gap: 6px;
}

.quote-author-info {
    display: flex;
    flex-direction: column;
}

.quote-author-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.3px;
}

.quote-author-meta {
    font-size: 0.72rem;
    color: #a5a2c2;
    margin-top: 1px;
}

.quote-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.quote-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    transition: all 0.2s ease;
    text-decoration: none;
}

.quote-action-gold {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    color: #000;
    border: none;
    box-shadow: 0 3px 12px rgba(255, 183, 3, 0.4);
}

.quote-action-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 183, 3, 0.6);
}

.quote-action-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.quote-action-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    transform: translateY(-1px);
}

.quote-action-wa {
    background: #25d366;
    color: #ffffff;
    border: none;
    grid-column: span 2;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.35);
}

.quote-action-wa:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.55);
}

/* Postcard Canvas Preview Modal */
.canvas-preview-container {
    margin: 12px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 1.5px solid var(--border-glass);
    max-width: 100%;
}

.canvas-preview-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 550px) {
    .quote-card {
        padding: 14px 12px;
        border-radius: 14px;
    }

    .quote-content {
        font-size: 0.95rem;
    }

    .quote-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   CALCUL DU JOUR (LE COMPTE DU JOUR / MATH PUZZLE)
   ========================================================================== */
.calc-game-container {
    width: 100%;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.8vh, 8px);
    margin-bottom: clamp(4px, 1vh, 10px);
}

/* Big Target Display */
.calc-target-box {
    width: 100%;
    background: linear-gradient(135deg, rgba(32, 22, 70, 0.9), rgba(18, 14, 42, 0.95));
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    padding: clamp(8px, 1.2vh, 14px) 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 183, 3, 0.25);
    position: relative;
    overflow: hidden;
}

.calc-target-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.calc-target-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #c4c2dc;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}

.calc-target-number {
    font-size: clamp(1.8rem, 4vh, 2.6rem);
    font-weight: 900;
    font-family: var(--font-pixel), monospace;
    color: var(--gold);
    letter-spacing: 1.5px;
    text-shadow: 0 0 16px rgba(255, 183, 3, 0.6);
    line-height: 1.1;
}

.calc-current-result-row {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #e2dff5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-proximity-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
}

.calc-proximity-badge.exact {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    color: #fff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* Number Tiles Grid */
.calc-tiles-section {
    width: 100%;
}

.calc-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #a09cb8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
    text-align: center;
}

.calc-tiles-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(4px, 0.8vh, 6px);
    width: 100%;
}

.calc-tile-btn {
    aspect-ratio: 1.2 / 1;
    background: linear-gradient(145deg, rgba(38, 28, 85, 0.85), rgba(20, 15, 48, 0.9));
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #ffffff;
    font-size: clamp(0.95rem, 2vh, 1.2rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.calc-tile-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--neon-cyan);
    box-shadow: 0 6px 16px rgba(0, 240, 255, 0.3);
}

.calc-tile-btn.selected {
    background: linear-gradient(135deg, #00f0ff, #0077b6);
    border-color: #ffffff;
    color: #000000;
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}

.calc-tile-btn.used {
    opacity: 0.25;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.calc-tile-btn.newly-created {
    border-color: var(--gold);
    animation: pulseNewTile 0.6s ease;
}

@keyframes pulseNewTile {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.12); border-color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }
    100% { transform: scale(1); opacity: 1; }
}

/* Operators Grid */
.calc-operators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(4px, 0.8vh, 6px);
    width: 100%;
}

.calc-op-btn {
    min-height: clamp(30px, 3.8vh, 40px);
    height: clamp(30px, 3.8vh, 40px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: #ffffff;
    font-size: clamp(1rem, 2vh, 1.25rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    transition: all 0.15s ease;
}

.calc-op-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold);
    color: var(--gold);
}

.calc-op-btn.selected {
    background: var(--gold);
    border-color: #ffd166;
    color: #0d0926;
    box-shadow: 0 0 14px var(--gold-glow);
}

.calc-op-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* History Box */
.calc-history-box {
    width: 100%;
    max-height: clamp(45px, 8vh, 75px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.75rem;
    color: #c4c2dc;
}

/* Current Expression Pending Display */
.calc-pending-expression {
    width: 100%;
    min-height: 44px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
}

/* Calculation Steps History */
.calc-history-card {
    width: 100%;
    background: rgba(18, 14, 42, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 14px 18px;
}

.calc-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    min-height: 38px;
}

.calc-step-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.95rem;
    color: #ffffff;
    animation: fadeInStep 0.25s ease;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.calc-step-res {
    color: var(--gold);
    font-weight: 800;
}

.calc-history-empty {
    font-size: 0.85rem;
    color: #7b7896;
    text-align: center;
    font-style: italic;
    padding: 8px 0;
}

/* Actions Toolbar */
.calc-toolbar {
    display: flex;
    gap: 10px;
    width: 100%;
}

@media (max-width: 500px) {
    .calc-target-number {
        font-size: 2.6rem;
    }

    .calc-tiles-grid {
        gap: 6px;
    }

    .calc-tile-btn {
        font-size: 1.15rem;
        border-radius: 10px;
    }

    .calc-op-btn {
        min-height: 42px;
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   ANNÉE DU JOUR (DAILY YEAR GUESS / CHRONO PUZZLE)
   ========================================================================== */
.year-game-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Mystery Event Card */
.year-event-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid rgba(255, 183, 3, 0.4);
    border-radius: 20px;
    padding: 24px 22px;
    text-align: center;
    position: relative;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.15);
}

.year-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 183, 3, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.year-event-text {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.year-event-hint-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #c4c2dc;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Numeric Guess Input Display */
.year-display-box {
    width: 100%;
    max-width: 320px;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid var(--border-glass);
    border-radius: 16px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 4px auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.year-digit-slot {
    width: 45px;
    height: 55px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-pixel), monospace;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 183, 3, 0.5);
    transition: all 0.15s ease;
}

.year-digit-slot.active {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transform: scale(1.05);
}

/* Year Numeric Keypad */
.year-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin: 6px auto;
}

.year-key-btn {
    min-height: 48px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.12s ease;
}

.year-key-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.25);
}

.year-key-btn.validate-key {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.year-key-btn.delete-key {
    background: rgba(255, 42, 133, 0.18);
    border-color: var(--neon-pink);
    color: #ff2a85;
}

/* Year Guesses History List */
.year-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.year-guess-card {
    background: rgba(22, 17, 46, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 700;
    animation: slideInGuess 0.3s ease;
}

@keyframes slideInGuess {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.year-guess-val {
    font-family: var(--font-pixel), monospace;
    font-size: 1.2rem;
    color: #ffffff;
}

.year-guess-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-diff-pill {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.diff-exact {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.diff-burning {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.diff-hot {
    background: #f59e0b;
    color: #000;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.diff-warm {
    background: #38bdf8;
    color: #000;
}

.diff-cold {
    background: rgba(255, 255, 255, 0.15);
    color: #bbb;
}

.year-dir-badge {
    font-size: 0.88rem;
    font-weight: 800;
}

/* ==========================================================================
   DRAPEAU DU JOUR (DAILY FLAG / VOYAGE DE NOCES PUZZLE)
   ========================================================================== */
.flag-game-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Flag Display Picture Frame */
.flag-display-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
    position: relative;
}

.flag-theme-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 183, 3, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.flag-viewport {
    width: 240px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #110d2e;
    margin-bottom: 14px;
    position: relative;
}

.flag-svg-render {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Search Country Autocomplete Input */
.flag-search-section {
    width: 100%;
    position: relative;
}

.flag-input-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.flag-search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid var(--border-glass);
    border-radius: 14px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 1rem;
    font-family: var(--font-main);
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.flag-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px var(--gold-glow);
}

.flag-submit-btn {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    color: #000000;
    border: none;
    border-radius: 14px;
    padding: 0 20px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.flag-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 183, 3, 0.5);
}

.flag-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #19133b;
    border: 2px solid var(--gold);
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.flag-suggestion-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
}

.flag-suggestion-item:hover,
.flag-suggestion-item.active {
    background: rgba(255, 183, 3, 0.2);
    color: var(--gold);
}

/* Guess History List */
.flag-guesses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.flag-guess-card {
    background: rgba(22, 17, 46, 0.75);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    animation: slideInGuess 0.3s ease;
}

.flag-guess-country {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.flag-guess-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-dist-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.76rem;
    color: #c4c2dc;
    font-family: monospace;
}

.flag-dir-badge {
    font-size: 1.1rem;
}

/* ==========================================================================
   CAPITALE DU JOUR (DAILY CAPITAL / GÉO ESCALE PUZZLE)
   ========================================================================== */
.capital-game-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Capital Mystery Card */
.capital-display-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 24px 22px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
    position: relative;
}

.capital-clues-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.capital-clue-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.capital-clue-label {
    font-size: 0.72rem;
    color: #a09cb8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.capital-clue-val {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
}

.capital-riddle-text {
    font-size: 1.15rem;
    font-style: italic;
    color: #e5d4f7;
    line-height: 1.5;
    margin-bottom: 12px;
}

@media (max-width: 500px) {
    .capital-clues-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FILM DU JOUR (DAILY MOVIE / TOP 100 CINÉ PUZZLE)
   ========================================================================== */
.movie-game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Movie Clapperboard Quote Card */
.movie-display-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 24px 22px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
    position: relative;
    overflow: hidden;
}

.movie-clapper-header {
    background: repeating-linear-gradient(-45deg,
            #111,
            #111 12px,
            #fff 12px,
            #fff 24px);
    height: 12px;
    width: calc(100% + 44px);
    margin: -24px -22px 18px -22px;
    border-bottom: 2px solid var(--gold);
}

.movie-quote-text {
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.movie-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.movie-meta-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.movie-meta-label {
    font-size: 0.68rem;
    color: #a09cb8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.movie-meta-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: 2px;
}

/* Movie Guesses Comparison Cards */
.movie-guesses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.movie-guess-card {
    background: rgba(22, 17, 46, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideInGuess 0.3s ease;
}

.movie-guess-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.movie-attrs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.movie-attr-badge {
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.attr-exact {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.attr-partial {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000000;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.attr-diff {
    background: rgba(255, 255, 255, 0.08);
    color: #c4c2dc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 500px) {
    .movie-quote-text {
        font-size: 1.15rem;
    }

    .movie-meta-grid {
        grid-template-columns: 1fr;
    }

    .movie-attrs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   TRADUCTION DU JOUR (DAILY POLYGLOT EMOJI PUZZLE)
   ========================================================================== */
.polyglot-game-container {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

/* Giant Emoji Picture Frame */
.polyglot-emoji-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
    position: relative;
}

.polyglot-emoji-viewport {
    font-size: 5rem;
    line-height: 1;
    margin: 8px 0 14px 0;
    filter: drop-shadow(0 0 20px rgba(255, 183, 3, 0.5));
    animation: emojiFloat 2.5s ease-in-out infinite alternate;
}

@keyframes emojiFloat {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-8px) scale(1.05);
    }
}

.polyglot-progress-wrapper {
    width: 100%;
    max-width: 380px;
    margin-top: 6px;
}

.polyglot-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: #c4c2dc;
    margin-bottom: 6px;
}

.polyglot-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.polyglot-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, var(--gold));
    border-radius: 4px;
    transition: width 0.35s ease;
}

/* 6 Languages Grid */
.polyglot-languages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.polyglot-lang-card {
    background: rgba(22, 17, 46, 0.8);
    border: 1.5px solid var(--border-glass);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}

.polyglot-lang-card.solved {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

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

.polyglot-lang-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.polyglot-lang-status {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}

.status-pending {
    background: rgba(255, 255, 255, 0.1);
    color: #a09cb8;
}

.status-solved {
    background: #10b981;
    color: #ffffff;
}

.polyglot-slots-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
}

.polyglot-letter-box {
    width: 26px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 900;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.polyglot-letter-box.space {
    width: 12px;
    background: transparent;
    border: none;
}

.polyglot-letter-box.revealed {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #10b981;
    animation: popIn 0.3s ease;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.polyglot-letter-box.unrevealed {
    border-bottom: 2px solid var(--gold);
    color: transparent;
}

/* Virtual Keyboard */
.polyglot-keyboard-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.polyglot-keyboard-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    width: 100%;
}

.polyglot-key {
    background: rgba(30, 24, 60, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font-main);
    padding: 10px 0;
    flex: 1;
    max-width: 44px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.polyglot-key:hover:not(:disabled) {
    background: rgba(255, 183, 3, 0.2);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.polyglot-key:active:not(:disabled) {
    transform: translateY(1px);
}

.polyglot-key.hit {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.polyglot-key.miss {
    background: rgba(255, 255, 255, 0.05);
    border-color: transparent;
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

.polyglot-lives-tracker {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    margin-bottom: 4px;
}


.polyglot-hint-link {
    font-size: 0.72rem;
    color: #c4c2dc;
    cursor: pointer;
    align-self: flex-start;
    transition: color 0.15s ease;
}

.polyglot-hint-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

@media (max-width: 550px) {
    .polyglot-languages-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   1. PIXEL / ZOOM DU JOUR (PIXELDLE)
   ========================================================================== */
.pixel-game-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.pixel-canvas-frame {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 16 / 10;
    background: #000;
    border: 3px solid var(--gold);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.25);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pixelCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.pixel-resolution-badge {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}

/* ==========================================================================
   2. RÉBUS ÉMOJI DU JOUR (REBUSDLE)
   ========================================================================== */
.rebus-game-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.rebus-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
}

.rebus-emojis-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 14px 0 18px 0;
    flex-wrap: wrap;
}

.rebus-emoji-tile {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid var(--border-glass);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    animation: emojiFloat 3s ease-in-out infinite alternate;
}

.rebus-operator {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
}

/* ==========================================================================
   3. L'INTRUS HISTORIQUE (SPOT THE IMPOSTOR)
   ========================================================================== */
.impostor-game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.impostor-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.impostor-card {
    background: rgba(22, 17, 46, 0.85);
    border: 2px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.impostor-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 245, 212, 0.2);
}

.impostor-card.selected-wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.impostor-card.selected-correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.impostor-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.impostor-card-date {
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 700;
}

.impostor-card-desc {
    font-size: 0.84rem;
    color: #c4c2dc;
    line-height: 1.4;
}

@media (max-width: 550px) {
    .impostor-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   4. BOGGLE 4x4 (DAILY WORD GRID)
   ========================================================================== */
.boggle-game-container {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.boggle-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 380px;
    background: rgba(18, 14, 41, 0.9);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    user-select: none;
    touch-action: none;
}

.boggle-tile {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.boggle-tile.selected {
    background: var(--gold);
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.6);
    transform: scale(0.95);
}

.boggle-current-word-box {
    width: 100%;
    max-width: 380px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
}

.boggle-found-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.boggle-target-bar {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.boggle-target-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 800;
}

.boggle-target-score {
    color: var(--gold);
}

.boggle-target-goal {
    color: #a09cb8;
}

.boggle-target-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
}

.boggle-target-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb703, #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.boggle-gold-hint {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 183, 3, 0.1);
    border: 1px dashed rgba(255, 183, 3, 0.5);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--gold);
    text-align: center;
    font-weight: 700;
}

.boggle-input-row {
    width: 100%;
    max-width: 380px;
    display: flex;
    gap: 8px;
}

.boggle-text-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--border-glass);
    border-radius: 10px;
    padding: 8px 12px;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    outline: none;
    transition: border-color 0.2s ease;
}

.boggle-text-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.3);
}

.boggle-word-chip {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.boggle-word-chip.is-gold {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.3), rgba(251, 133, 0, 0.3));
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(255, 183, 3, 0.4);
}

/* ==========================================================================
   5. VRAI OU FAUX HISTORIQUE (FACT CHECK DU JOUR)
   ========================================================================== */
.factcheck-game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.fact-card {
    width: 100%;
    background: rgba(22, 17, 46, 0.85);
    border: 1.5px solid var(--border-glass);
    border-radius: 18px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.fact-statement {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.45;
}

.fact-actions-row {
    display: flex;
    gap: 10px;
}

.fact-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1.5px solid transparent;
}

.fact-btn-true {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.fact-btn-true:hover:not(:disabled) {
    background: #10b981;
    color: #ffffff;
}

.fact-btn-false {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.fact-btn-false:hover:not(:disabled) {
    background: #ef4444;
    color: #ffffff;
}

.fact-btn.selected {
    box-shadow: 0 0 14px currentColor;
}

.fact-reveal-box {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--gold);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #c4c2dc;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   CITATION DU JOUR (LE JEU DE LA CITATION MYSTÈRE)
   ========================================================================== */
.quote-game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.quote-mystery-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(28, 20, 60, 0.9), rgba(16, 12, 38, 0.95));
    border: 2px solid var(--gold);
    border-radius: 24px;
    padding: 26px 22px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 183, 3, 0.2);
    position: relative;
}

.quote-masked-text {
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.55;
    margin: 14px 0 18px 0;
}

.quote-blank-slot {
    display: inline-block;
    background: rgba(255, 183, 3, 0.15);
    border: 2px dashed var(--gold);
    border-radius: 8px;
    padding: 2px 12px;
    color: var(--gold);
    font-weight: 900;
    font-style: normal;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.3);
    animation: pulse 2s infinite alternate;
}

.quote-blank-slot.solved {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
    color: #10b981;
    animation: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.quote-author-badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: #c4c2dc;
    margin-top: 8px;
}

.quote-author-badge.solved {
    color: var(--gold);
    font-size: 1.05rem;
}

/* ==========================================================================
   GLOBAL LEADERBOARD & PLAYER PROFILE
   ========================================================================== */
.leaderboard-modal-content {
    max-width: 500px;
    padding: 24px 20px;
}

.player-profile-card {
    background: rgba(255, 183, 3, 0.1);
    border: 1.5px solid var(--gold);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 16px 0;
    text-align: left;
    box-shadow: 0 0 15px rgba(255, 183, 3, 0.15);
}

.player-avatar {
    font-size: 2.2rem;
    line-height: 1;
}

.player-details {
    flex: 1;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.player-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.edit-name-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.edit-name-btn:hover {
    opacity: 1;
}

.player-stats-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #c4c2dc;
}

.lb-tabs-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.lb-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #c4c2dc;
    font-size: 0.82rem;
    font-weight: 800;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab-btn.active {
    background: rgba(255, 183, 3, 0.2);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.25);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
    padding-right: 4px;
}

.lb-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    transition: all 0.15s ease;
}

.lb-player-row.is-current-user {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.lb-left-col {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.lb-rank {
    font-size: 0.85rem;
    font-weight: 900;
    color: #a09cb8;
    min-width: 26px;
}

.lb-rank.rank-1,
.lb-rank.rank-2,
.lb-rank.rank-3 {
    font-size: 1.1rem;
}

.lb-player-info {
    display: flex;
    flex-direction: column;
}

.lb-player-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
}

.lb-player-tag {
    font-size: 0.72rem;
    color: #a09cb8;
}

.lb-score-col {
    font-size: 0.95rem;
    color: var(--gold);
}

.lb-score-col small {
    font-size: 0.7rem;
    color: #c4c2dc;
}

/* ==========================================================================
   COMMUNITY REAL-TIME DATABASE STATS BANNER
   ========================================================================== */
.community-stats-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 14px 0;
    width: 100%;
}

.comm-stat-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: #c4c2dc;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.comm-stat-pill strong {
    color: var(--gold);
    font-weight: 800;
}

/* ==========================================================================
   NEXT GAME AUTO-PROGRESSION BUTTON IN VICTORY MODAL
   ========================================================================== */
.next-game-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #34d399;
    border-radius: 14px;
    padding: 12px 18px;
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-main);
    width: 100%;
    margin: 12px 0 6px 0;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}

.next-game-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.65);
    border-color: #6ee7b7;
}

.next-game-btn.finish {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    border-color: #ffd166;
    color: #0d0926;
    box-shadow: 0 6px 20px rgba(255, 183, 3, 0.45);
}

.next-game-btn.finish:hover {
    box-shadow: 0 8px 25px rgba(255, 183, 3, 0.65);
}

.next-game-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.next-game-title {
    font-size: 1.12rem;
    font-weight: 900;
    margin-top: 2px;
}

.next-game-countdown {
    font-size: 0.75rem;
    color: #e6fffa;
    font-weight: 700;
    margin-top: 4px;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.next-game-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.next-game-progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    width: 100%;
}

/* ==========================================================================
   PERSISTENT FLOATING BOTTOM PROGRESS BAR & LEADERBOARD ACCESS
   ========================================================================== */
.daily-floating-bar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 990;
    width: calc(100% - 32px);
    max-width: 480px;
    pointer-events: auto;
    animation: slideUpFloat 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(18, 14, 41, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 183, 3, 0.4);
    border-radius: 50px;
    padding: 8px 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 183, 3, 0.2);
}

.floating-bar-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.floating-score {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.floating-sep {
    color: #a09cb8;
    font-size: 0.75rem;
    opacity: 0.6;
}

.floating-progress-text {
    font-size: 0.82rem;
    font-weight: 800;
    color: #10b981;
}

.floating-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.floating-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.floating-leaderboard-btn {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    border: none;
    color: #0d0926;
    font-size: 1.1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.floating-leaderboard-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(255, 183, 3, 0.9);
}

/* ==========================================================================
   IMMERSIVE GRAND CHELEM POPUP (15/15 JEUX QUOTIDIENS ACCOMPLIS)
   ========================================================================== */
.chelem-modal-content {
    max-width: 520px;
    background: radial-gradient(circle at center, #24164b 0%, #0d0926 100%) !important;
    border: 2px solid var(--gold) !important;
    box-shadow: 0 0 50px rgba(255, 183, 3, 0.4), 0 20px 60px rgba(0, 0, 0, 0.9) !important;
    position: relative;
    overflow: hidden;
}

.chelem-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.chelem-header-crown {
    font-size: 3.2rem;
    animation: royalPulse 1.2s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 16px rgba(255, 183, 3, 0.8));
    margin-bottom: -6px;
    z-index: 2;
    position: relative;
}

.chelem-games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    width: 100%;
    margin: 14px 0;
    z-index: 2;
    position: relative;
}

@media (max-width: 480px) {
    .chelem-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
}

.chelem-game-chip {
    background: rgba(16, 185, 129, 0.2);
    border: 1.5px solid #10b981;
    border-radius: 10px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.chelem-game-chip span.emoji {
    font-size: 1.2rem;
}

.chelem-game-chip span.name {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #a7f3d0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.chelem-score-card {
    background: rgba(255, 183, 3, 0.12);
    border: 1.5px solid var(--gold);
    border-radius: 16px;
    padding: 12px 18px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 12px;
    box-shadow: 0 0 20px rgba(255, 183, 3, 0.2);
    z-index: 2;
    position: relative;
}

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

.chelem-score-val {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 183, 3, 0.5);
}

.chelem-score-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a09cb8;
    text-transform: uppercase;
}

/* ==========================================================================
   ALREADY COMPLETED GAME BANNER (ANTI-RECOMMENCEMENT & PERSISTANCE)
   ========================================================================== */
.already-completed-banner {
    width: 100%;
    max-width: 580px;
    margin: 10px auto 16px auto;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 95, 70, 0.25));
    border: 1.5px solid #10b981;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(8px);
    animation: fadeInDown 0.35s ease;
    z-index: 10;
    box-sizing: border-box;
}

.acb-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acb-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
    animation: popCheck 0.4s ease;
}

.acb-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.acb-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.acb-sub {
    font-size: 0.8rem;
    color: #e2e8f0;
    margin-top: 2px;
    line-height: 1.3;
}

.acb-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
}

.acb-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.acb-btn.primary {
    background: linear-gradient(135deg, #ffb703, #fb8500);
    color: #0d0926;
    font-weight: 900;
    box-shadow: 0 4px 14px rgba(255, 183, 3, 0.45);
}

.acb-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 183, 3, 0.65);
}

.acb-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.acb-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffd166;
    color: #ffd166;
}

@media (max-width: 480px) {
    .already-completed-banner {
        padding: 12px;
    }

    .acb-actions {
        flex-direction: column;
    }
}