/* ==============================================================================
   Arcade Bay - Main Stylesheet (Vanilla CSS, No Frameworks, Google Fonts)
   ============================================================================== */

:root {
    /* Color Palette - Cyber Dark (Default) */
    --bg-main: #070913;
    --bg-surface: #0e1224;
    --bg-card: rgba(19, 26, 48, 0.7);
    --bg-card-hover: rgba(28, 38, 70, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 240, 255, 0.35);

    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.25);
    --secondary: #ff0077;
    --accent: #8a2be2;
    --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #7000ff 50%, #ff0077 100%);
    --card-gradient: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);

    --text-primary: #f0f4fc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.2);
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(14, 165, 233, 0.4);

    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.2);
    --secondary: #e11d48;
    --accent: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #7c3aed 50%, #e11d48 100%);
    --card-gradient: linear-gradient(180deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0) 100%);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    color-scheme: dark light;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Header & Navbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}
[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0.25rem;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 22px rgba(0, 240, 255, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobile Nav Toggle & Drawer */
.mobile-toggle {
    display: none;
}
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg-main);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    padding-bottom: 2rem;
}
.mobile-drawer.open {
    display: block !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
    text-align: center;
}

.hero-glow-bg {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.15) 0%, rgba(112, 0, 255, 0.1) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--border-highlight);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.25rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* Stats Counter Row */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    gap: 1rem;
}

.stat-item {
    text-align: center;
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Search and Filters Bar */
.filter-bar {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    flex: 1;
    min-width: min(100%, 240px);
}
.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
}
.search-box input::placeholder {
    color: var(--text-muted);
}

.chips-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.chip {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.chip:hover, .chip.active {
    background: var(--primary);
    color: #070913;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

/* Game Card */
.game-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-smooth);
    text-decoration: none;
    transform-style: preserve-3d;
}

.game-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0d1222;
}

.card-cover-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.game-card:hover .card-thumb {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 9, 19, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    backdrop-filter: blur(4px);
    transition: opacity var(--transition-fast);
}
.game-card:hover .card-overlay {
    opacity: 1;
}

.play-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
    transform: scale(0.9);
    transition: transform var(--transition-fast);
}
.game-card:hover .play-badge {
    transform: scale(1);
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 0, 119, 0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.badge-tech {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(14, 18, 36, 0.85);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Play Page Styling */
.play-view {
    padding: 2rem 0 4rem;
}

.play-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.play-title-group h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 0.35rem;
}

.play-back-lobby {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.play-back-lobby:hover {
    color: var(--primary);
}

.play-controls-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.game-stage-wrapper {
    position: relative;
    width: 100%;
    background: #020408;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
}

/* Aspect ratio classes */
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-1-1 { aspect-ratio: 1 / 1; }
.aspect-4-5 { aspect-ratio: 4 / 5; max-width: 540px; margin-inline: auto; }
.aspect-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

.stage-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #070913;
    z-index: 5;
    transition: opacity 0.4s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 240, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

/* Play Details & How to Play Grid */
.play-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}
.detail-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.tag-pill {
    font-size: 0.78rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Footer */
.site-footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Admin Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.admin-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
    flex: 1;
}

.admin-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
}
.admin-nav-item a:hover, .admin-nav-item.active a {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary);
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
    background: var(--bg-main);
    overflow-y: auto;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}
table.admin-table th {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
table.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Upload Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.05);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .play-details-grid { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: inline-flex; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-strip { grid-template-columns: 1fr; }
    .header-inner { height: 64px; gap: 0.75rem; }
    .site-logo { font-size: 1.15rem; gap: 0.5rem; }
    .player-name-label { max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .player-mission-chip { display: none; }
    .play-controls-bar { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
    .game-stage-wrapper:not(.aspect-fullscreen) {
        aspect-ratio: auto !important;
        min-height: 440px;
        height: min(74dvh, 560px);
    }
    .footer-bottom { flex-direction: column; gap: 0.65rem; text-align: center; }
    .leaderboard-footer { flex-wrap: wrap; }
}

/* Ads & Monetization Containers */
.nova-ad-container {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    overflow: hidden;
}
.nova-ad-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}
.nova-ad-box {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Pre-roll & Game-end Ad Overlays inside Stage */
.stage-ad-overlay {
    position: absolute;
    inset: 0;
    z-index: 25;
    background: rgba(5, 8, 19, 0.94);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.stage-ad-overlay.hidden {
    display: none;
}
.stage-ad-card {
    width: 100%;
    max-width: 560px;
    margin: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: clamp(0.95rem, 3vw, 1.35rem);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}
.stage-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}
.stage-ad-pill {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
}
.stage-ad-body {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Player Auth Badge & Modal */
.player-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.6rem 0.25rem 0.3rem;
    font-size: 0.8rem;
}
.player-avatar-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    color: #050812;
}
.player-name-label {
    font-weight: 600;
    color: var(--text-primary);
}
.player-logout-mini {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0 0.2rem;
}
.nova-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 8, 19, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.nova-modal.hidden {
    display: none;
}
.nova-modal-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

/* Floating Local Community Chat Room */
.chat-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 1.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 240, 255, 0.35);
    transition: transform var(--transition-fast);
}
.chat-fab:hover {
    transform: translateY(-2px);
}
.chat-drawer {
    position: fixed;
    right: 22px;
    bottom: 80px;
    width: min(370px, calc(100vw - 24px));
    height: 460px;
    max-height: 72vh;
    z-index: 995;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}
.chat-drawer.hidden {
    display: none;
}
.chat-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}
.chat-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.chat-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.chat-msg-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
}
.chat-msg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
}
.chat-composer-wrap {
    padding: 0.75rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

/* Announcement Ribbon & Spotlight Promo & Test Ad Diagnostics */
.nova-announcement-bar {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.14), rgba(168, 85, 247, 0.18), rgba(255, 0, 119, 0.14));
    border-bottom: 1px solid var(--border-color);
    padding: 0.55rem 1rem;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
}
.nova-announcement-bar a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nova-ad-test-banner {
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.nova-ad-test-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
}

.spotlight-promo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 0, 119, 0.08));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.spotlight-promo-thumb {
    width: 140px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.social-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.social-links-row a {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.social-links-row a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Prevent toasts from overlapping Lobby Chat button */
.toast-container {
    bottom: 84px;
    right: 22px;
}

/* Header Daily Mission Chip */
.player-mission-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(0, 240, 255, 0.14);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.35);
}
.player-mission-chip.is-done {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.45);
}

/* User Profile & Daily Missions Section */
.profile-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-soft);
}
.profile-avatar-xl {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: #050812;
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.25);
    flex-shrink: 0;
}
.profile-rank-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 800;
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.35);
}
.xp-bar-track {
    width: 100%;
    height: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
}
.xp-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.xp-bar-fill.xp-bar-complete {
    background: linear-gradient(90deg, #10b981, #00f0ff);
}
.profile-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 0.75rem;
}
.profile-mini-stat {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.75rem;
    text-align: center;
}
.profile-mini-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
}
.profile-mini-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.mission-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 800;
}
.mission-status-pill.mission-active {
    background: rgba(0, 240, 255, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.35);
}
.mission-status-pill.mission-done {
    background: rgba(16, 185, 129, 0.16);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.mission-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.mission-slot-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.mission-slot-filled {
    border-color: rgba(16, 185, 129, 0.45);
}
.mission-slot-filled:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}
.mission-slot-empty {
    border-style: dashed;
    opacity: 0.85;
}
.mission-slot-thumb {
    width: 60px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    background: #050812;
    flex-shrink: 0;
}
.mission-slot-num {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    flex-shrink: 0;
}

.mission-suggest-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
}
.mission-suggest-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}
.mission-suggest-card:hover {
    border-color: var(--primary);
}
.mission-suggest-card img {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.badge-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast);
}
.badge-card.badge-unlocked {
    box-shadow: var(--shadow-soft);
}
.badge-card.badge-locked {
    opacity: 0.62;
    filter: grayscale(0.45);
}
.badge-icon-ring {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.badge-rarity-pill {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.14rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.profile-career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.profile-career-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.profile-career-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-career-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.profile-career-val {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}
.best-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}
.best-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
}

/* Catalog Sidebar & Global High Scores Widget */
.catalog-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.75rem;
    align-items: start;
}
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 90px;
}
@media (max-width: 1080px) {
    .catalog-with-sidebar {
        grid-template-columns: 1fr;
    }
    .portal-sidebar {
        position: static;
    }
}
.leaderboard-widget {
    padding: 1.25rem;
}
.leaderboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.leaderboard-trophy-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #facc15;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.leaderboard-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}
.leaderboard-count-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.32);
    color: #fcd34d;
    white-space: nowrap;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}
.leaderboard-row:hover {
    border-color: var(--border-highlight);
}
.leaderboard-row.leaderboard-you {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.45);
}
.leaderboard-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
}
.leaderboard-rank {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.leaderboard-rank.rank-gold {
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.5);
    color: #fde047;
}
.leaderboard-rank.rank-silver {
    background: rgba(203, 213, 225, 0.15);
    border-color: rgba(203, 213, 225, 0.4);
    color: #e2e8f0;
}
.leaderboard-rank.rank-bronze {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.45);
    color: #fdba74;
}
.leaderboard-rank.rank-default {
    background: var(--bg-card);
    color: var(--text-muted);
}
.leaderboard-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 900;
    color: #050812;
    flex-shrink: 0;
}
.leaderboard-meta {
    min-width: 0;
    flex: 1;
}
.leaderboard-name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.leaderboard-username {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-you-pill {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.16);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--primary);
}
.leaderboard-submeta {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-submeta a {
    color: inherit;
}
.leaderboard-submeta a:hover {
    color: var(--primary);
}
.leaderboard-score-col {
    text-align: right;
    flex-shrink: 0;
}
.leaderboard-score-val {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: #fcd34d;
    line-height: 1.1;
}
.leaderboard-score-lbl {
    font-size: 0.64rem;
    text-transform: uppercase;
    color: var(--text-muted);
}
.leaderboard-footer {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.76rem;
}
.leaderboard-signin-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    padding: 0;
}
.leaderboard-empty {
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Global High Scores Leaderboard Popup Modal */
.nova-modal-card-lg {
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.leaderboard-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .leaderboard-podium {
        grid-template-columns: 1fr;
    }
}
.podium-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.75rem;
    text-align: center;
    position: relative;
}
.podium-card.podium-gold {
    background: rgba(250, 204, 21, 0.08);
    border-color: rgba(250, 204, 21, 0.45);
}
.podium-card.podium-silver {
    background: rgba(203, 213, 225, 0.06);
    border-color: rgba(203, 213, 225, 0.35);
}
.podium-card.podium-bronze {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.38);
}
.podium-rank-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--text-muted);
}
.leaderboard-modal-scroll {
    flex: 1;
    overflow-y: auto;
    max-height: 44vh;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.2rem;
}

/* Global Sound Effects Settings Toggle (Profile Page) */
.sfx-toggle-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.sfx-toggle-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    min-width: 240px;
}
.sfx-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.42);
    color: #10b981;
    flex-shrink: 0;
}
.sfx-icon-box.sfx-muted {
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.42);
    color: #fb7185;
}
.sfx-status-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.14rem 0.55rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sfx-status-pill.sfx-on {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.42);
}
.sfx-status-pill.sfx-off {
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.42);
}
.sfx-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.sfx-switch-btn.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.48);
    color: #34d399;
}
.sfx-switch-track {
    width: 36px;
    height: 20px;
    border-radius: 9999px;
    background: #334155;
    position: relative;
    transition: background 0.2s;
}
.sfx-switch-btn.active .sfx-switch-track {
    background: #10b981;
}
.sfx-switch-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}
.sfx-switch-btn.active .sfx-switch-thumb {
    transform: translateX(16px);
}

/* Daily Streak Bar Graph (Profile Page) */
.streak-kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}
.streak-kpi-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem 0.95rem;
}
.streak-kpi-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}
.streak-kpi-val {
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 0.2rem;
    color: var(--text-primary);
}
.streak-chart-box {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem 0.85rem 0.85rem;
}
.streak-goal-line {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    border-top: 1px dashed rgba(16, 185, 129, 0.55);
    pointer-events: none;
    z-index: 1;
}
.streak-goal-line span {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #10b981;
    background: var(--bg-surface);
    padding: 0 0.35rem;
}
.streak-bars-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.45rem;
    height: 175px;
    position: relative;
    z-index: 2;
}
.streak-bar-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
}
.streak-bar-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.streak-bar-track {
    width: 100%;
    max-width: 28px;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.streak-bar-fill {
    width: 100%;
    border-radius: 6px 6px 2px 2px;
    transition: height 0.35s ease;
}
.streak-bar-lbl {
    font-size: 0.66rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.streak-bar-col.is-today .streak-bar-lbl {
    color: var(--primary);
    font-weight: 800;
}

/* Per-Game Visual Level Progression Bar (Play Stage) */
.game-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.15rem;
    margin-bottom: 1rem;
}
.game-progress-top, .game-progress-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.game-progress-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.game-lvl-pill {
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: rgba(0, 240, 255, 0.14);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.35);
}
.game-best-pill {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: rgba(250, 204, 21, 0.14);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.35);
}
.game-progress-next {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.game-progress-track {
    width: 100%;
    height: 9px;
    margin: 0.55rem 0 0.45rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
}
.game-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #10b981);
    border-radius: 9999px;
    transition: width 0.35s ease;
}
.game-progress-bottom {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Game-End Summary Metrics inside Centered Stage Modal */
.game-end-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}
@media (max-width: 480px) {
    .game-end-metrics-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.game-end-metric {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.45rem;
    text-align: center;
}
.game-end-metric span {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.game-end-metric strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Game Card Bookmark Button & Profile Bookmarks */
.card-bookmark-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 6;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(7, 9, 19, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}
.card-bookmark-btn:hover {
    transform: scale(1.08);
    border-color: #facc15;
    color: #facc15;
}
.card-bookmark-btn.is-bookmarked {
    background: rgba(250, 204, 21, 0.22);
    border-color: #facc15;
    color: #facc15;
}
.card-bookmark-btn.is-bookmarked svg {
    fill: #facc15;
}
.card-bookmark-inline.is-bookmarked {
    border-color: rgba(250, 204, 21, 0.55) !important;
    background: rgba(250, 204, 21, 0.14) !important;
    color: #facc15 !important;
}
.card-bookmark-inline.is-bookmarked svg {
    fill: #facc15;
}
.profile-bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 0.85rem;
}
.profile-bookmark-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.profile-bookmark-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1;
}
.profile-bookmark-thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #050812;
}
.profile-bookmark-remove {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    font-size: 0.78rem;
}

/* 30-Day Daily Play Streak Heatmap Calendar (Under Achievements) */
.heatmap-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}
.heatmap-scroll-wrap {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.heatmap-calendar-grid {
    display: grid;
    gap: 5px;
    min-width: 280px;
    align-items: center;
}
.heatmap-day-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: left;
}
.hm-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
}
.heatmap-legend .hm-cell {
    width: 14px;
    height: 14px;
    min-width: 14px;
}
.hm-lvl-0 { background: rgba(148, 163, 184, 0.12); }
.hm-lvl-1 { background: rgba(0, 240, 255, 0.25); color: #e0f2fe; border-color: rgba(0, 240, 255, 0.35); }
.hm-lvl-2 { background: rgba(0, 240, 255, 0.52); color: #042f2e; border-color: rgba(0, 240, 255, 0.65); }
.hm-lvl-3 { background: rgba(16, 185, 129, 0.72); color: #ecfdf5; border-color: rgba(16, 185, 129, 0.85); }
.hm-lvl-4 { background: #10b981; color: #022c22; border-color: #34d399; box-shadow: 0 0 8px rgba(16, 185, 129, 0.35); }
.hm-cell.hm-empty { background: transparent; border-color: transparent; }
.hm-cell.hm-today { outline: 2px solid #facc15; outline-offset: 1px; }

/* Admin Category Distribution Analytics */
.admin-cat-wrap {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}
.admin-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
    flex: 1;
    min-width: 240px;
}
.admin-cat-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
}
.admin-cat-bar {
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 0.45rem;
}
.admin-cat-bar-fill {
    height: 100%;
    border-radius: 9999px;
}



