:root {
    /* Corporate B2B Light Mode Palette */
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;

    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;

    --radius-lg: 16px;
    --radius-md: 8px;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    /* Game Themes (Preserved for internal game logic) */
    --hp-linear: linear-gradient(175deg, #ff8c00 0%, #ff4500 50%, #cc2200 100%);
    --quiz-dark: #f8fafc;
    /* Adapted to light mode */
    --gold: #E2B25B;
    --magenta: #E9398A;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

/* --- Layout --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

aside {
    width: 280px;
    height: 100vh;
    position: fixed;
    padding: 3rem 1.5rem;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

nav {
    flex: 1;
}

nav ul {
    list-style: none;
}

nav li {
    margin-bottom: 0.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    font-weight: 600;
}

main {
    flex: 1;
    margin-left: 280px;
    padding: 6rem 8rem;
    max-width: 1400px;
    position: relative;
}

@media (max-width: 1024px) {
    .wrapper {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    nav ul {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 5px;
    }

    nav li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    main {
        margin-left: 0;
        padding: 3rem 1rem;
    }
}

/* --- Section Tabbing --- */
.section {
    display: none;
    opacity: 0;
    animation: fadeInTab 0.3s ease-out forwards;
    width: 100%;
}

.section.visible {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- Hero Section Styling --- */
#intro {
    position: relative;
    padding: 0;
    margin-bottom: 4rem;
}

#intro .tag {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

#intro h1 {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

#intro .gradient-text {
    color: var(--accent);
}

#intro .desc {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.6;
}

/* --- Global Note --- */
.ux-note {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.ux-note-icon {
    background: var(--text-primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

/* Sections & Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
    margin-bottom: 3rem;
    overflow: hidden;
}

.card h3 {
    font-size: 28px;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* --- Layout inside Card --- */
.interactive-layout {
    display: flex;
    gap: 24px;
    margin-top: 2rem;
    height: 380px;
}

.preview-pane-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.preview-pane {
    background: var(--bg-surface-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    aspect-ratio: 16 / 9;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 1024px) {
    .interactive-layout {
        flex-direction: column;
        height: auto;
    }

    .chat-pane {
        width: 100%;
        height: 280px;
    }
}

/* Chat Pane (Light Mode Adaptation) */
.chat-pane {
    width: 320px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-alt);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow-y: hidden;
    min-height: 0;
}

.chat-line {
    line-height: 1.4;
    word-wrap: break-word;
    animation: chatIn 0.3s ease-out forwards;
}

@keyframes chatIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.chat-user {
    font-weight: 700;
}

.chat-msg {
    color: var(--text-secondary);
}

/* XP Rewards Styling */
.xp-rewards {
    margin-top: 2rem;
    background: var(--bg-surface-alt);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.xp-rewards h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xp-rewards h4 i {
    color: var(--accent);
    font-size: 1rem;
}

.xp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.xp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-size: 0.9rem;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}

.xp-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-primary);
}

.xp-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.xp-value {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-body);
}

/* Top Nav Language Selector */
.top-nav {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    gap: 0.5rem;
}

.btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Language-specific visibility */
[lang="fr"] .en,
[lang="en"] .fr {
    display: none !important;
}

.en {
    display: none;
}

[lang="en"] .en {
    display: inline;
}

[lang="en"] .fr {
    display: none;
}

[lang="fr"] .fr {
    display: inline;
}

[lang="fr"] .en {
    display: none;
}

/* --- GAME MOCKUPS --- */
/* Quiz */
.quiz-mock {
    background: #ffffff;
    color: var(--text-primary);
    padding: 32px;
    border-radius: var(--radius-md);
    width: 480px;
    position: relative;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.quiz-option {
    background: var(--bg-surface-alt);
    padding: 12px 18px;
    transform: skew(-13deg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.quiz-option b {
    background: var(--accent);
    color: white;
    font-weight: 900;
    padding: 0 10px;
    transform: skew(13deg);
    z-index: 5;
}

.quiz-opt-text {
    flex: 1;
    transform: skew(13deg);
    margin-left: 15px;
    font-weight: 600;
    z-index: 5;
}

.quiz-pct {
    transform: skew(13deg);
    font-weight: 900;
    color: var(--accent);
    font-size: 0.85rem;
    z-index: 5;
}

.quiz-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgb(37 99 235 / 64%);
    border-right: 2px solid var(--accent);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* PumpIt V20 */
.pi-iso-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 480px;
    height: 380px;
    position: relative;
    gap: 0;
    padding-bottom: 40px;
}

.pi-balloon-container {
    position: relative;
    width: 150px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.pi-balloon-svg {
    width: 100px;
    height: 140px;
    transform-origin: bottom center;
    transition: transform 0.2s;
    filter: drop-shadow(0 5px 15px rgba(255, 71, 87, 0.4));
}

.pi-hose-wrap {
    width: 120px;
    height: 60px;
    align-self: flex-end;
    margin-bottom: 25px;
    position: relative;
}

.pi-hose-svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #333;
    stroke-width: 8;
    stroke-linecap: round;
}

.hose-pulse {
    stroke: #555;
    stroke-width: 18;
    stroke-dasharray: 30 150;
    stroke-dashoffset: -120;
    opacity: 0;
    pointer-events: none;
}

.hose-pulse.animate {
    animation: hoseEngorge 0.35s ease-in forwards;
}

@keyframes hoseEngorge {
    0% {
        stroke-dashoffset: -120;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 40;
        opacity: 0;
    }
}

.pi-machine-wrap {
    width: 80px;
    height: 140px;
    cursor: pointer;
    transition: 0.1s;
    align-self: flex-end;
    position: relative;
    z-index: 10;
    padding-bottom: 10px;
}

.pi-machine-wrap:active {
    transform: scale(0.95);
}

.pump-handle-group {
    transition: transform 0.1s;
}

.pi-machine-wrap:active .pump-handle-group {
    transform: translateY(25px);
}

.pi-counter-box {
    position: absolute;
    top: 15px;
    right: 25px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.pi-jackpot {
    position: absolute;
    top: 10%;
    left: 0%;
    right: 0;
    text-align: center;
    font-weight: 900;
    color: #ffca28;
    font-size: 3rem;
    pointer-events: none;
    text-shadow: 0 4px 0 #bf360c, 0 10px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    z-index: 100;
}

.pi-jackpot.animate {
    animation: jackpotFly 1.5s ease-out forwards;
}

@keyframes jackpotFly {
    0% {
        transform: scale(0.4) translateY(20px);
        opacity: 0;
    }

    20% {
        transform: scale(1.3) translateY(-10px);
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(-80px);
        opacity: 0;
    }
}

/* Hot Potato */
.hp-iso-wrap {
    width: 340px;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    border: 4px solid #2d0a00;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    background: var(--hp-linear);
    box-shadow: 0 10px 0 #2d0a00;
    cursor: pointer;
    transition: 0.2s;
}

.hp-iso-wrap:active {
    transform: translateY(5px);
    box-shadow: 0 5px 0 #2d0a00;
}

.hp-potato {
    font-size: 5.5rem;
    animation: hpJump 0.6s infinite alternate;
    z-index: 5;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

@keyframes hpJump {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-12px) scale(1.1);
    }
}

.hp-card-iso {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    pointer-events: none;
}

/* KOTH */
.koth-landscape {
    position: relative;
    width: 480px;
    height: 380px;
    padding-top: 20px;
    transition: 0.1s;
    display: flex;
    justify-content: center;
}

.koth-landscape.koth-impact {
    animation: kothFlash 0.5s ease-out both;
}

@keyframes kothFlash {
    0% {
        filter: brightness(1);
        transform: scale(0.85);
    }

    15% {
        filter: brightness(1.4);
        transform: scale(0.87);
    }

    100% {
        filter: brightness(1);
        transform: scale(0.85);
    }
}

.koth-arena-floor {
    position: absolute;
    width: 440px;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(200, 200, 200, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.koth-pedestal-base {
    position: absolute;
    width: 280px;
    height: 100px;
    background: #e2e8f0;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    box-shadow: 0 25px 0 #cbd5e1, 0 40px 25px rgba(0, 0, 0, 0.1);
}

.koth-pedestal-top {
    position: absolute;
    width: 280px;
    height: 100px;
    background: radial-gradient(ellipse at center, #ffffff 0%, #f1f5f9 80%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    border: 2px solid #94a3b8;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.koth-aura {
    position: absolute;
    width: 260px;
    height: 260px;
    top: 50%;
    left: 50%;
    margin-top: -80px;
    margin-left: -130px;
    background: conic-gradient(from 0deg, transparent 0%, rgba(37, 99, 235, 0.4) 10%, transparent 20%, transparent 40%, rgba(37, 99, 235, 0.6) 50%, transparent 60%, transparent 80%, rgba(37, 99, 235, 0.4) 90%, transparent 100%);
    border-radius: 50%;
    animation: spinAura 8s linear infinite;
    mask-image: radial-gradient(circle, #fff 20%, transparent 70%);
    pointer-events: none;
}

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

.koth-king {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: oscillateKing 2.5s infinite ease-in-out alternate;
}

@keyframes oscillateKing {
    0% {
        transform: translate(-50%, -50%);
    }

    100% {
        transform: translate(-50%, calc(-50% - 10px));
    }
}

.oscillate-wrap {
    animation: oscillate 2.5s infinite ease-in-out alternate;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #ffcc00;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    padding: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 20;
}

.koth-crown {
    width: 70px;
    height: 70px;
    margin-bottom: -18px;
    z-index: 25;
    filter: drop-shadow(0 5px 10px rgba(255, 204, 0, 0.5));
    transform: rotate(5deg);
}

.koth-king-name {
    margin-top: -12px;
    z-index: 30;
    background: #ffffff;
    border: 2px solid #ffcc00;
    color: #0f172a;
    padding: 4px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.koth-stats {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.stat-badge {
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.stat-badge.time {
    color: var(--accent);
}

.stat-badge.xp {
    color: #f59e0b;
}

.koth-crowd {
    position: absolute;
    bottom: 5%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 30;
}

.member-container {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.member-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: oscillate 1.8s infinite ease-in-out alternate;
}

@keyframes oscillate {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-8px);
    }
}

/* PixelGuess */
.pg-box {
    width: 380px;
    height: 280px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 4px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

/* Kickoff */
.ko-iso-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    background: repeating-linear-gradient(to right, #4caf50 0px, #4caf50 50px, #43a047 50px, #43a047 100px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
}

.ko-stage {
    position: absolute;
    inset: auto 0 0 0;
    height: 100%;
    z-index: 1;
}

.ko-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 900;
}

.ko-power {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 3.5rem;
    line-height: 1;
    color: white;
}

.ko-dist {
    position: absolute;
    top: 28px;
    right: 24px;
    font-size: 1.8rem;
    line-height: 1;
}

.ko-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    opacity: 0;
    transition: 0.2s;
}

.ko-ticks {
    position: absolute;
    left: 0;
    right: -200%;
    bottom: 40px;
    height: 40px;
    background: repeating-linear-gradient(90deg, transparent 0 58px, rgba(255, 255, 255, 0.8) 58px 60px);
    opacity: 0.9;
}

.ko-ticks2 {
    position: absolute;
    left: 0;
    right: -200%;
    bottom: 28px;
    height: 28px;
    background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.6) 46px 47px);
    opacity: 0.6;
}

.ko-clouds {
    position: absolute;
    top: 10px;
    left: 0;
    right: -200%;
    height: 90px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 250 60'%3E%3Cpath fill='%23ffffff' opacity='0.9' d='M0 50 A30 30 0 0 1 40 50 A40 40 0 0 1 110 50 A30 30 0 0 1 160 50 A50 50 0 0 1 230 50 A15 15 0 0 1 250 50 L250 60 L0 60 Z'/%3E%3C/svg%3E") repeat-x, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'%3E%3Cpath fill='%23ffffff' opacity='0.5' d='M0 70 A40 40 0 0 1 70 70 A50 50 0 0 1 160 70 A30 30 0 0 1 210 70 A60 60 0 0 1 320 70 A45 45 0 0 1 400 70 L400 80 L0 80 Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 250px 60px, 400px 80px;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.ko-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 42px;
    height: 4px;
    background: #fff;
    opacity: 0.8;
}

.ko-bat-wrap {
    position: absolute;
    left: 55px;
    bottom: 78px;
    font-size: 6rem;
    transform-origin: 20% 80%;
    transform: rotate(45deg);
    transition: transform 0.1s;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    z-index: 2;
    pointer-events: none;
}

.ko-bag {
    position: absolute;
    left: 160px;
    bottom: 46px;
    font-size: 4.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    z-index: 2;
    pointer-events: none;
}

.ko-result {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 10;
}

.ko-result-box {
    background: white;
    padding: 25px 40px;
    border-radius: 20px;
    text-align: center;
    color: #1d1d1f;
    transform: scale(0.8);
    transition: 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ko-result-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.ko-result-meters {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
}

.ko-result.show {
    opacity: 1;
}

.ko-result.show .ko-result-box {
    transform: scale(1);
}

.ko-spam-msg {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    color: #1d1d1f;
    font-size: 1.2rem;
    pointer-events: none;
    transition: 0.2s;
    opacity: 0;
    z-index: 5;
}

/* Chat Race - 3D Arcade */
.cr-iso-wrap {
    width: 100%;
    height: 100%;
    background: #1e293b;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid var(--border-light);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    perspective: 800px;
}

.cr-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
    z-index: 20;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.cr-title {
    color: #fff;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.cr-timer {
    color: #00ffff;
    font-weight: 900;
    font-size: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    font-family: monospace;
}

.cr-scene {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform-style: preserve-3d;
    transform: rotateX(25deg) scale(1.1);
    margin-top: 20px;
}

.cr-track {
    transform-style: preserve-3d;
    position: absolute;
    inset: -50px;
    background: url('/assets/images/asphalt.png');
    background-size: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 0;
    box-shadow: inset 0 0 100px #000;
}

.cr-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, #1e293b 80%);
    pointer-events: none;
}

.cr-kerb {
    position: absolute;
    left: 0;
    right: 0;
    height: 16px;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.9);
}

.cr-kerb.top {
    top: 20px;
    background: repeating-linear-gradient(90deg, #ff3b30 0, #ff3b30 40px, #fff 40px, #fff 80px);
    border-bottom: 4px solid #aa0000;
}

.cr-kerb.bottom {
    bottom: 20px;
    background: repeating-linear-gradient(90deg, #0071e3 0, #0071e3 40px, #fff 40px, #fff 80px);
    border-top: 4px solid #0033aa;
}

.cr-finish {
    position: absolute;
    right: 80px;
    top: 0;
    bottom: 0;
    width: 30px;
    background: repeating-linear-gradient(0deg, #fff 0, #fff 20px, #000 20px, #000 40px);
    z-index: 4;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    border-left: 2px solid rgba(255, 255, 255, 0.5);
}

.cr-finish::after {
    content: 'FINISH';
    position: absolute;
    top: -30px;
    left: -20px;
    color: #fff;
    font-weight: 900;
    font-size: 1.5rem;
    text-shadow: 0 0 15px #fff;
    transform: rotate(90deg);
    letter-spacing: 5px;
    opacity: 0.5;
}

.cr-lane-mark {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0.8) 60px, transparent 60px, transparent 120px);
    filter: drop-shadow(0 0 5px #fff);
}

.cr-lane {
    transform-style: preserve-3d;
    position: relative;
    height: 110px;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.cr-car {
    position: absolute;
    left: 20px;
    transition: left 0.15s linear;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 140px;
    transform-style: preserve-3d;
}

.cr-car-model {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: 0.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cr-car-model img {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    filter: none !important;
    transform-style: preserve-3d;
}

.cr-car-model img:nth-child(1) {
    position: relative;
    transform: translateZ(-10px);
    filter: drop-shadow(-20px 30px 15px rgba(0, 0, 0, 0.9)) brightness(0) !important;
    opacity: 0.5;
}

.cr-car-model img:nth-child(2) {
    transform: translateZ(0px);
    filter: brightness(0.4) !important;
}

.cr-car-model img:nth-child(3) {
    transform: translateZ(4px);
    filter: brightness(0.6) !important;
}

.cr-car-model img:nth-child(4) {
    transform: translateZ(8px);
    filter: brightness(0.8) !important;
}

.cr-car-model img:nth-child(5) {
    transform: translateZ(12px);
    filter: brightness(0.9) !important;
}

.cr-car-model img:nth-child(6) {
    transform: translateZ(16px);
    filter: brightness(1.1) !important;
}

.cr-car::before {
    content: '';
    position: absolute;
    right: 90%;
    top: 50%;
    height: 6px;
    width: 0px;
    background: red;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: width 0.2s, background 0.2s;
    filter: blur(3px);
    z-index: -1;
}

.cr-car.a::before {
    background: linear-gradient(90deg, transparent, #ff3b30, #ff8888);
    box-shadow: 0 0 20px #ff3b30;
}

.cr-car.b::before {
    background: linear-gradient(90deg, transparent, #0a84ff, #88ccff);
    box-shadow: 0 0 20px #0a84ff;
}

.cr-car.boosting .cr-car-model {
    transform: translateY(-6px) rotateZ(-3deg) scale(1.05);
}

.cr-car.boosting::before {
    width: 150px;
}

.cr-team-tag {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 900;
    margin-top: -20px;
    border: 2px solid;
    white-space: nowrap;
    transform: translateZ(20px) rotateX(-25deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.cr-car.a .cr-team-tag {
    border-color: #ff3b30;
    text-shadow: 0 0 10px #ff3b30;
}

.cr-car.b .cr-team-tag {
    border-color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.cr-vs-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(30, 0, 0, 0.8), #000);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    transform: scale(1);
    pointer-events: none;
}

.cr-vs-overlay.hidden {
    opacity: 0;
    transform: scale(1.5);
}

.cr-vs-teams {
    display: flex;
    align-items: center;
    gap: 40px;
    transform: skew(-10deg);
}

.cr-vs-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 40px;
    border-bottom: 6px solid #ff3b30;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cr-vs-team:last-child {
    border-bottom-color: #00ffff;
}

.cr-vs-team img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.8));
    transform: skew(10deg);
}

.cr-vs-team h4 {
    color: white;
    margin-top: 15px;
    font-size: 1.8rem;
    font-weight: 900;
    transform: skew(10deg);
    text-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.cr-vs-divider {
    color: #fff;
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 0 0 30px #ff00ff;
    font-style: italic;
    margin: 0 10px;
    transform: skew(10deg);
}

.cr-traffic-light {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    background: #111;
    padding: 15px;
    border-radius: 20px;
    border: 4px solid #333;
    display: flex;
    gap: 15px;
    z-index: 60;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    pointer-events: none;
}

.cr-traffic-light.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cr-light {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.8);
    position: relative;
}

.cr-light.red.on {
    background: #ff3b30;
    box-shadow: 0 0 40px #ff3b30, inset 0 0 10px #fff;
}

.cr-light.orange.on {
    background: #ffcc00;
    box-shadow: 0 0 40px #ffcc00, inset 0 0 10px #fff;
}

.cr-light.green.on {
    background: #34c759;
    box-shadow: 0 0 40px #34c759, inset 0 0 10px #fff;
}

.cr-winner-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5.5rem;
    color: #fff;
    font-weight: 900;
    text-shadow: 0 0 50px #ffde00, 0 10px 20px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 60;
    white-space: nowrap;
    font-style: italic;
}

.cr-spam-msg {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffde00;
    color: #000;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1.3rem;
    transition: 0.2s;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(255, 222, 0, 0.4);
    text-transform: uppercase;
}

/* --- SNAKE GAMEBOY (Embedded to avoid breaking overlay) --- */
/* --- SNAKE GAMEBOY (Embedded to avoid breaking overlay) --- */
/* Retro Palette */
:root {
    --gb-bg: #c0c0c0;
    /* Case Grey */
    --gb-lens: #555566;
    /* Lens Dark Grey */
    --gb-lcd-off: #8bac0f;
    /* Greenish */
    --gb-lcd-on: #9bbc0f;
    /* Lightest Green */
    --gb-pixel-1: #9bbc0f;
    /* Off */
    --gb-pixel-2: #8bac0f;
    /* Light */
    --gb-pixel-3: #306230;
    /* Dark */
    --gb-pixel-4: #0f380f;
    /* Blackest */
}

#snake_wrap {
    position: absolute;
    bottom: -130px;
    right: -100px;
    transform: translate(-50%, -50%);
    /* Scale handled by parent usually? Or assume 1:1 */
    /* No fixed size here, content defines it? */
    width: auto;
    height: auto;
    display: none;
    /* Flex when active */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Press Start 2P', cursive;
    transition: opacity 2s ease-out;
}

#snake_wrap.fade-out {
    opacity: 0 !important;
}

.snake-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--gb-lcd-on);
    color: var(--gb-pixel-4);
    border: 4px double var(--gb-pixel-4);
    padding: 15px;
    font-size: 24px;
    z-index: 20;
    display: none;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    /* Ensure 3-2-1 doesn't shrink box too much */
}

@keyframes gb-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.blink-text {
    animation: gb-blink 0.5s step-end infinite alternate;
    color: #0f380f;
    /* Ensure dark color */
}

/* --- CASE --- */
.gb-case {
    width: 400px;
    background: var(--gb-bg);
    border-radius: 20px 20px 40px 20px;
    box-shadow:
        inset -5px -5px 10px rgba(0, 0, 0, 0.1),
        inset 5px 5px 10px rgba(255, 255, 255, 0.4),
        5px 10px 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- LENS --- */
.gb-lens {
    width: 340px;
    height: 260px;
    background: var(--gb-lens);
    border-radius: 15px 15px 40px 15px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gb-bezel-text {
    width: 100%;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    color: #ccc;
    font-family: sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
    padding: 2px 0;
    letter-spacing: 1px;
}

.gb-battery {
    position: absolute;
    left: 8px;
    top: 40%;
    font-family: sans-serif;
    font-size: 6px;
    color: #999;
}

.gb-battery::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: #822;
    /* Red LED off */
    border-radius: 50%;
    margin-bottom: 2px;
    box-shadow: 0 0 5px #f00;
    /* LED glowing */
    background: #f00;
}

/* --- SCREEN --- */
.gb-screen {
    background: #666;
    padding: 5px;
    margin-top: 5px;
}

.gb-lcd {
    width: 250px;
    height: 200px;
    background-color: var(--gb-lcd-on);
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    /* Scanlines effect? */
    background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 100% 2px;
}

/* --- GAME BOARD (Adapted) --- */
.snake-board {
    width: 100% !important;
    height: 100% !important;
    /* Fill LCD */
    position: absolute;
    top: 0;
    left: 0;
    /* Grid cells will be placed absolutely */

    /* DEBUG: Visualize Safe Zone vs Death Zone (HUD) */
    /* 20 rows total. 18 safe rows = 90%. Bottom 2 rows = 10% (Death) */
    background: linear-gradient(to bottom,
            rgba(0, 255, 0, 0.1) 0%,
            rgba(0, 255, 0, 0.1) 90%,
            rgba(255, 0, 0, 0.3) 90%,
            rgba(255, 0, 0, 0.3) 100%);

    /* Debug border */
    z-index: 5;
    /* Ensure visible behind snake/apple? or above? below usually */
}

.snake-cell {
    position: absolute;
    /* 250px / 20 = 12.5px width */
    /* 200px / 20 = 10px height - aspect ratio distortion is authentic! */
    width: 12.5px;
    height: 10px;
    box-sizing: border-box;
    /* border: 1px solid rgba(139, 172, 15, 0.2); Grid line hint */
}

.snake-head {
    background-color: var(--gb-pixel-4);
    /* Black */
    border-radius: 0;
    /* Square pixels */
}

.snake-body {
    background-color: var(--gb-pixel-3);
    /* Dark Green */
    border-radius: 0;
    box-shadow: inset 1px 1px 0px var(--gb-pixel-2);
}

.snake-apple {
    background-color: var(--gb-pixel-4);
    border-radius: 50%;
    /* Maybe slight circle ? */
    animation: flash 0.5s infinite;
}

@keyframes flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --- UI on LCD --- */
.snake-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--gb-pixel-2);
    /* info bar */
    border-top: 1px solid var(--gb-pixel-4);
    height: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 8px;
    color: var(--gb-pixel-4);
    z-index: 10;
}

/* --- LOWER CASE DETAILS (Decor) --- */
.gb-lower {
    width: 100%;
    padding: 0 20px;
}

.gb-logo {
    font-family: sans-serif;
    font-weight: 800;
    font-style: italic;
    color: #306230;
    /* Dark text on grey */
    opacity: 0.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.gb-tm {
    font-size: 16px;
}

.gb-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* --- CONTROLS --- */
.gb-dpad {
    width: 90px;
    height: 90px;
    position: relative;
    /* Removed clip-path simpler approach with sub-divs */
}

.gb-dpad-btn {
    position: absolute;
    background: #333;
    width: 30px;
    height: 30px;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.05s, box-shadow 0.05s;
}

/* Cross Shape Layout (3x3 grid concept) */
.gb-dpad-u {
    top: 0;
    left: 30px;
    border-radius: 4px 4px 0 0;
}

.gb-dpad-d {
    bottom: 0;
    left: 30px;
    border-radius: 0 0 4px 4px;
    box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.3);
}

/* Bottom one casts shadow */
.gb-dpad-l {
    top: 30px;
    left: 0;
    border-radius: 4px 0 0 4px;
}

.gb-dpad-r {
    top: 30px;
    right: 0;
    border-radius: 0 4px 4px 0;
}

.gb-dpad-center {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 30px;
    height: 30px;
    background: #333;
    z-index: 1;
    /* Cover seems */
}

/* Center circle dent */
.gb-dpad-center::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #222 10%, #333 60%);
    border-radius: 50%;
    opacity: 0.5;
}

/* Animations */
.gb-dpad-btn.pressed {
    background: #252525;
    transform: scale(0.95);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.gb-btns {
    display: flex;
    gap: 15px;
    transform: rotate(-25deg);
    margin-top: 20px;
    z-index: 1;
}

.gb-btn-a,
.gb-btn-b {
    width: 35px;
    height: 35px;
    background: #882040;
    /* Maroon */
    border-radius: 50%;
    box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5);
    position: relative;
}

.gb-start-select {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.gb-ss-btn {
    width: 40px;
    height: 12px;
    background: #999;
    border-radius: 10px;
    transform: rotate(-25deg);
    border: 1px solid #777;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.gb-speaker {
    position: absolute;
    bottom: 40px;
    right: 30px;
    transform: rotate(-25deg);
    display: flex;
    gap: 6px;
}

.gb-speaker span {
    width: 6px;
    height: 60px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Floating Tutorial Box */
.snake-tutorial-box {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.snake-mock {
    transform: scale(0.65);
    transform-origin: center center;
}

/* --- Search Bar --- */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 42px;
    transition: all 0.2s ease;
    width: 320px;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--bg-surface);
}

.search-box i {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 12px;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* --- Leaderboard Section --- */
.leaderboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 1280px) {
    .leaderboard-grid {
        grid-template-columns: 1.5fr 1fr;
        align-items: flex-start;
    }
}

.leaderboard-mock-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    position: relative;
}

.lb-header {
    display: grid;
    grid-template-columns: 60px minmax(120px, 1fr) 80px 100px;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-light);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.lb-col-rank {
    text-align: center;
}

.lb-col-user {
    padding-left: 10px;
}

.lb-col-lvl {
    text-align: center;
}

.lb-col-xp {
    text-align: right;
}

.lb-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px minmax(120px, 1fr) 80px 100px;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
    background: transparent;
    color: var(--text-primary);
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row:hover {
    background: rgba(0, 113, 227, 0.15);
}

.lb-rank {
    text-align: center;
    font-weight: 900;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-muted);
}

.lb-row:nth-child(1) .lb-rank {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    font-size: 1.4rem;
}

.lb-row:nth-child(2) .lb-rank {
    color: #94a3b8;
    text-shadow: 0 0 10px rgba(148, 163, 184, 0.2);
    font-size: 1.3rem;
}

.lb-row:nth-child(3) .lb-rank {
    color: #a8794c;
    text-shadow: 0 0 10px rgba(168, 121, 76, 0.2);
    font-size: 1.2rem;
}

.lb-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 10px;
    overflow: hidden;
}

.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #0071e3;
    overflow: hidden;
}

.lb-avatar svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.lb-username {
    font-weight: 700;
    color: var(--text-primary) !important;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-lvl {
    text-align: center;
}

.lb-lvl-badge {
    display: inline-block;
    background: rgba(0, 113, 227, 0.15);
    color: #4da3ff;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 113, 227, 0.3);
}

.lb-xp-val {
    text-align: right;
    font-weight: 900;
    font-family: var(--font-body);
    color: var(--text-primary);
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

/* XP Info Cards */
.xp-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.xp-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.xp-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 113, 227, 0.5);
    box-shadow: 0 15px 40px rgba(0, 113, 227, 0.15);
}

.xp-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 113, 227, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #4da3ff;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.3);
}

.xp-card-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

@media (max-width: 768px) {
    .lb-header {
        display: none;
    }

    /* Hide header on mobile for cleaner look */
    .lb-row {
        padding: 1rem;
        border-radius: 16px;
        margin: 0 1rem 1rem 1rem;
        border: 1px solid var(--border-light);
        background: var(--bg-surface-alt);
    }

    .lb-row:last-child {
        margin-bottom: 1rem;
    }

    .lb-lvl {
        display: none;
    }

    .lb-rank {
        width: 40px;
        font-size: 1.1rem;
    }

    .lb-row:nth-child(1) .lb-rank {
        font-size: 1.4rem;
    }

    .lb-xp-val {
        width: 80px;
        font-size: 1rem;
    }

    .lb-avatar {
        width: 32px;
        height: 32px;
    }

    .lb-avatar svg {
        width: 16px;
        height: 16px;
    }

    .lb-username {
        font-size: 1rem;
    }

    .leaderboard-mock-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding-top: 1rem;
    }
}