* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-night: #080B1A;
    --bg-deep: #0E1330;
    --bg-surface: #151B3D;
    --bg-surface-high: #1E2652;
    --stroke: #2C3770;
    --color-orange: #FF6A3D;
    --color-pink: #FF3D7F;
    --color-yellow: #FFC93C;
    --color-cyan: #2EE6D6;
    --color-green: #3BE38B;
    --color-red: #FF4D6D;
    --color-violet: #8B5CFF;
    --color-text: #F4F6FF;
    --color-muted: #8D96C4;
}

body {
    background: #03050C;
    font-family: 'Outfit', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    position: relative;
}

/* BASE APP & MOBILE FRAME */
.app-frame, .mobile-frame {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-night) 100%);
    border: 2px solid var(--stroke);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(46, 230, 214, 0.12);
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease, min-height 0.3s ease;
}

.status-bar {
    height: 38px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-muted);
}
.notch {
    width: 120px;
    height: 18px;
    background: #050712;
    border-radius: 0 0 14px 14px;
}

/* SCREENS */
.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.screen.active {
    display: flex;
}

/* HEADERS */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.brand h1 {
    font-size: 30px;
    font-weight: 900;
    font-style: italic;
    color: var(--color-orange);
    letter-spacing: -0.5px;
    line-height: 1;
}
.brand .sub {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-cyan);
    letter-spacing: 2px;
}
.badge-btn {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: #fff;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* PROFILE CARD */
.profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 16px;
}
.profile-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.avatar-box {
    width: 42px;
    height: 42px;
    background: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}
.profile-meta {
    flex: 1;
}
.profile-meta h3 {
    font-size: 17px;
    font-weight: 900;
}
.profile-meta p {
    font-size: 12px;
    color: var(--color-muted);
}
.best-record {
    text-align: right;
}
.best-record span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--color-muted);
}
.best-record strong {
    font-size: 16px;
    color: var(--color-yellow);
    font-weight: 900;
}
.xp-bar-bg {
    height: 6px;
    background: var(--bg-deep);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}
.xp-bar-fill {
    height: 100%;
    background: var(--color-orange);
    transition: width 0.5s ease;
}
.car-preview-row {
    background: var(--bg-deep);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.car-info {
    text-align: right;
}
.car-info span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-yellow);
}
.car-info small {
    color: var(--color-muted);
    font-size: 11px;
}

/* SECTION TITLE */
.section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    letter-spacing: 1.5px;
    margin: 10px 0 6px;
}

/* DIFFICULTY */
.diff-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}
.diff-btn {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    color: var(--color-muted);
    padding: 8px 4px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
}
.diff-btn.active {
    background: var(--color-orange);
    color: #fff;
    border-color: var(--color-orange);
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    height: 56px;
    background: linear-gradient(90deg, #FF6A3D 0%, #FF3D7F 100%);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    font-style: italic;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 106, 61, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}
.btn-primary:active {
    transform: scale(0.98);
}
.btn-secondary {
    width: 100%;
    height: 48px;
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    color: var(--color-cyan);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
}
.btn-outline {
    width: 100%;
    height: 48px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.bottom-nav {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.nav-btn {
    flex: 1;
    height: 46px;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

/* RACE SCREEN */
#screen-race {
    padding: 8px 12px;
}
.race-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    margin-bottom: 6px;
}
.hud-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpm-display span {
    display: block;
    font-size: 16px;
    font-weight: 900;
    font-style: italic;
    color: var(--color-orange);
}
.wpm-display small {
    font-size: 11px;
    color: var(--color-muted);
}
.rank-badge {
    background: var(--color-green);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    font-style: italic;
    padding: 4px 14px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(59, 227, 139, 0.4);
}
.hud-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 15px;
}
.pause-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-surface-high);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

/* TRACK */
.track-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--stroke);
}
#track-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 11, 26, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.countdown-overlay.hidden {
    display: none;
}
.traffic-lights {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.light {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}
.light.red.active { background: var(--color-red); box-shadow: 0 0 15px var(--color-red); }
.light.yellow.active { background: var(--color-yellow); box-shadow: 0 0 15px var(--color-yellow); }
.light.green.active { background: var(--color-green); box-shadow: 0 0 15px var(--color-green); }
.countdown-num {
    font-size: 42px;
    font-weight: 900;
    font-style: italic;
    color: var(--color-yellow);
}

/* TYPING */
.typing-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.typo-alert {
    background: rgba(46, 125, 50, 0.95);
    border: 2px solid #66BB6A;
    border-radius: 18px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    animation: bounce 0.3s;
}
.typo-alert.hidden {
    display: none;
}
.alert-icon {
    background: var(--color-red);
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}
/* ============================================================ */
/* FEATURE 1: ENHANCED WORD-BASED & CHARACTER-ACCURATE TYPING  */
/* ============================================================ */
/* DYNAMIC 3-LINE TYPING REEL (MONKEYTYPE TELEPROMPTER STYLE) */
.typing-box {
    background: #0E1326;
    border: 2px solid rgba(46, 230, 214, 0.25);
    border-radius: 16px;
    padding: 0;
    font-family: 'JetBrains Mono', 'Noto Sans Devanagari', 'Fira Code', 'Courier New', monospace;
    font-size: 20px;
    line-height: 1.8;
    height: 110px;
    max-height: 110px;
    min-height: 110px;
    overflow: hidden !important;
    position: relative;
    cursor: text;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
}
.typing-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    position: relative;
    will-change: transform;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.typing-box::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.typing-box:focus-within,
.typing-box.is-focused {
    border-color: rgba(46, 230, 214, 0.6);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 20px rgba(46, 230, 214, 0.25);
}
.typing-box.has-error {
    border-color: #FF3D6E !important;
    box-shadow: inset 0 2px 10px rgba(255, 61, 110, 0.15), 0 0 24px rgba(255, 61, 110, 0.35) !important;
    animation: boxShake 0.25s ease;
}
@keyframes boxShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

/* Word tokens */
.typing-word {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 4px;
    border-radius: 8px;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
    transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.typing-word.passed-hidden,
.typing-word.stream-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}
.typing-word.passed-tail {
    opacity: 0.22 !important;
    color: #64748B !important;
    border: 1px solid transparent;
}
.typing-word.completed {
    opacity: 0 !important;
    visibility: hidden !important;
}
.typing-word.active {
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid rgba(46, 230, 214, 0.45);
    box-shadow: 0 0 16px rgba(46, 230, 214, 0.2);
    border-radius: 8px;
    opacity: 1 !important;
    z-index: 2;
}
.typing-word.active.has-error {
    background: rgba(255, 61, 110, 0.2) !important;
    border-color: rgba(255, 61, 110, 0.7) !important;
    box-shadow: 0 0 20px rgba(255, 61, 110, 0.4) !important;
}
.typing-word.upcoming {
    color: #94A3B8;
    opacity: 0.8;
}

/* Character states */
.typing-char {
    display: inline;
    position: relative;
    transition: color 0.08s ease, background-color 0.08s ease;
}
.typing-char.correct {
    color: #3BE38B;
    text-shadow: 0 0 8px rgba(59, 227, 139, 0.45);
}
.typing-char.current {
    color: #FFFFFF;
    font-weight: 800;
}
.typing-char.current::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3.5px;
    background: #2EE6D6;
    border-radius: 3px;
    box-shadow: 0 0 10px #2EE6D6, 0 0 20px #2EE6D6;
    animation: caretBlink 0.9s ease-in-out infinite alternate;
}
@keyframes caretBlink {
    0% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0.25; transform: scaleY(0.7); }
}
.typing-char.error {
    color: #FFFFFF;
    background: #FF3D6E;
    border-radius: 4px;
    padding: 0 3px;
    box-shadow: 0 0 12px rgba(255, 61, 110, 0.8);
    font-weight: 800;
    animation: errorPulse 0.3s ease;
}
@keyframes errorPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.typing-char.pending {
    color: #CBD5E1;
}
.typing-char.space-char {
    display: inline-block;
    min-width: 8px;
}
.typing-char.space-char.error {
    background: rgba(255, 61, 110, 0.6);
    min-width: 12px;
}

/* Backward compatibility spans fallback */
.text-done { color: #4C5577; }
.text-error { background: #FF3D6E; color: #fff; font-weight: 900; border-radius: 4px; padding: 0 3px; }
.text-current { background: rgba(46, 230, 214, 0.2); color: #2EE6D6; font-weight: 800; border-bottom: 2px solid #2EE6D6; }
.text-remaining { color: #CBD5E1; }
.touch-keys {
    display: flex;
    gap: 8px;
}
.touch-key {
    height: 44px;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.touch-key.backspace {
    background: var(--color-red);
    color: #fff;
    padding: 0 14px;
}
.touch-key.space {
    flex: 1;
    background: var(--bg-surface-high);
    color: var(--color-cyan);
}
.touch-key.focus {
    width: 44px;
    background: var(--bg-surface-high);
    color: #fff;
    font-size: 18px;
}
#hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* RESULTS */
#screen-results h1 {
    font-size: 34px;
    font-weight: 900;
    font-style: italic;
    color: var(--color-yellow);
    text-align: center;
    margin-top: 8px;
}
#res-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
    margin-bottom: 16px;
}
.stats-grid {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.stat-card {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
}
.stat-card small {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--color-muted);
}
.stat-card strong {
    font-size: 18px;
    font-weight: 900;
}
.accent-orange { color: var(--color-orange); }
.accent-cyan { color: var(--color-cyan); }
.accent-green { color: var(--color-green); }
.accent-yellow { color: var(--color-yellow); }

.xp-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 14px;
}
.xp-card-header {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 6px;
}
.standings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}
.standing-row {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.standing-row.is-player {
    background: var(--bg-surface-high);
    border-color: var(--color-green);
}
.standing-rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
    background: var(--bg-deep);
    margin-right: 8px;
}
.standing-rank.gold { background: #FFD45C; color: #000; }
.standing-rank.silver { background: #CBD5E1; color: #000; }
.standing-rank.bronze { background: #E29A5B; color: #000; }
.bot-tag {
    background: rgba(255, 201, 60, 0.2);
    color: var(--color-yellow);
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}
.results-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* GARAGE */
.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.icon-back {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}
.garage-preview-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
}
.garage-preview-card h3 {
    margin-top: 8px;
    color: var(--color-yellow);
    font-weight: 900;
}
.garage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.car-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}
.car-card.selected {
    border: 2px solid var(--color-orange);
    background: var(--bg-surface-high);
}
.car-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* STATS */
.stats-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px;
}
.hidden { display: none !important; }
.modal.hidden { display: none !important; }
.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 24px;
    width: 92%;
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

/* ONLINE BUTTON & MULTIPLAYER */
.btn-online {
    background: linear-gradient(135deg, #00F0FF, #00A3FF);
    color: #060919;
    border: none;
    border-radius: 14px;
    padding: 15px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
    transition: transform 0.1s, filter 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-online:active { transform: scale(0.98); }

.online-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.btn-online-action {
    background: var(--color-cyan);
    color: #060919;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}
.join-room-row {
    display: flex;
    gap: 8px;
    width: 100%;
}
.join-room-row input {
    flex: 1;
    background: var(--bg-deep);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 2px;
}
.join-room-row button {
    padding: 10px 18px;
    font-size: 13px;
}

.room-code-badge {
    background: var(--bg-surface);
    border: 2px solid var(--color-cyan);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    text-align: center;
}
.room-code-badge h1 {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--color-cyan);
    margin: 4px 0;
}

.lobby-players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.lobby-player-row {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lobby-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lobby-player-num {
    width: 24px;
    height: 24px;
    background: var(--color-cyan);
    color: #060919;
    font-weight: 900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.guest-msg {
    margin-top: 16px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
}
.error-card {
    background: rgba(255, 75, 75, 0.2);
    border: 1px solid var(--color-red);
    color: var(--color-red);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    width: 100%;
    margin-bottom: 12px;
}

/* WIKIPEDIA TOPIC BADGE */
.wiki-badge {
    background: rgba(18, 25, 44, 0.85);
    border: 1px solid rgba(255, 201, 60, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    color: var(--color-yellow);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
}
.wiki-badge strong {
    color: #fff;
}
.wiki-badge span {
    color: var(--color-yellow);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--stroke);
    border-top-color: var(--color-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-top: 20px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: stretch;
    }
    .mobile-frame {
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: none;
        border-radius: 0;
    }
}

/* ============================================================ */
/* COIN BADGES & PROFILE STATS ROW                              */
/* ============================================================ */
.coin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 201, 60, 0.15), rgba(255, 106, 61, 0.1));
    border: 1px solid rgba(255, 201, 60, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    color: var(--color-yellow);
}
.coin-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(255, 201, 60, 0.6));
}
.coin-add-btn {
    background: var(--color-yellow);
    color: #111;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 13px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease;
}
.coin-add-btn:active {
    transform: scale(0.9);
}

.profile-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 10px 0;
    gap: 8px;
}
.trophy-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(46, 230, 214, 0.08);
    border: 1px solid rgba(46, 230, 214, 0.3);
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
}
.trophy-pill strong {
    color: var(--color-yellow);
    font-weight: 900;
}
.country-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.league-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
.league-bronze { background: rgba(205, 127, 50, 0.3); color: #E5A663; border: 1px solid #CD7F32; }
.league-silver { background: rgba(192, 192, 192, 0.3); color: #E0E0E0; border: 1px solid #C0C0C0; }
.league-gold { background: rgba(255, 215, 0, 0.3); color: #FFD700; border: 1px solid #FFD700; }
.league-plat { background: rgba(46, 230, 214, 0.3); color: #2EE6D6; border: 1px solid #2EE6D6; }
.league-diamond { background: rgba(181, 123, 255, 0.3); color: #C9A0FF; border: 1px solid #B57BFF; }
.league-master { background: linear-gradient(135deg, #FF3D6E, #FF6A3D); color: #FFF; }

.bottom-nav .accent-nav {
    border-color: rgba(46, 230, 214, 0.5);
    color: var(--color-cyan);
}
.bottom-nav .gold-nav {
    border-color: rgba(255, 201, 60, 0.5);
    color: var(--color-yellow);
}

/* RESULTS REWARD ROW */
.rewards-row {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}
.reward-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
}
.coins-pill {
    background: rgba(255, 201, 60, 0.12);
    border: 1px solid rgba(255, 201, 60, 0.4);
    color: var(--color-yellow);
}
.trophies-pill {
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid rgba(46, 230, 214, 0.4);
    color: var(--color-cyan);
}

/* ============================================================ */
/* LEADERBOARD & PODIUM STYLES                                  */
/* ============================================================ */
.lb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.lb-tab-btn {
    flex: 1;
    padding: 10px 4px;
    border: 1px solid var(--stroke);
    background: var(--bg-surface);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lb-tab-btn.active {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 106, 61, 0.35);
}

.lb-country-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.lb-country-bar::-webkit-scrollbar { display: none; }
.country-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    color: var(--color-text);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.country-chip.active {
    background: var(--color-cyan);
    color: #080B1A;
    border-color: var(--color-cyan);
    font-weight: 900;
}

/* 3D PODIUM */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 18px 8px 10px 8px;
    margin-bottom: 14px;
    background: radial-gradient(circle at 50% 20%, rgba(255, 201, 60, 0.12) 0%, transparent 70%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.podium-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.podium-crown {
    font-size: 20px;
    margin-bottom: -4px;
    animation: bounceCrown 1.8s infinite ease-in-out;
}
@keyframes bounceCrown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.podium-avatar-wrapper {
    position: relative;
    margin-bottom: 4px;
}
.podium-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface-high);
    border: 2px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
}
.gold-avatar {
    width: 52px;
    height: 52px;
    border-color: #FFD700;
    background: linear-gradient(135deg, #FF6A3D, #FFD23C);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}
.podium-medal {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 14px;
}
.podium-name {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-text);
    max-width: 90px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.gold-name {
    color: #FFD700;
    font-size: 12px;
}
.podium-trophies {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-muted);
    margin-bottom: 6px;
}
.gold-trophies {
    color: #FFE082;
    font-weight: 800;
}
.podium-pillar {
    width: 100%;
    border-radius: 10px 10px 4px 4px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.pillar-rank {
    font-size: 18px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.7);
}
.pillar-gold {
    height: 80px;
    background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%);
    border: 1px solid #FFE57F;
}
.pillar-silver {
    height: 55px;
    background: linear-gradient(180deg, #D9E2EC 0%, #627D98 100%);
    border: 1px solid #F0F4F8;
}
.pillar-bronze {
    height: 40px;
    background: linear-gradient(180deg, #E5A663 0%, #8C4B1E 100%);
    border: 1px solid #F6C898;
}

/* LEAGUE PROGRESS CARD */
.league-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.league-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.league-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.league-icon {
    font-size: 24px;
}
.league-info strong {
    font-size: 14px;
    display: block;
}
.league-info small {
    font-size: 11px;
    color: var(--color-muted);
}
.league-badge-pill {
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--color-cyan);
}
.league-bar-bg {
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.league-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-yellow));
    border-radius: 4px;
    transition: width 0.4s ease;
}
.league-next-info {
    font-size: 10px;
    color: var(--color-muted);
    text-align: right;
}

/* LEADERBOARD LIST */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 60px;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    padding: 8px 12px;
    border-radius: 14px;
    transition: transform 0.15s ease;
}
.lb-row.me {
    border-color: var(--color-cyan);
    background: rgba(46, 230, 214, 0.08);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.2);
}
.lb-rank-num {
    font-size: 13px;
    font-weight: 900;
    width: 24px;
    text-align: center;
    color: var(--color-muted);
}
.lb-rank-num.top-1 { color: #FFD700; font-size: 16px; }
.lb-rank-num.top-2 { color: #E0E0E0; font-size: 15px; }
.lb-rank-num.top-3 { color: #CD7F32; font-size: 15px; }
.lb-avatar-box {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}
.lb-user-details {
    flex: 1;
    overflow: hidden;
}
.lb-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lb-username {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-flag {
    font-size: 12px;
}
.lb-sub-info {
    font-size: 10px;
    color: var(--color-muted);
}
.lb-stats-box {
    text-align: right;
    flex-shrink: 0;
}
.lb-trophies-val {
    font-size: 13px;
    font-weight: 900;
    color: var(--color-yellow);
    display: block;
}
.lb-wpm-val {
    font-size: 10px;
    color: var(--color-muted);
}

/* STICKY MY RANK CARD */
.my-rank-sticky {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    background: linear-gradient(135deg, #1A2147, #232B5C);
    border: 2px solid var(--color-cyan);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.6);
    z-index: 10;
}
.my-rank-badge {
    width: 32px;
    height: 32px;
    background: var(--color-cyan);
    color: #080B1A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}
.my-rank-info {
    flex: 1;
}
.my-rank-info strong {
    font-size: 13px;
    display: block;
}
.my-rank-info small {
    font-size: 11px;
    color: var(--color-muted);
}
.my-rank-score {
    font-size: 15px;
    font-weight: 900;
    color: var(--color-yellow);
}

/* ============================================================ */
/* SHOP SCREEN STYLES                                           */
/* ============================================================ */
.shop-balance-card {
    background: linear-gradient(135deg, rgba(255, 201, 60, 0.15), rgba(255, 106, 61, 0.15));
    border: 1px solid rgba(255, 201, 60, 0.4);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.shop-balance-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.shop-coin-big {
    font-size: 36px;
    filter: drop-shadow(0 0 10px rgba(255, 201, 60, 0.6));
}
.shop-balance-left small {
    font-size: 10px;
    color: var(--color-muted);
    font-weight: 800;
    letter-spacing: 0.5px;
}
.shop-balance-left h2 {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-yellow);
}
.btn-micro {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.shop-packs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}
.shop-pack-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.shop-pack-card.featured {
    border-color: rgba(255, 106, 61, 0.6);
    background: linear-gradient(180deg, rgba(255, 106, 61, 0.1) 0%, var(--bg-surface) 100%);
    box-shadow: 0 4px 20px rgba(255, 106, 61, 0.2);
}
.pack-badge {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 9px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-muted);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
.pack-badge.popular {
    background: var(--color-orange);
    color: #fff;
}
.pack-badge.bonus {
    background: var(--color-green);
    color: #052615;
}
.pack-badge.super {
    background: var(--color-yellow);
    color: #2b1f03;
}
.pack-badge.vip {
    background: linear-gradient(135deg, #B57BFF, #FF3D7F);
    color: #fff;
}
.pack-coins-visual {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-yellow);
}
.pack-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}
.pack-desc {
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.4;
    margin-bottom: 6px;
}
.btn-buy-pack {
    background: var(--bg-surface-high);
    border: 1px solid var(--color-yellow);
    color: var(--color-yellow);
    font-size: 14px;
    font-weight: 900;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    align-self: flex-start;
    min-width: 110px;
}
.btn-buy-pack:active {
    transform: scale(0.96);
}
.btn-buy-pack.btn-featured {
    background: linear-gradient(135deg, var(--color-orange), var(--color-yellow));
    color: #080B1A;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 106, 61, 0.4);
}

/* GOOGLE PLAY MODAL */
.play-store-card {
    background: #202124 !important;
    border-radius: 24px 24px 0 0 !important;
    border: 1px solid #3c4043 !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px !important;
    animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.play-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.play-logo {
    font-size: 13px;
    font-weight: 700;
    color: #9aa0a6;
    letter-spacing: 0.5px;
}
.play-close {
    background: none;
    border: none;
    color: #9aa0a6;
    font-size: 18px;
    cursor: pointer;
}
.play-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #3c4043;
    border-bottom: 1px solid #3c4043;
    margin-bottom: 14px;
}
.play-app-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    background: #303134;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-product-row h4 {
    font-size: 14px;
    color: #e8eaed;
}
.play-product-row small {
    font-size: 11px;
    color: #9aa0a6;
}
.play-price-tag {
    margin-left: auto;
    font-size: 16px;
    color: #8ab4f8;
}
.play-payment-method {
    background: #303134;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #e8eaed;
    margin-bottom: 16px;
}
.play-payment-method small {
    color: #81c995;
    font-weight: 700;
}
.btn-play-confirm {
    width: 100%;
    background: #8ab4f8;
    color: #202124;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.btn-play-confirm:active {
    background: #aecbfa;
}
.play-disclaimer {
    font-size: 10px;
    color: #80868b;
    text-align: center;
    margin-top: 10px;
}

/* ============================================================ */
/* GARAGE IMPROVEMENTS                                          */
/* ============================================================ */
.garage-coin-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 201, 60, 0.15);
    border: 1px solid rgba(255, 201, 60, 0.4);
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-yellow);
}
.status-equipped {
    font-size: 10px;
    font-weight: 900;
    background: var(--color-green);
    color: #052615;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 4px;
}
.car-card-price-tag {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 900;
    color: var(--color-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}


/* ============================================================ */
/* DESKTOP WEBSITE & CROSS-PLATFORM PC PORTAL STYLES (v3.0)     */
/* ============================================================ */

/* SITE HEADER NAVBAR */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 11, 26, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(44, 55, 112, 0.6);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}
.brand-logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(255, 106, 61, 0.6));
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.brand-titles {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-size: 22px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1;
}
.brand-name .accent-orange {
    color: var(--color-orange);
    text-shadow: 0 0 14px rgba(255, 106, 61, 0.6);
}
.brand-tag {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--color-cyan);
    margin-top: 3px;
}

/* DESKTOP NAV LINKS */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
}
.desktop-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.nav-link {
    background: transparent;
    border: none;
    color: var(--color-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
    color: var(--color-cyan);
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid rgba(46, 230, 214, 0.35);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.2);
}
.nav-icon {
    font-size: 14px;
}
.badge-count {
    background: var(--color-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
}

/* NAV MORE DROPDOWN */
.nav-more-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.nav-more-trigger {
    cursor: pointer;
    position: relative;
    gap: 4px !important;
}
.nav-chevron {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s;
}
.nav-more-dropdown-wrapper:hover .nav-chevron,
.nav-more-dropdown-wrapper.open .nav-chevron {
    transform: rotate(180deg);
}
.nav-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 175px;
    background: #0D1322;
    border: 1px solid rgba(46, 230, 214, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
    backdrop-filter: blur(14px);
    animation: fadeInMenu 0.15s ease-out;
}
.nav-more-menu.hidden {
    display: none !important;
}
.nav-more-item {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}
.nav-more-item:hover {
    background: rgba(46, 230, 214, 0.12);
    color: #2EE6D6;
}

/* HEADER ACTIONS & CONTROLS (AIRY & CLEAN) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.server-status-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(59, 227, 139, 0.1);
    border: 1px solid rgba(59, 227, 139, 0.3);
    color: var(--color-green);
    cursor: default;
    transition: all 0.2s;
    padding: 0;
}
.server-status-pill .server-status-text {
    display: none;
}
.server-status-pill.offline {
    background: rgba(255, 77, 109, 0.12);
    border-color: rgba(255, 77, 109, 0.4);
    color: var(--color-red);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* UNIFIED PLAYER STATS BAR */
.header-player-stats-bar {
    display: flex;
    align-items: center;
    background: rgba(13, 19, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 4px 10px;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.stats-badge-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    cursor: default;
    white-space: nowrap;
}
.stats-badge-separator {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
}
.stats-badge-item strong {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}
.streak-badge {
    color: #FF9F43;
}
.coin-badge {
    color: #FFC93C;
}
.trophy-badge {
    color: #8B5CF6;
}

/* QUICK SETTINGS DROPDOWN */
.settings-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.settings-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 275px;
    background: #0D1322;
    border: 1px solid rgba(46, 230, 214, 0.3);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    padding: 14px;
    z-index: 1000;
    backdrop-filter: blur(16px);
    animation: fadeInMenu 0.18s ease-out;
}
.settings-popover.hidden {
    display: none !important;
}
.settings-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}
.settings-close-btn {
    background: transparent;
    border: none;
    color: var(--color-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}
.settings-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.settings-popover-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.settings-row-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.settings-row-title {
    font-size: 12px;
    font-weight: 800;
    color: #E2E8F0;
}
.settings-row-desc {
    font-size: 10px;
    color: var(--color-muted);
}
.settings-toggle-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.settings-toggle-chip:hover {
    background: rgba(46, 230, 214, 0.15);
    border-color: rgba(46, 230, 214, 0.4);
    color: #2EE6D6;
}
@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
}
.mini-add-btn {
    background: var(--color-green);
    color: #000;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}
.audio-control-group, .view-switcher-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.icon-toggle-btn {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.icon-toggle-btn:hover {
    border-color: var(--color-cyan);
    background: var(--bg-surface-high);
}
.view-switch-btn {
    background: linear-gradient(135deg, rgba(46, 230, 214, 0.15), rgba(139, 92, 255, 0.15));
    border: 1px solid rgba(46, 230, 214, 0.4);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.view-switch-btn:hover {
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.3);
}

.lang-switch-btn {
    background: linear-gradient(135deg, rgba(255, 106, 61, 0.15), rgba(255, 201, 60, 0.15));
    border: 1px solid rgba(255, 106, 61, 0.45);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.lang-switch-btn:hover {
    border-color: var(--color-orange);
    box-shadow: 0 0 12px rgba(255, 106, 61, 0.4);
    transform: scale(1.04);
}

#auth-header-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-login-header {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 900;
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 106, 61, 0.4);
    transition: all 0.2s;
}
.btn-login-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 106, 61, 0.6);
}
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.user-profile-badge:hover {
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.25);
    transform: translateY(-1px);
}
.country-flag-img {
    display: inline-block;
    vertical-align: middle;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.25);
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.user-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    cursor: pointer;
}
.user-profile-badge:hover .user-flag-badge {
    transform: scale(1.15);
    border-color: rgba(46, 230, 214, 0.5);
    background: rgba(46, 230, 214, 0.15);
}
.avatar-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}
.user-meta {
    display: flex;
    flex-direction: column;
}
.user-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.user-meta span {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
}
.user-edit-icon {
    font-size: 10px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.user-profile-badge:hover .user-edit-icon {
    opacity: 1;
}
.user-id-tag {
    font-size: 9px;
    font-weight: 700;
    color: var(--color-cyan);
    letter-spacing: 0.5px;
    font-family: monospace;
}
.user-sub-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-provider-tag {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: var(--color-cyan);
    letter-spacing: 0.4px;
}

/* ============================================================ */
/* SITE MAIN & RESPONSIVE APP-FRAME                             */
/* ============================================================ */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 20px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-portal {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* PC WIDESCREEN MODE (DEFAULT) */
body.mode-pc .app-frame {
    width: 100%;
    max-width: 1400px;
    min-height: 820px;
    height: auto;
    max-height: none;
    border-radius: 24px;
    border: 2px solid var(--stroke);
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-night) 100%);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(46, 230, 214, 0.12);
}
body.mode-pc #mobile-status-bar {
    display: none !important;
}

/* MOBILE SIMULATOR MODE */
body.mode-mobile .app-frame {
    width: 100%;
    max-width: 440px;
    height: 900px;
    max-height: 94vh;
    border-radius: 40px;
    border: 3px solid var(--stroke);
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-night) 100%);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(46, 230, 214, 0.15);
    margin: 16px auto;
}
body.mode-mobile #mobile-status-bar {
    display: flex !important;
}

/* ============================================================ */
/* HOME SCREEN ENHANCEMENTS (PC WIDESCREEN HERO)                 */
/* ============================================================ */
.home-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(21, 27, 61, 0.8), rgba(14, 19, 48, 0.9));
    border: 1px solid rgba(44, 55, 112, 0.7);
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.home-hero-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 106, 61, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.hero-left {
    flex: 1.2;
}
.hero-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--color-cyan);
    margin-bottom: 8px;
}
.hero-title {
    font-size: 32px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #FFFFFF, #FFE0D1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-muted);
    margin-bottom: 20px;
    max-width: 600px;
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-hero-primary {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    border: none;
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 8px 24px rgba(255, 106, 61, 0.4);
    transition: all 0.25s ease;
}
.btn-hero-primary span { font-size: 16px; font-weight: 900; }
.btn-hero-primary small { font-size: 11px; opacity: 0.85; font-weight: 600; }
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 106, 61, 0.6);
}

.btn-hero-online {
    background: linear-gradient(135deg, #12284C, #183C66);
    border: 1.5px solid var(--color-cyan);
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 8px 24px rgba(46, 230, 214, 0.2);
    transition: all 0.25s ease;
}
.btn-hero-online span { font-size: 16px; font-weight: 900; color: var(--color-cyan); }
.btn-hero-online small { font-size: 11px; opacity: 0.85; font-weight: 600; }
.btn-hero-online:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(46, 230, 214, 0.4);
}

.btn-hero-secondary {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.25s;
}
.btn-hero-secondary span { font-size: 15px; font-weight: 800; }
.btn-hero-secondary small { font-size: 11px; color: var(--color-muted); }
.btn-hero-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--color-muted);
}

/* CAR SHOWCASE 3D STAGE */
.hero-right {
    flex: 0.9;
    display: flex;
    justify-content: center;
}
.car-stage-card {
    position: relative;
    background: radial-gradient(circle at center, rgba(30, 38, 82, 0.9) 0%, rgba(14, 19, 48, 0.9) 100%);
    border: 1.5px solid rgba(46, 230, 214, 0.35);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}
.car-stage-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--color-cyan);
    box-shadow: 0 20px 50px rgba(46, 230, 214, 0.25);
}
.stage-glow {
    position: absolute;
    bottom: 50px;
    width: 220px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(46, 230, 214, 0.4) 0%, transparent 70%);
    filter: blur(10px);
}
.stage-info {
    margin-top: 10px;
    text-align: center;
}
.car-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.car-title-row h3 {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
}
.car-level-badge {
    font-size: 9px;
    font-weight: 900;
    background: var(--color-orange);
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
}
.stage-info p {
    font-size: 11px;
    color: var(--color-cyan);
    font-weight: 700;
    margin-top: 4px;
}

/* HOME DASHBOARD 3-COLUMN GRID */
.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.dash-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dash-card-header h3 {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--color-muted);
}
.country-chip-badge {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}
.xp-bar-container {
    margin: 12px 0;
}
.xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-muted);
    font-weight: 700;
    margin-bottom: 4px;
}
.profile-auth-prompt {
    margin-top: 14px;
    padding: 8px 12px;
    background: rgba(255, 201, 60, 0.08);
    border: 1px dashed rgba(255, 201, 60, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-yellow);
}
.btn-micro-link {
    background: none;
    border: none;
    color: var(--color-cyan);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
}

/* DIFFICULTY PICKER GRID */
.diff-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.diff-picker-grid .diff-btn {
    padding: 12px 8px;
    border-radius: 12px;
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: var(--color-muted);
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.diff-picker-grid .diff-btn strong { display: block; font-size: 13px; font-weight: 900; }
.diff-picker-grid .diff-btn small { font-size: 10px; opacity: 0.8; }
.diff-picker-grid .diff-btn.active {
    background: rgba(46, 230, 214, 0.15);
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    box-shadow: 0 0 14px rgba(46, 230, 214, 0.2);
}

.custom-room-shortcut-box {
    margin-top: auto;
    padding: 14px;
    background: linear-gradient(135deg, rgba(30, 38, 82, 0.6), rgba(21, 27, 61, 0.8));
    border: 1px solid var(--stroke);
    border-radius: 14px;
}
.shortcut-text h4 { font-size: 13px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.shortcut-text p { font-size: 11px; color: var(--color-muted); margin-bottom: 10px; line-height: 1.4; }
.btn-accent-glow {
    width: 100%;
    background: linear-gradient(135deg, var(--color-cyan), #0099FF);
    border: none;
    color: #03050C;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 230, 214, 0.3);
    transition: all 0.2s;
}
.btn-accent-glow:hover {
    box-shadow: 0 6px 20px rgba(46, 230, 214, 0.5);
}

/* CHAMPIONS LIST PREVIEW */
.top-champions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.champ-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-surface-high);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.champ-row.gold { border-color: rgba(255, 201, 60, 0.4); background: rgba(255, 201, 60, 0.08); }
.champ-row.silver { border-color: rgba(180, 190, 210, 0.3); }
.champ-row.bronze { border-color: rgba(205, 127, 50, 0.3); }
.champ-name { font-size: 12px; font-weight: 800; color: #fff; flex: 1; }
.champ-score { font-size: 12px; font-weight: 900; color: var(--color-yellow); }

.my-current-standing-box {
    margin-top: auto;
    padding: 10px 14px;
    background: rgba(46, 230, 214, 0.08);
    border: 1px solid rgba(46, 230, 214, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.my-rank-left small { font-size: 9px; font-weight: 800; color: var(--color-muted); display: block; }
.my-rank-left strong { font-size: 18px; font-weight: 900; color: var(--color-yellow); }
.my-rank-right span { font-size: 14px; font-weight: 900; color: var(--color-cyan); display: block; text-align: right; }
.my-rank-right small { font-size: 11px; color: var(--color-muted); display: block; text-align: right; }

/* ============================================================ */
/* RACE SCREEN WIDESCREEN ENHANCEMENTS                          */
/* ============================================================ */
body.mode-pc .track-container {
    height: 380px !important;
    border-radius: 20px;
}
.race-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--stroke);
    margin-bottom: 12px;
}
.hud-center {
    display: flex;
    align-items: center;
    gap: 14px;
}
.race-streak-pill {
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 106, 61, 0.15);
    border: 1px solid rgba(255, 106, 61, 0.4);
    font-size: 12px;
    color: var(--color-orange);
}
.timer-box {
    text-align: right;
    margin-right: 10px;
}
.timer-box span {
    font-size: 20px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    display: block;
    line-height: 1;
}
.timer-box small { font-size: 9px; font-weight: 800; color: var(--color-muted); }

/* WIDE TYPING CONTAINER */
.typing-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.track-theme-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-cyan);
    padding: 4px 10px;
    background: rgba(46, 230, 214, 0.1);
    border: 1px solid rgba(46, 230, 214, 0.25);
    border-radius: 8px;
}
body.mode-pc .typing-box {
    font-size: 21px !important;
    line-height: 1.8 !important;
    height: 115px !important;
    max-height: 115px !important;
    min-height: 115px !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}
.keyboard-helper-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.pc-tips {
    font-size: 11px;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tip-key {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 10px;
}

/* ============================================================ */
/* CUSTOM ROOMS SCREEN                                          */
/* ============================================================ */
.custom-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 14px;
}
.custom-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 22px;
}
.custom-card h3 {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}
.custom-card p {
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 18px;
}
.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-group label {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    letter-spacing: 0.5px;
}
.form-group input, .form-group select {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(46, 230, 214, 0.25);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.full-width {
    width: 100%;
}
.join-code-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.join-code-box input {
    flex: 1;
    background: var(--bg-surface-high);
    border: 1.5px solid var(--stroke);
    border-radius: 12px;
    padding: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}
.join-code-box input:focus {
    border-color: var(--color-cyan);
}
.quick-match-box {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.quick-match-box h4 {
    font-size: 13px;
    font-weight: 900;
    color: var(--color-cyan);
    margin-bottom: 4px;
}

/* ============================================================ */
/* FRIENDS SCREEN STYLES                                        */
/* ============================================================ */
.friends-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.friends-search-bar input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
}
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.friend-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 12px 16px;
}
.friend-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.friend-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.friend-info strong { font-size: 14px; color: #fff; display: block; }
.friend-info small { font-size: 11px; color: var(--color-muted); }
.status-pill {
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 8px;
}
.status-pill.online { background: rgba(59, 227, 139, 0.15); color: var(--color-green); }
.status-pill.racing { background: rgba(255, 106, 61, 0.15); color: var(--color-orange); }
.status-pill.offline { background: rgba(255, 255, 255, 0.08); color: var(--color-muted); }

/* ============================================================ */
/* DOWNLOADS SCREEN                                             */
/* ============================================================ */
.downloads-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.download-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.os-icon { font-size: 48px; margin-bottom: 12px; }
.download-card h3 { font-size: 18px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.download-card p { font-size: 12px; color: var(--color-muted); line-height: 1.5; margin-bottom: 16px; }
.features-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--color-cyan);
    font-weight: 700;
}
.btn-download-apk {
    background: linear-gradient(135deg, #3BE38B, #0DAA54);
    color: #03050C;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 900;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(59, 227, 139, 0.3);
}
.btn-download-ios {
    background: linear-gradient(135deg, #0099FF, #6A4BC4);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 900;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.3);
}

/* ============================================================ */
/* RULES & KEYBOARD SHORTCUTS SCREEN                            */
/* ============================================================ */
.rules-card {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 24px;
}
.rules-card h3 {
    font-size: 15px;
    font-weight: 900;
    color: var(--color-yellow);
    margin: 16px 0 6px 0;
}
.rules-card h3:first-child { margin-top: 0; }
.rules-card p {
    font-size: 13px;
    color: #CAD0EC;
    line-height: 1.6;
}
.shortcuts-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.shortcut-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-surface-high);
    padding: 8px 12px;
    border-radius: 8px;
}
.shortcut-row kbd {
    background: #000;
    border: 1px solid var(--stroke);
    color: var(--color-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}
.shortcut-row span {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}

/* ============================================================ */
/* AUTHENTICATION MODAL (GOOGLE, FACEBOOK, INVITÉ)               */
/* ============================================================ */
.auth-card {
    max-width: 440px;
    padding: 28px;
    text-align: center;
}
.auth-card {
    max-width: 480px;
    width: 92%;
    background: linear-gradient(135deg, rgba(14, 18, 38, 0.98), rgba(22, 28, 54, 0.98));
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(0, 240, 255, 0.18);
    border-radius: 20px;
    padding: 26px 24px 22px 24px;
    animation: authModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
@keyframes authModalPop {
    from { transform: scale(0.93) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-header {
    position: relative;
    margin-bottom: 20px;
    text-align: center;
}
.auth-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--color-cyan);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.auth-header h2 {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 4px 0;
}
.auth-header p {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.modal-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close-btn:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.6);
    transform: scale(1.08);
}

.auth-options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.btn-oauth {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-radius: 14px;
    border: none;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
    user-select: none;
}
.oauth-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.oauth-text-col {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.oauth-main-label {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}
.oauth-sub-label {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.78;
    margin-top: 2px;
}
.oauth-arrow {
    font-size: 14px;
    font-weight: 900;
    opacity: 0.5;
    transition: transform 0.2s, opacity 0.2s;
}
.btn-oauth:hover .oauth-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.btn-google {
    background: #FFFFFF;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.auth-divider {
    position: relative;
    margin: 12px 0 8px 0;
    text-align: center;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.auth-divider span {
    position: relative;
    background: #111630;
    padding: 0 12px;
    font-size: 10px;
    color: var(--color-muted);
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.guest-auth-box {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(139, 92, 255, 0.05));
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.03);
}
.guest-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.guest-badge-pill {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 153, 255, 0.2));
    color: var(--color-cyan);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    border: 1px solid rgba(0, 240, 255, 0.35);
}
.guest-loc-hint {
    font-size: 11px;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.guest-loc-hint strong {
    font-size: 15px;
}
.guest-auth-box label {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    display: block;
    margin-bottom: 6px;
}
.guest-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.guest-input-with-flag {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0 12px;
    flex: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.guest-input-with-flag:focus-within {
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}
.guest-flag-prefix {
    font-size: 18px;
    margin-right: 8px;
    user-select: none;
}
.guest-input-with-flag input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    padding: 11px 0;
}
.btn-launch-guest {
    background: linear-gradient(135deg, var(--color-cyan), #0099ff);
    color: #000 !important;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.3px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 240, 255, 0.35);
    transition: all 0.2s;
}
.btn-launch-guest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.55);
}
.guest-perks-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--color-muted);
    font-weight: 600;
    padding-top: 4px;
}
/* ============================================================ */
/* EXPANDABLE GAMER TAG RESTORE DRAWER & TRANSFER SYSTEM        */
/* ============================================================ */
.auth-transfer-section {
    margin-top: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-top: 10px;
}
.btn-toggle-restore {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-toggle-restore:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.35);
    color: #fff;
}
.btn-toggle-restore.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.5);
    color: var(--color-cyan);
}
.transfer-btn-text {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
}
.transfer-icon {
    font-size: 14px;
}
.accordion-chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}
.btn-toggle-restore.active .accordion-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--color-cyan);
}

.restore-drawer {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin-top 0.3s ease;
    max-height: 240px;
    opacity: 1;
    margin-top: 10px;
}
.restore-drawer.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    pointer-events: none;
}
.restore-inner-card {
    background: linear-gradient(135deg, rgba(14, 20, 42, 0.95), rgba(22, 32, 64, 0.95));
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.06);
    border-radius: 14px;
    padding: 14px;
    text-align: left;
}
.restore-hint {
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.45;
    margin-bottom: 10px;
}
.restore-hint strong {
    color: var(--color-cyan);
}
.restore-hint code {
    background: rgba(0, 240, 255, 0.15);
    color: var(--color-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 700;
}
.restore-input-row {
    display: flex;
    gap: 8px;
}
.restore-input-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Outfit', monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    outline: none;
    transition: all 0.2s;
}
.restore-input-row input:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
    background: rgba(0, 0, 0, 0.7);
}
.btn-restore-action {
    background: linear-gradient(135deg, var(--color-cyan), #0099ff);
    color: #000 !important;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 900;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 240, 255, 0.35);
    transition: all 0.2s;
}
.btn-restore-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.55);
}
.restore-status-hint {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    line-height: 1.35;
}
.restore-status-hint.info {
    background: rgba(0, 240, 255, 0.12);
    color: var(--color-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}
.restore-status-hint.success {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}
.restore-status-hint.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ============================================================ */
/* OFFICIAL DRIVER GAMER TAG LICENSE CARD (PROFILE MODAL)       */
/* ============================================================ */
.profile-id-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 106, 61, 0.06));
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: left;
}
.profile-id-box .id-meta-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-id-box .id-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.8px;
    color: var(--color-cyan);
    text-transform: uppercase;
}
.profile-id-box .id-val {
    font-family: 'Outfit', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1.5px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
    line-height: 1.2;
}
.profile-id-box .id-sub-hint {
    font-size: 10px;
    color: var(--color-muted);
    font-weight: 500;
    margin-top: 2px;
}
.btn-copy-tag {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.45);
    color: var(--color-cyan);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-copy-tag:hover {
    background: var(--color-cyan);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.5);
}
.btn-copy-tag.copied {
    background: rgba(52, 211, 153, 0.25) !important;
    border-color: #34d399 !important;
    color: #34d399 !important;
}
.profile-auth-switch-row {
    margin-top: 14px;
    text-align: center;
}
.btn-switch-account {
    width: 100%;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-cyan);
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
}
.btn-switch-account:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--color-cyan);
}

.auth-view {
    display: block;
    width: 100%;
    animation: fadeInView 0.25s ease-out;
}
.auth-view.hidden {
    display: none !important;
}
@keyframes fadeInView {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.oauth-provider-wrapper {
    width: 100%;
    position: relative;
}
.google-official-container {
    width: 100%;
    display: none;
    justify-content: center;
    margin: 2px 0;
}
.google-official-container iframe {
    margin: 0 auto !important;
}

.input-modern {
    width: 100%;
    background: rgba(8, 12, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 11px 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    outline: none;
    transition: all 0.2s;
}
.input-modern:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}


/* ============================================================ */
/* RESULT CARD IMAGE SHARE MODAL                                */
/* ============================================================ */
.share-card-preview-modal {
    max-width: 640px;
}
.share-canvas-wrapper {
    margin: 14px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.share-canvas-wrapper canvas {
    width: 100%;
    height: auto;
    display: block;
}
.btn-share-glow {
    background: linear-gradient(135deg, var(--color-orange), var(--color-pink));
    border: none;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 106, 61, 0.4);
}

/* ============================================================ */
/* RESPONSIVE DESIGN ADJUSTMENTS                                */
/* ============================================================ */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .desktop-nav {
        display: none !important;
    }
    .home-hero-banner {
        flex-direction: column !important;
        text-align: center !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 24px 16px !important;
        gap: 20px !important;
    }
    .hero-left {
        flex: none !important;
        width: 100% !important;
    }
    .hero-right {
        flex: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 12px !important;
    }
    .hero-title {
        font-size: 24px !important;
        line-height: 1.25 !important;
    }
    .hero-desc {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin: 0 auto 16px auto !important;
    }
    .hero-actions {
        justify-content: center !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    .btn-hero-primary, .btn-hero-online, .btn-hero-secondary {
        width: 100% !important;
        align-items: center !important;
        text-align: center !important;
        padding: 14px 16px !important;
        border-radius: 14px !important;
    }
    .hero-diff-row {
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        margin-top: 16px !important;
    }
    .hero-diff-title {
        font-size: 12px !important;
        letter-spacing: 1px !important;
    }
    .hero-diff-pills {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 400px !important;
    }
    .hero-diff-btn {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        padding: 8px 12px !important;
        border-radius: 12px !important;
        touch-action: manipulation !important;
    }
    .daily-challenge-box {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    .daily-challenge-info {
        flex-direction: column !important;
        text-align: center !important;
    }
    .daily-challenge-btn {
        width: 100% !important;
        padding: 12px !important;
    }
    .home-dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .header-pill.trophy-pill {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 74px !important;
    }
    .site-main {
        padding: 8px 8px 80px 8px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .game-portal {
        width: 100% !important;
    }
    .app-frame, 
    body.mode-mobile .app-frame, 
    body.mode-pc .app-frame {
        width: 100% !important;
        max-width: 100% !important;
        min-height: calc(100vh - 80px) !important;
        height: auto !important;
        max-height: none !important;
        border-radius: 18px !important;
        border: 1px solid var(--stroke) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
        margin: 0 auto !important;
        overflow: visible !important;
    }
    #mobile-status-bar {
        display: none !important;
    }
    .screen {
        overflow-y: visible !important;
        height: auto !important;
        padding: 12px 8px !important;
    }
    .diff-picker-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .diff-btn {
        min-height: 52px !important;
        padding: 8px 10px !important;
        touch-action: manipulation !important;
    }
    .site-header {
        padding: 6px 10px !important;
    }
    .header-container {
        padding: 2px 4px !important;
        gap: 8px !important;
    }
    .brand-titles .brand-tag {
        display: none !important;
    }
    .brand-name {
        font-size: 18px !important;
    }
    .brand-logo-icon {
        font-size: 22px !important;
    }
    .server-status-pill,
    .audio-control-group,
    .view-switcher-group,
    .header-pill.trophy-pill {
        display: none !important;
    }
    .header-actions {
        gap: 6px !important;
    }
    .header-player-stats-bar {
        padding: 3px 8px !important;
        gap: 6px !important;
    }

    /* RACE HUD ON MOBILE */
    .race-hud {
        padding: 8px !important;
        gap: 8px !important;
    }
    .speedo-box canvas {
        width: 50px !important;
        height: 50px !important;
    }
    .wpm-display span {
        font-size: 20px !important;
    }
    .typing-container {
        padding: 14px 10px !important;
    }
    .typing-box {
        font-size: 18px !important;
        line-height: 1.6 !important;
        min-height: 90px !important;
        padding: 12px !important;
    }
    .keyboard-helper-bar {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .pc-tips {
        display: none !important;
    }
    .touch-keys {
        width: 100% !important;
        display: flex !important;
        justify-content: stretch !important;
        gap: 8px !important;
    }
    .touch-key {
        flex: 1 !important;
        min-height: 48px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
    }

    /* MOBILE BOTTOM NAVIGATION BAR */
    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 64px !important;
        background: rgba(8, 11, 26, 0.98) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        border-top: 1.5px solid rgba(44, 55, 112, 0.8) !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        z-index: 99999 !important;
        padding: 4px 6px env(safe-area-inset-bottom, 4px) 6px !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7) !important;
    }
    .mobile-nav-btn {
        background: none !important;
        border: none !important;
        color: var(--color-muted) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        cursor: pointer !important;
        flex: 1 !important;
        padding: 6px 0 !important;
        transition: all 0.2s ease !important;
        border-radius: 10px !important;
        touch-action: manipulation !important;
    }
    .mobile-nav-btn .m-nav-icon {
        font-size: 20px !important;
        line-height: 1 !important;
    }
    .mobile-nav-btn.active {
        color: var(--color-orange) !important;
        background: rgba(255, 106, 61, 0.15) !important;
    }
    .mobile-nav-btn.active .m-nav-icon {
        transform: scale(1.15) !important;
    }

    /* COMPACT COOKIE BANNER ON MOBILE */
    .cookie-consent-banner {
        bottom: 74px !important;
        padding: 12px 14px !important;
        border-radius: 14px !important;
        width: min(96vw, 420px) !important;
    }
    .cookie-icon-col {
        display: none !important;
    }
    .cookie-text-col h4 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    .cookie-text-col p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        line-height: 1.4 !important;
    }
    .cookie-actions-col {
        flex-direction: row !important;
        gap: 8px !important;
    }
    .btn-cookie-accept, .btn-cookie-refuse {
        flex: 1 !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}


/* ============================================================ */
/* HERO DIFFICULTY SELECTOR                                      */
/* ============================================================ */
.hero-diff-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.hero-diff-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    letter-spacing: 1px;
}
.hero-diff-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.hero-diff-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--stroke);
    color: var(--color-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hero-diff-btn:hover {
    color: #fff;
    border-color: var(--color-cyan);
    background: rgba(46, 230, 214, 0.1);
}
.hero-diff-btn.active {
    background: linear-gradient(135deg, rgba(255, 106, 61, 0.25), rgba(255, 61, 127, 0.25));
    border-color: var(--color-orange);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 106, 61, 0.4);
}

/* PROFILE HEADER ACTIONS & EDIT BUTTON */
.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-edit-profile {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: var(--color-cyan);
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-edit-profile:hover {
    border-color: var(--color-cyan);
    background: rgba(46, 230, 214, 0.15);
    color: #fff;
}

/* ============================================================ */
/* ANDROID-MATCHED GARAGE SHOWROOM & ATELIER                     */
/* ============================================================ */
.garage-showroom-container {
    display: flex;
    align-items: center;
    gap: 28px;
    background: radial-gradient(circle at top left, rgba(30, 38, 82, 0.85) 0%, rgba(14, 19, 48, 0.95) 100%);
    border: 1.5px solid rgba(46, 230, 214, 0.4);
    border-radius: 24px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(46, 230, 214, 0.1);
    position: relative;
    overflow: hidden;
}
.garage-showroom-container::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 250px;
    height: 150px;
    background: radial-gradient(ellipse, rgba(46, 230, 214, 0.2) 0%, transparent 70%);
    pointer-events: none;
}
.showroom-left {
    flex: 1.1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.showroom-canvas-box {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.showroom-glow {
    position: absolute;
    bottom: 10px;
    width: 320px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(46, 230, 214, 0.45) 0%, transparent 70%);
    filter: blur(14px);
    pointer-events: none;
}
#garage-car-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.8));
    animation: showroomFloat 4s ease-in-out infinite;
}
@keyframes showroomFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.showroom-right {
    flex: 1.4;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.showroom-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.category-badge {
    background: rgba(46, 230, 214, 0.15);
    border: 1px solid rgba(46, 230, 214, 0.4);
    color: var(--color-cyan);
    font-size: 11px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}
.level-required-badge {
    background: rgba(255, 106, 61, 0.15);
    border: 1px solid rgba(255, 106, 61, 0.4);
    color: var(--color-orange);
    font-size: 11px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 8px;
}
.showroom-car-meta h2 {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.showroom-car-meta p {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.4;
    margin-top: 4px;
}
.garage-specs-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(8, 11, 26, 0.6);
    border: 1px solid rgba(44, 55, 112, 0.5);
    border-radius: 14px;
    padding: 12px 16px;
}
.spec-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.spec-label {
    width: 130px;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    flex-shrink: 0;
}
.spec-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}
.spec-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}
.speed-fill { background: linear-gradient(90deg, #FF6A3D, #FF3D7F); }
.accel-fill { background: linear-gradient(90deg, #FFC93C, #FF6A3D); }
.drift-fill { background: linear-gradient(90deg, #2EE6D6, #8B5CFF); }
.spec-val {
    width: 38px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}
.showroom-action-row {
    margin-top: 4px;
}
.btn-equip-car {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 900;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 106, 61, 0.4);
    transition: all 0.2s;
}
.btn-equip-car.equipped {
    background: rgba(59, 227, 139, 0.2);
    border: 1.5px solid var(--color-green);
    color: var(--color-green);
    box-shadow: none;
    cursor: default;
}
.btn-equip-car.buy-mode {
    background: linear-gradient(135deg, #EAB308, #CA8A04);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.4);
}

/* CUSTOMISATION SECTION (PEINTURE & PACKS) */
.garage-custom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 22px;
}
.custom-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.custom-group-header h4 {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #fff;
}
.custom-hint {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-cyan);
}
.color-palette-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}
.color-palette-scroll::-webkit-scrollbar { display: none; }
.color-chip-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}
.color-chip-btn:hover {
    transform: scale(1.1);
}
.color-chip-btn.selected {
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
}
.color-chip-btn.locked::after {
    content: '🔒';
    font-size: 11px;
}
.color-chip-btn.orig {
    background: var(--bg-surface-high);
    border: 1.5px solid var(--stroke);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.accessory-chips-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.acc-chip-btn {
    background: var(--bg-surface-high);
    border: 1px solid var(--stroke);
    color: var(--color-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.acc-chip-btn:hover {
    border-color: var(--color-cyan);
    color: #fff;
}
.acc-chip-btn.selected {
    background: linear-gradient(135deg, rgba(255, 106, 61, 0.2), rgba(255, 61, 127, 0.2));
    border-color: var(--color-orange);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 106, 61, 0.35);
}

/* GARAGE CATEGORY BAR */
.garage-category-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 18px;
    scrollbar-width: none;
}
.garage-category-bar::-webkit-scrollbar { display: none; }
.garage-cat-btn {
    background: var(--bg-surface);
    border: 1px solid var(--stroke);
    color: var(--color-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 16px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.garage-cat-btn:hover {
    color: #fff;
    border-color: var(--color-cyan);
}
.garage-cat-btn.active {
    background: var(--color-orange);
    color: #fff;
    border-color: var(--color-orange);
    box-shadow: 0 4px 16px rgba(255, 106, 61, 0.4);
}

/* GARAGE VEHICLES GRID */
.garage-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.garage-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--stroke);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.garage-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-cyan);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
.garage-card.equipped {
    border-color: var(--color-green);
    background: rgba(59, 227, 139, 0.05);
    box-shadow: 0 0 20px rgba(59, 227, 139, 0.2);
}
.garage-card.locked {
    opacity: 0.85;
}
.garage-card.level-locked {
    border-color: rgba(255, 61, 110, 0.4);
    background: rgba(255, 61, 110, 0.04);
}
.garage-card.coins-locked {
    border-color: rgba(255, 201, 60, 0.35);
}
.garage-card-canvas-wrap {
    width: 100%;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 8px;
}
.garage-card-price-overlay {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 201, 60, 0.4);
    color: var(--color-yellow);
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
}
.garage-card-price-overlay.level-locked-overlay {
    border-color: rgba(255, 61, 110, 0.6);
    color: #FF8FA3;
    background: rgba(20, 10, 25, 0.9);
}
.garage-card-title {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2px;
}
.garage-card-cat {
    font-size: 10px;
    font-weight: 800;
    color: var(--color-cyan);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.tag-level-locked {
    color: #FF8FA3;
    font-weight: 900;
}
.tag-level-ok {
    color: var(--color-green);
    font-weight: 900;
}
.garage-card-btn {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 900;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s ease;
}
.garage-card-btn.btn-equipped {
    background: rgba(59, 227, 139, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(59, 227, 139, 0.4);
}
.garage-card-btn.btn-select {
    background: var(--bg-surface-high);
    color: #fff;
    border: 1px solid var(--stroke);
}
.garage-card-btn.btn-buy {
    background: linear-gradient(135deg, #EAB308, #CA8A04);
    color: #000;
}
.garage-card-btn.btn-level-locked {
    background: linear-gradient(135deg, rgba(255, 61, 110, 0.25), rgba(255, 106, 61, 0.2));
    color: #FF8FA3;
    border: 1px solid rgba(255, 61, 110, 0.5);
}
.garage-card-btn.btn-level-locked:hover {
    background: linear-gradient(135deg, rgba(255, 61, 110, 0.45), rgba(255, 106, 61, 0.35));
    color: #fff;
}
.btn-equip-car.btn-level-locked {
    background: linear-gradient(135deg, rgba(255, 61, 110, 0.3), rgba(255, 106, 61, 0.25)) !important;
    color: #FF8FA3 !important;
    border: 1.5px solid rgba(255, 61, 110, 0.6) !important;
    box-shadow: 0 4px 16px rgba(255, 61, 110, 0.3) !important;
}

/* ============================================================ */
/* GARAGE BUY / UNLOCK VEHICLE MODAL (High-Def, Crisp, Centered) */
/* ============================================================ */
.garage-unlock-modal {
    max-width: 490px;
    width: 94%;
    background: linear-gradient(180deg, #10162F 0%, #080B1A 100%);
    border: 1.5px solid rgba(46, 230, 214, 0.4);
    border-radius: 24px;
    padding: 24px 22px 20px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(46, 230, 214, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.modal-unlock-header {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
#garage-buy-modal-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--color-muted);
    text-transform: uppercase;
    margin: 0;
}
.modal-car-headline {
    font-size: 24px;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.modal-car-stage {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 185px;
    margin: 2px 0 6px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at 50% 65%, rgba(24, 38, 80, 0.85) 0%, rgba(6, 9, 22, 0.98) 75%);
    border: 1px solid rgba(44, 55, 112, 0.6);
    border-radius: 18px;
    overflow: hidden;
}
.modal-stage-pedestal {
    position: absolute;
    bottom: 20px;
    width: 320px;
    height: 42px;
    background: radial-gradient(ellipse at center, rgba(46, 230, 214, 0.4) 0%, rgba(46, 230, 214, 0.1) 50%, transparent 75%);
    border-radius: 50%;
    filter: blur(5px);
    pointer-events: none;
}
.modal-stage-glow {
    position: absolute;
    bottom: 12px;
    width: 220px;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(255, 106, 61, 0.45) 0%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}
#garage-modal-car-canvas {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    aspect-ratio: 480 / 210;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.75));
    z-index: 2;
}
.modal-car-description {
    font-size: 13px;
    color: #A3B3D9;
    margin: 0;
    line-height: 1.4;
    max-width: 420px;
}
.modal-specs-box {
    width: 100%;
    max-width: 440px;
    background: rgba(8, 11, 26, 0.65);
    border: 1px solid rgba(44, 55, 112, 0.4);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.modal-spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-spec-item .spec-label {
    width: 90px;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-muted);
    text-align: left;
}
.modal-spec-item .spec-bar-track {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}
.modal-spec-item .spec-val {
    width: 34px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}
.modal-balance-reminder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 2px;
}
.modal-balance-reminder strong {
    color: var(--color-yellow);
    font-weight: 800;
}
.garage-modal-actions {
    width: 100%;
    max-width: 440px;
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.garage-modal-actions button {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.level-required-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.level-required-badge.locked {
    background: rgba(255, 61, 110, 0.15);
    color: #FF6B8B;
    border: 1px solid rgba(255, 61, 110, 0.5);
}
.level-required-badge.unlocked {
    background: rgba(59, 227, 139, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(59, 227, 139, 0.5);
}
.modal-unlock-instruction {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}
.modal-unlock-instruction.level-instruction {
    background: rgba(255, 61, 110, 0.1);
    border: 1px solid rgba(255, 61, 110, 0.35);
    color: #FFA5B6;
}
.modal-unlock-instruction.coins-instruction {
    background: rgba(255, 201, 60, 0.1);
    border: 1px solid rgba(255, 201, 60, 0.35);
    color: #FFE699;
}
.modal-unlock-instruction.ready-instruction {
    background: rgba(46, 230, 214, 0.1);
    border: 1px solid rgba(46, 230, 214, 0.35);
    color: #A7F3D0;
}
.btn-confirm-unlock {
    background: linear-gradient(135deg, #FF6A3D, #FF3D7F);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(255, 106, 61, 0.4);
}
.btn-confirm-unlock:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 106, 61, 0.6);
}
.btn-confirm-unlock.level-action {
    background: linear-gradient(135deg, #FF3D6E, #EA580C);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 61, 110, 0.45);
}
.btn-confirm-unlock.earn-coins-action {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
    color: #fff;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.45);
}
.btn-confirm-unlock.insufficient {
    background: linear-gradient(135deg, #EAB308, #CA8A04);
    color: #000;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.35);
}

/* ============================================================ */
/* PROFILE EDIT MODAL                                            */
/* ============================================================ */
.profile-edit-card {
    max-width: 480px;
    text-align: left;
}
.edit-profile-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.avatar-picker-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.avatar-pick-chip {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-surface-high);
    border: 2px solid var(--stroke);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.avatar-pick-chip:hover {
    border-color: var(--color-cyan);
    transform: scale(1.1);
}
.avatar-pick-chip.selected {
    background: var(--color-orange);
    border-color: #fff;
    box-shadow: 0 0 14px rgba(255, 106, 61, 0.6);
}

.profile-id-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(46, 230, 214, 0.08);
    border: 1px solid rgba(46, 230, 214, 0.25);
    padding: 10px 14px;
    border-radius: 12px;
}
.id-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.id-label {
    font-size: 11px;
    color: #8D96C4;
    font-weight: 800;
}
.id-val {
    font-family: monospace;
    color: var(--color-cyan);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.id-permanent-badge {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 8px;
    color: #CAD5E8;
    font-weight: 800;
}
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.btn-detect-country {
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.btn-detect-country:hover {
    background: var(--color-cyan);
    color: #0b0e17;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 230, 214, 0.3);
}
.detect-status-hint {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(59, 227, 139, 0.15);
    border: 1px solid rgba(59, 227, 139, 0.35);
    color: var(--color-green);
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
    font-weight: 700;
}
.form-hint {
    font-size: 11px;
    color: #8D96C4;
    margin-top: 4px;
    display: block;
}
.country-select-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 4px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.country-select-wrapper:focus-within {
    border-color: var(--color-cyan);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.25);
}
.country-select-flag-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}
.country-select-wrapper select {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 0;
    cursor: pointer;
}
.country-select-wrapper select option {
    background: #0f1426;
    color: #fff;
}
.player-name-id-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-id-pill {
    font-family: monospace;
    font-size: 10px;
    font-weight: 800;
    color: var(--color-cyan);
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid rgba(46, 230, 214, 0.3);
    padding: 2px 6px;
    border-radius: 6px;
}
.country-chip-badge {
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}
.country-chip-badge:hover {
    transform: scale(1.08);
    border-color: var(--color-cyan);
}

/* ============================================================ */
/* FLOATING TOAST NOTIFICATIONS (ESPORT ALERT BANNER)          */
/* ============================================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 440px;
}
.toast-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(14, 18, 36, 0.96);
    border: 1px solid rgba(255, 106, 61, 0.5);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 106, 61, 0.25);
    border-radius: 14px;
    padding: 14px 20px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
.toast-banner.success {
    border-color: rgba(32, 227, 178, 0.7);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(32, 227, 178, 0.3);
}
.toast-banner.error {
    border-color: rgba(255, 77, 77, 0.7);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 77, 77, 0.3);
}
.toast-banner.info {
    border-color: rgba(77, 166, 255, 0.7);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(77, 166, 255, 0.3);
}
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* -------------------------------------------------------------
 * SITE FOOTER STYLES
 * ----------------------------------------------------------- */
.site-footer {
    background: #090c1a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 20px 48px;
    margin-top: 50px;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.footer-brand-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin: 8px 0;
}

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.footer-link:hover {
    color: var(--color-orange);
    background: rgba(255, 255, 255, 0.04);
}

.footer-privacy-badge {
    color: var(--color-cyan) !important;
    font-weight: 700;
    background: rgba(46, 230, 214, 0.08);
    border: 1px solid rgba(46, 230, 214, 0.25);
    border-radius: 20px;
    padding: 4px 14px;
}

.footer-privacy-badge:hover {
    background: rgba(46, 230, 214, 0.16);
    border-color: var(--color-cyan);
    transform: translateY(-1px);
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

/* ============================================================ */
/* ACCESSIBILITY & KEYBOARD NAVIGATION (A11Y-001)               */
/* ============================================================ */
:focus-visible {
    outline: 2.5px solid var(--primary-orange, #FF6A3D) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 12px rgba(255, 106, 61, 0.45) !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.nav-link:focus-visible,
.hero-diff-btn:focus-visible,
.diff-btn:focus-visible,
.country-chip:focus-visible {
    outline: 2.5px solid var(--primary-orange, #FF6A3D) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 14px rgba(255, 106, 61, 0.5) !important;
}

/* ============================================================ */
/* FEATURE 3: RGB NITRO & HIGH SPEED VISUAL OVERLAYS            */
/* ============================================================ */
.track-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}
.speed-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.35s ease, box-shadow 0.35s ease;
    z-index: 5;
}
.speed-vignette.tier-80 {
    opacity: 0.65;
    box-shadow: inset 0 0 45px rgba(46, 230, 214, 0.45);
}
.speed-vignette.tier-100 {
    opacity: 0.95;
    box-shadow: inset 0 0 80px rgba(255, 61, 127, 0.55), inset 0 0 40px rgba(255, 210, 60, 0.35);
    animation: rgbBorderGlow 2.5s linear infinite;
}
@keyframes rgbBorderGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.nitro-badge-hud {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(14, 19, 48, 0.8);
    border: 1px solid rgba(255, 106, 61, 0.4);
    color: #FF6A3D;
    transition: all 0.3s ease;
}
.nitro-badge-hud.active-80 {
    border-color: #2EE6D6;
    color: #2EE6D6;
    box-shadow: 0 0 14px rgba(46, 230, 214, 0.5);
}
.nitro-badge-hud.active-100 {
    background: linear-gradient(135deg, #FF3D6E, #FF6A3D);
    border-color: #FFD23C;
    color: #FFFFFF;
    box-shadow: 0 0 22px rgba(255, 61, 110, 0.8), 0 0 10px rgba(255, 210, 60, 0.6);
    animation: nitroPulse 0.6s infinite alternate;
}
@keyframes nitroPulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

/* ============================================================ */
/* FEATURE 6: MUSIC TOGGLE & EQUALIZER ANIMATION                */
/* ============================================================ */
.music-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(20, 28, 56, 0.85);
    border: 1px solid rgba(46, 230, 214, 0.3);
    color: #CBD5E1;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
}
.music-toggle-btn:hover {
    border-color: #2EE6D6;
    color: #FFFFFF;
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.3);
}
.music-toggle-btn.is-playing {
    border-color: #3BE38B;
    background: rgba(59, 227, 139, 0.15);
    color: #3BE38B;
    box-shadow: 0 0 16px rgba(59, 227, 139, 0.35);
}
.eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 14px;
}
.eq-bar {
    width: 3px;
    height: 4px;
    background: currentColor;
    border-radius: 2px;
    transition: height 0.15s ease;
}
.music-toggle-btn.is-playing .eq-bar:nth-child(1) { animation: eqAnim 0.7s infinite alternate ease-in-out; }
.music-toggle-btn.is-playing .eq-bar:nth-child(2) { animation: eqAnim 0.5s infinite alternate ease-in-out 0.2s; }
.music-toggle-btn.is-playing .eq-bar:nth-child(3) { animation: eqAnim 0.8s infinite alternate ease-in-out 0.4s; }
@keyframes eqAnim {
    0% { height: 3px; }
    100% { height: 14px; }
}

/* ============================================================ */
/* FEATURE 5: SHARE CARD MODAL UPGRADES                         */
/* ============================================================ */
.share-format-selector {
    display: flex;
    gap: 10px;
    margin: 12px 0 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.share-format-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: #141C38;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #8D96C4;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.share-format-btn:hover {
    color: #FFFFFF;
    border-color: rgba(46, 230, 214, 0.4);
}
.share-format-btn.active {
    background: linear-gradient(135deg, rgba(46, 230, 214, 0.25), rgba(255, 106, 61, 0.25));
    border-color: #2EE6D6;
    color: #FFFFFF;
    box-shadow: 0 0 14px rgba(46, 230, 214, 0.35);
}
.share-canvas-container {
    max-height: 520px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 10px 0;
    border-radius: 12px;
    background: #060814;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
}
#share-result-canvas {
    max-height: 480px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Vehicle Category Badge colors */
.cat-badge-sport { background: rgba(255, 106, 61, 0.2); color: #FF6A3D; border: 1px solid rgba(255, 106, 61, 0.3); }
.cat-badge-supercar { background: rgba(255, 61, 110, 0.2); color: #FF3D6E; border: 1px solid rgba(255, 61, 110, 0.3); }
.cat-badge-racing { background: rgba(46, 230, 214, 0.2); color: #2EE6D6; border: 1px solid rgba(46, 230, 214, 0.3); }
.cat-badge-rocket { background: rgba(255, 210, 60, 0.2); color: #FFD23C; border: 1px solid rgba(255, 210, 60, 0.3); }
.cat-badge-spaceship { background: rgba(181, 123, 255, 0.2); color: #B57BFF; border: 1px solid rgba(181, 123, 255, 0.3); }
.cat-badge-superjet { background: rgba(61, 123, 255, 0.2); color: #3D7BFF; border: 1px solid rgba(61, 123, 255, 0.3); }
.cat-badge-hover { background: rgba(59, 227, 139, 0.2); color: #3BE38B; border: 1px solid rgba(59, 227, 139, 0.3); }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .typing-char.current::after,
    .nitro-badge-hud.active-100,
    .speed-vignette.tier-100,
    .eq-bar {
        animation: none !important;
    }
}

/* ============================================================ */
/* LANGUAGE SELECTOR MODAL (16 LANGUAGES)                      */
/* ============================================================ */
.lang-modal-card {
    max-width: 680px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.lang-modal-body {
    overflow-y: auto;
    padding: 10px 4px 16px 4px;
}
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.lang-card {
    background: rgba(20, 26, 48, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
    text-align: center;
}
.lang-card:hover {
    background: rgba(30, 40, 75, 0.95);
    border-color: var(--color-cyan);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(46, 230, 214, 0.2);
}
.lang-card.active {
    background: linear-gradient(135deg, rgba(255, 106, 61, 0.2), rgba(46, 230, 214, 0.15));
    border-color: var(--color-orange);
    box-shadow: 0 0 16px rgba(255, 106, 61, 0.4);
}
.lang-card-flag {
    font-size: 2.2rem;
    line-height: 1;
}
.lang-card-native {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}
.lang-card-sub {
    font-size: 0.75rem;
    color: #8D96C4;
    font-weight: 600;
}
.lang-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    color: #A0AEC0;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 800;
}
.lang-card.active .lang-card-badge {
    background: var(--color-orange);
    color: #fff;
}

/* ============================================================ */
/* TYPE DRIVE ENHANCEMENTS: STREAK, SFX, CARETS & SOCIAL VIRALITY */
/* ============================================================ */

/* 1. Header Mobile Overflow Fix */
@media (max-width: 480px) {
    .site-header {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    .header-container {
        padding: 4px 6px !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    #server-status-pill {
        display: none !important;
    }
    .header-actions {
        max-width: calc(100vw - 120px) !important;
        overflow: hidden !important;
        flex-shrink: 1 !important;
        gap: 4px !important;
    }
    .user-profile-badge {
        max-width: 110px !important;
        padding: 2px 6px !important;
    }
    .user-meta {
        max-width: 65px !important;
        overflow: hidden !important;
    }
    .user-name-row {
        max-width: 65px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    #header-user-name {
        max-width: 50px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

/* 2. Daily Streak Flame Badge */
.header-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 106, 61, 0.2), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(255, 106, 61, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #FFA500;
    cursor: pointer;
    transition: all 0.25s ease;
}
.header-streak-badge:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 0 12px rgba(255, 106, 61, 0.4);
    border-color: #FF6A3D;
}
.streak-flame {
    display: inline-block;
    animation: flamePulse 1.2s infinite alternate ease-in-out;
}
@keyframes flamePulse {
    0% { transform: scale(1) rotate(-3deg); filter: drop-shadow(0 0 2px #ff4500); }
    100% { transform: scale(1.2) rotate(3deg); filter: drop-shadow(0 0 8px #ff8c00); }
}

/* 3. Daily Challenge Banner on Home */
.daily-challenge-box {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 14px;
    padding: 14px 18px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}
.daily-challenge-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899, #3B82F6);
}
.daily-challenge-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.daily-challenge-icon {
    font-size: 1.8rem;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.daily-challenge-texts h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.daily-challenge-texts p {
    margin: 3px 0 0 0;
    font-size: 0.8rem;
    color: #A5B4FC;
}
.daily-challenge-btn {
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
.daily-challenge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* 4. Caret Styles */
.caret-block .caret {
    width: 0.6em !important;
    background: rgba(255, 106, 61, 0.45) !important;
    border-radius: 2px !important;
    animation: blinkBlock 0.8s infinite !important;
}
@keyframes blinkBlock {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.caret-underline .caret {
    width: 0.7em !important;
    height: 3px !important;
    margin-top: 1.2em !important;
    background: var(--color-orange) !important;
    border-radius: 2px !important;
}

/* 5. Results Social Share Buttons Row */
.social-share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 4px 0;
}
.btn-social-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: #fff;
    transition: all 0.2s ease;
}
.btn-share-whatsapp {
    background: #25D366;
    color: #0b2e13;
}
.btn-share-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}
.btn-share-x {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-share-x:hover {
    background: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
.btn-share-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-share-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 6. Direct Invite Room Banner */
.direct-invite-box {
    background: rgba(46, 230, 214, 0.08);
    border: 1px dashed rgba(46, 230, 214, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 10px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.direct-invite-text {
    font-size: 0.85rem;
    color: #E2E8F0;
}
.direct-invite-url {
    color: #2EE6D6;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}
.btn-copy-direct-invite {
    background: #2EE6D6;
    color: #052623;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-copy-direct-invite:hover {
    background: #5cf1e5;
    transform: translateY(-1px);
}
@media (max-width: 600px) {
    .typing-box {
        font-size: 16px !important;
        line-height: 1.6 !important;
        height: 95px !important;
        min-height: 95px !important;
        max-height: 95px !important;
        padding: 0 !important;
        mask-image: linear-gradient(to right, transparent 0%, black 45px, black calc(100% - 45px), transparent 100%) !important;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 45px, black calc(100% - 45px), transparent 100%) !important;
    }
}
/* 7. Mobile Responsive Header Optimizations (<= 480px) */
@media (max-width: 480px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    #app-header {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 6px 8px !important;
    }
    .header-actions {
        gap: 4px !important;
        max-width: calc(100vw - 110px) !important;
        overflow: hidden !important;
    }
    .view-switcher-group #view-mode-label {
        display: none !important;
    }
    .audio-control-group {
        gap: 3px !important;
    }
    .audio-control-group .icon-toggle-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.8rem !important;
        padding: 0 !important;
    }
    #header-streak-badge {
        padding: 2px 6px !important;
        font-size: 0.72rem !important;
    }
    #auth-header-container {
        max-width: 90px !important;
    }
    .user-profile-badge .user-meta {
        display: none !important;
    }
    .btn-login-header {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
    }
}

/* ============================================================ */
/* CRAWLABLE SEO & INFORMATION SECTION (HOMEPAGE GUIDE)         */
/* ============================================================ */
.seo-guide-section {
    background: linear-gradient(180deg, rgba(14, 19, 38, 0.6) 0%, rgba(9, 12, 26, 0.95) 100%);
    border-top: 1px solid rgba(46, 230, 214, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 24px;
    margin-top: 50px;
    position: relative;
    z-index: 5;
}
.seo-guide-container {
    max-width: 1100px;
    margin: 0 auto;
}
.seo-guide-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 36px auto;
}
.seo-badge {
    display: inline-block;
    background: rgba(46, 230, 214, 0.12);
    border: 1px solid rgba(46, 230, 214, 0.35);
    color: var(--color-cyan);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.seo-guide-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.seo-subtitle {
    font-size: 1.05rem;
    color: var(--color-muted);
    line-height: 1.6;
}
.seo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}
.seo-card {
    background: rgba(18, 24, 48, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.25s ease;
}
.seo-card:hover {
    border-color: rgba(46, 230, 214, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.seo-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.seo-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.seo-card p {
    font-size: 0.92rem;
    color: #A0AEC0;
    line-height: 1.6;
    margin: 0;
}
.seo-faq-block {
    background: rgba(13, 17, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 32px 28px;
    margin-bottom: 32px;
}
.seo-faq-block h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}
.seo-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.seo-faq-card {
    background: rgba(22, 29, 58, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 18px 20px;
}
.seo-faq-card h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-cyan);
    margin-bottom: 8px;
}
.seo-faq-card p {
    font-size: 0.9rem;
    color: #CBD5E1;
    line-height: 1.55;
    margin: 0;
}
.seo-faq-card code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: #FF6A3D;
}
.seo-actions-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.btn-seo-guide {
    background: linear-gradient(135deg, var(--color-orange), #FF3D7F);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(255, 106, 61, 0.4);
    transition: all 0.2s ease;
}
.btn-seo-guide:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 106, 61, 0.6);
}
.btn-seo-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #CBD5E1 !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}
.btn-seo-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
}
@media (max-width: 640px) {
    .seo-guide-section { padding: 40px 16px; }
    .seo-guide-header h2 { font-size: 1.5rem; }
    .seo-faq-block { padding: 22px 16px; }
}

/* ============================================================ */
/* COOKIE & ADSENSE CONSENT BANNER (RGPD / GOOGLE COMPLIANCE)   */
/* ============================================================ */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: min(94vw, 760px);
    background: rgba(13, 17, 36, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(46, 230, 214, 0.35);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(46, 230, 214, 0.15);
    z-index: 90000;
    padding: 20px 24px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-consent-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(30px);
}
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}
.cookie-icon-col {
    font-size: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cookie-text-col {
    flex: 1;
}
.cookie-text-col h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}
.cookie-text-col p {
    margin: 0 0 10px 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #CBD5E1;
}
.cookie-text-col strong {
    color: var(--color-cyan, #2EE6D6);
}
.cookie-links-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-links-row a {
    font-size: 11.5px;
    color: #94A3B8;
    text-decoration: underline;
    transition: color 0.2s ease;
}
.cookie-links-row a:hover {
    color: var(--color-cyan, #2EE6D6);
}
.cookie-actions-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.btn-cookie-accept {
    background: linear-gradient(135deg, #FF6A3D 0%, #FF8A00 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 106, 61, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 106, 61, 0.6);
}
.btn-cookie-refuse {
    background: transparent;
    color: #94A3B8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-cookie-refuse:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
@media (max-width: 680px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .cookie-actions-col {
        width: 100%;
        flex-direction: row;
        gap: 10px;
    }
    .btn-cookie-accept, .btn-cookie-refuse {
        flex: 1;
        text-align: center;
    }
}

/* ============================================================ */
/* REWARDED VIDEO ADS & GARAGE PROMOTIONS                       */
/* ============================================================ */

/* Header Ad Button in Garage */
.garage-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-ad-coins-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 106, 61, 0.25));
    border: 1px solid rgba(255, 215, 0, 0.6);
    color: #FFD700;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-ad-coins-header:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 106, 61, 0.4));
}

.ad-tv-icon {
    font-size: 15px;
    animation: pulse-tv 2s infinite ease-in-out;
}

@keyframes pulse-tv {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.ad-tag-pill {
    background: #FF4757;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Modal Ad Promo Banner (Inside Buy Modal) */
.modal-ad-promo-box {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, rgba(16, 27, 68, 0.95), rgba(8, 14, 38, 0.95));
    border: 1.5px solid rgba(46, 230, 214, 0.45);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin: 4px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(46, 230, 214, 0.15);
}

.ad-promo-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.ad-promo-content {
    flex: 1;
}

.ad-promo-content strong {
    display: block;
    font-size: 12.5px;
    color: #2EE6D6;
    margin-bottom: 2px;
}

.ad-promo-content p {
    font-size: 11px;
    color: #94A3B8;
    margin: 0;
    line-height: 1.35;
}

.btn-ad-promo-watch {
    flex-shrink: 0;
    background: linear-gradient(135deg, #2EE6D6, #00A3FF);
    color: #060919;
    border: none;
    font-size: 11.5px;
    font-weight: 900;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 230, 214, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ad-promo-watch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 18px rgba(46, 230, 214, 0.6);
}

/* Video Ad Modal */
.video-ad-card {
    max-width: 580px;
    width: 95%;
    background: linear-gradient(180deg, #0D1226 0%, #060916 100%);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 240, 255, 0.25);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.video-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.ad-sponsor-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ad-badge-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748B;
    text-transform: uppercase;
}

.ad-sponsor-name {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #2EE6D6;
    text-shadow: 0 0 12px rgba(46, 230, 214, 0.4);
}

.ad-timer-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    color: #E2E8F0;
}

.ad-timer-pill.ready {
    background: rgba(59, 227, 139, 0.2);
    border-color: rgba(59, 227, 139, 0.6);
    color: #3BE38B;
}

.ad-close-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s;
}

.ad-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Video Stage */
.video-ad-player-container {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 14px;
    overflow: hidden;
    background: #02040A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

#video-ad-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.video-ad-overlay-content {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(3, 5, 14, 0.88) 35%, rgba(3, 5, 14, 0.96) 100%);
    padding: 12px 14px 10px 14px;
    border-radius: 12px;
    text-align: left;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-creative-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    background: #FF6A3D;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.ad-creative-title {
    font-size: 16px;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    margin: 0 0 3px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.ad-creative-desc {
    font-size: 11.5px;
    color: #CBD5E1;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.ad-sponsor-cta {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #2EE6D6;
    text-transform: uppercase;
}

/* Video Progress Bar */
.video-ad-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
}

.video-ad-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00F0FF, #FF6A3D);
    box-shadow: 0 0 10px #00F0FF;
    transition: width 0.1s linear;
}

/* Reward Footer */
.video-ad-reward-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 4px;
}

.ad-reward-announcement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #F8FAFC;
}

.reward-sparkle {
    font-size: 20px;
    animation: bounce 1.2s infinite ease-in-out;
}

.btn-claim-reward {
    background: linear-gradient(135deg, #3BE38B, #00C853);
    color: #042013;
    font-size: 13px;
    font-weight: 900;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 227, 139, 0.5);
    cursor: pointer;
    animation: pulse-claim 1.5s infinite;
}

@keyframes pulse-claim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(59, 227, 139, 0.7); }
}

/* Modal Ad Promo Box in Garage Buy Modal */
.modal-ad-promo-box {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, rgba(14, 23, 56, 0.95), rgba(8, 12, 32, 0.95));
    border: 1.5px solid rgba(46, 230, 214, 0.5);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
    margin: 4px 0;
    transition: all 0.2s ease;
}
.modal-ad-promo-box:hover {
    border-color: rgba(46, 230, 214, 0.8);
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.25);
}
.modal-ad-promo-box .ad-promo-icon {
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 230, 214, 0.12);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    animation: pulse-icon 2s infinite ease-in-out;
}
@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.modal-ad-promo-box .ad-promo-content {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.modal-ad-promo-box .ad-promo-content strong {
    font-size: 13px;
    font-weight: 900;
    color: #2EE6D6;
    letter-spacing: 0.2px;
}
.modal-ad-promo-box .ad-promo-content p {
    font-size: 11px;
    color: #A3B3D9;
    margin: 0;
    line-height: 1.35;
}
.btn-ad-promo-watch {
    background: linear-gradient(135deg, #FF6A3D, #FF3D7F);
    color: #fff;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 9px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 106, 61, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}
.btn-ad-promo-watch:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(255, 106, 61, 0.6);
}

