/* =============================================================================
   HyperBlock Arena — Hub polish layer
   Loaded AFTER main.css to refine layout, density, and motion on the hub.
   No JS, no logic; pure presentation upgrades.
   ========================================================================== */

/* =============================================================================
   AAA-style hub: sidebar nav (left) + top bar + content area (right).
   Replaces the previous centered-card "dashboard" layout.
   ========================================================================== */

#hub-screen .hub-container {
    max-width: min(1480px, 96vw);
    padding: 0;                          /* sidebar/topbar/content provide their own padding */
    border-color: rgba(0, 255, 255, 0.35);
    background: rgba(8, 12, 24, 0.92);
    box-shadow:
        0 0 40px rgba(0, 255, 255, 0.18),
        0 30px 80px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(0, 255, 255, 0.12);
    display: grid;
    grid-template-columns: 88px 1fr;     /* sidebar | main */
    grid-template-rows: 100%;
    height: 90vh;
    overflow: hidden;
}

#hub-screen .hub-container::before {
    /* Soft corner accent glow */
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    pointer-events: none;
    background:
        radial-gradient(600px circle at 0% 0%, rgba(0, 255, 255, 0.08), transparent 60%),
        radial-gradient(600px circle at 100% 100%, rgba(255, 51, 102, 0.06), transparent 60%);
    z-index: -1;
}

/* ---------- Header + title ---------- */

#hub-screen .hub-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
}

#hub-screen .hub-title {
    /* Tighter, more confident */
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: clamp(4px, 0.6vw, 9px);
    line-height: 1;
}

#hub-screen .hub-subtitle {
    margin-top: 6px;
}

/* Tagline below the title — clarifies the product in one line */
#hub-screen .hub-tagline {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: clamp(12px, 1vw, 14px);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    text-align: center;
}

#hub-screen .hub-tagline strong {
    color: #0ff;
    font-weight: 600;
}

/* ---------- Layout grid ---------- */

/* ---------- Sidebar nav ---------- */

#hub-screen .hub-sidebar {
    grid-column: 1;
    background:
        linear-gradient(180deg, rgba(0, 255, 255, 0.04), rgba(0, 0, 0, 0)) ,
        rgba(0, 0, 0, 0.55);
    border-right: 1px solid rgba(0, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 8px;
    gap: 6px;
    min-height: 0;
}

#hub-screen .sidebar-brand {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 255, 0.30);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.22), inset 0 0 6px rgba(0, 0, 0, 0.4);
}

#hub-screen .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Override legacy .hub-main-tab styles inherited from when it was a horizontal nav.
   The big offender is `flex: 1` which made each sidebar tab stretch to 1/5 of
   the column height, plus padding/font-size/background tuned for the old design. */
#hub-screen .sidebar-tab {
    appearance: none !important;
    flex: 0 0 auto !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    padding: 12px 6px !important;
    margin: 0 !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: rgba(255, 255, 255, 0.55) !important;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700 !important;
    font-size: 9px !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    text-align: center;
    line-height: 1 !important;
    /* Legacy rules we explicitly cancel */
    border-bottom: 1px solid transparent !important;
    box-shadow: none;
}

#hub-screen .sidebar-tab .sb-icon {
    font-size: 22px;
    line-height: 1;
    display: block;
}

#hub-screen .sidebar-tab .sb-label {
    font-size: 9px;
    letter-spacing: 1.2px;
    font-weight: 700;
    display: block;
    text-align: center;
    width: 100%;
}

#hub-screen .sidebar-tab:hover {
    color: #0ff !important;
    background: rgba(0, 255, 255, 0.08) !important;
}

#hub-screen .sidebar-tab.active {
    color: #001318 !important;
    background: linear-gradient(135deg, #4dffe0, #00ffff) !important;
    border-color: rgba(0, 255, 255, 0.5) !important;
    border-bottom-color: rgba(0, 255, 255, 0.5) !important;
    box-shadow: 0 6px 16px rgba(0, 255, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

#hub-screen .sidebar-tab.active .sb-label,
#hub-screen .sidebar-tab.active .sb-icon {
    color: #001318;
}

#hub-screen .sidebar-foot {
    margin-top: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    padding-top: 12px;
}

/* ---------- Main column (topbar + content) ---------- */

#hub-screen .hub-main {
    grid-column: 2;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
    min-width: 0;
}

#hub-screen .hub-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
}

#hub-screen .hub-topbar .hub-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

#hub-screen .hub-topbar .hub-title {
    font-size: clamp(24px, 2.4vw, 32px);
    letter-spacing: 5px;
    margin-bottom: 0;
    animation: none;     /* the giant logo glitch was for the old centered title */
    text-shadow: 0 0 10px #0ff, 0 0 24px rgba(0, 255, 255, 0.6);
}

#hub-screen .hub-topbar .hub-title::before,
#hub-screen .hub-topbar .hub-title::after { content: none; }

#hub-screen .hub-topbar .hub-subtitle {
    margin-top: 0;
    font-size: 14px;
    letter-spacing: 5px;
    color: #ff3366;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
}

#hub-screen .topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

#hub-screen .topbar-player {
    text-align: right;
}

#hub-screen .topbar-player-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    font-size: 14px;
}

#hub-screen .topbar-player-meta {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    justify-content: flex-end;
}

#hub-screen .topbar-chip {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

#hub-screen .topbar-chip.topbar-coins {
    color: #ffd55a;
    border-color: rgba(255, 213, 90, 0.35);
}

#hub-screen .topbar-stats {
    display: flex;
    gap: 10px;
    border-left: 1px solid rgba(0, 255, 255, 0.18);
    padding-left: 16px;
}

#hub-screen .topbar-stat {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
}

#hub-screen .topbar-stat span {
    color: #0ff;
    font-weight: 700;
    margin-left: 4px;
}

/* ---------- Tab content area ---------- */

#hub-screen .hub-tab-area {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px 32px;
    min-height: 0;
}

#hub-screen .hub-tab-area::-webkit-scrollbar { width: 8px; }
#hub-screen .hub-tab-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3); border-radius: 4px;
}
#hub-screen .hub-tab-area::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.35); border-radius: 4px;
}

#hub-screen .hub-main-tab-content {
    width: 100%;
}

/* ---------- Settings panel ---------- */

.settings-panel {
    max-width: 720px;
    margin: 0 auto;
}

.settings-header {
    text-align: center;
    margin-bottom: 28px;
}

.settings-title {
    font-family: 'Orbitron', sans-serif;
    color: #0ff;
    letter-spacing: 5px;
    margin: 0;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

.settings-subtitle {
    color: rgba(255, 255, 255, 0.55);
    margin: 8px 0 0;
    letter-spacing: 2px;
    font-size: 13px;
}

.settings-section {
    background: rgba(15, 22, 40, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.14);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

.settings-section-title {
    color: #0ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.10);
    padding-bottom: 10px;
}

.settings-row {
    display: grid;
    grid-template-columns: minmax(100px, 200px) 1fr;
    align-items: center;
    gap: 18px;
    padding: 10px 0;
}

.settings-row-label {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    letter-spacing: 1px;
}

.settings-row-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-row-control input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg,
        rgba(0, 255, 255, 0.5) 0%,
        rgba(0, 255, 255, 0.5) var(--vol, 35%),
        rgba(255, 255, 255, 0.1) var(--vol, 35%),
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.settings-row-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%; background: #0ff;
    border: 2px solid #001318;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.55);
    cursor: pointer;
}

.keybinds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.keybind {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.keybind kbd {
    font-family: 'Orbitron', monospace;
    background: rgba(0, 255, 255, 0.12);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #0ff;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
}

.settings-about {
    color: rgba(255, 255, 255, 0.75);
    margin: 6px 0;
    font-size: 13px;
}
.settings-about.settings-about-dim {
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- Mobile fallback: sidebar becomes a bottom bar ---------- */

@media (max-width: 760px) {
    #hub-screen .hub-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: 100vh;
    }
    #hub-screen .hub-sidebar {
        grid-column: 1;
        grid-row: 2;
        flex-direction: row;
        border-right: 0;
        border-top: 1px solid rgba(0, 255, 255, 0.18);
        padding: 6px 4px;
        gap: 4px;
    }
    #hub-screen .sidebar-brand { display: none; }
    #hub-screen .sidebar-foot { display: none; }
    #hub-screen .sidebar-nav {
        flex-direction: row;
        flex: 1;
        justify-content: space-around;
    }
    #hub-screen .sidebar-tab { flex: 1; padding: 8px 2px; }
    #hub-screen .sidebar-tab .sb-icon { font-size: 18px; }
    #hub-screen .sidebar-tab .sb-label { font-size: 8px; }
    #hub-screen .hub-main {
        grid-column: 1;
        grid-row: 1;
    }
    #hub-screen .hub-topbar { padding: 10px 14px; }
    #hub-screen .hub-topbar .hub-subtitle { display: none; }
    #hub-screen .topbar-stats { display: none; }
    #hub-screen .hub-tab-area { padding: 16px 14px 24px; }
}

/* On narrower laptop widths, slim the sidebar a touch */
@media (max-width: 1200px) {
    #hub-screen .hub-content {
        grid-template-columns: 300px 1fr;
        gap: 22px;
    }
}

/* Collapse to single column under 960px.
   On mobile, the existing main.css gives .hub-container overflow-y:auto, so
   the whole hub becomes one scrollable page. We disable our nested scroll
   containers there to avoid 2+ overlapping scrollbars. */
@media (max-width: 960px) {
    #hub-screen .hub-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 18px;
    }
    #hub-screen .hub-container {
        padding: 22px 22px 28px;
    }
    #hub-screen .hub-left {
        overflow: visible;
        padding-right: 0;
    }
    #hub-screen #tab-servers > .servers-section {
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }
    #hub-screen #tab-servers > .servers-section > .servers-header {
        position: static;
        background: transparent;
    }
}

/* ---------- Tab content scroll model ----------
   The right panel's active tab is a vertical flex column.
   Layout per tab: a fixed-height hero (Quick Play) + a scrollable
   section. Without explicit flex-shrink:0 on the hero and overflow-y:auto
   on the section, everything would grow to its natural height and spill
   beyond .hub-container (max-height: 90vh). */

#hub-screen .hub-main-tab-content.active {
    overflow: hidden; /* belt-and-braces; main.css already sets this */
}

/* The whole .hub-tab-area now scrolls (new AAA layout), so the servers
   section flows naturally — no nested scroll, no sticky header. */
#hub-screen #tab-servers > .quick-play-hero { flex-shrink: 0; }
#hub-screen #tab-servers > .servers-section {
    flex: initial;
    overflow: visible;
    padding-right: 0;
    mask-image: none;
    -webkit-mask-image: none;
}
#hub-screen #tab-servers > .servers-section > .servers-header {
    position: static;
    background: transparent;
    flex-shrink: 0;
}

/* ---------- Quick Play hero ---------- */

.quick-play-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(0, 255, 255, 0.10), rgba(255, 51, 102, 0.05) 60%, rgba(0, 0, 0, 0.0)),
        linear-gradient(180deg, rgba(15, 22, 40, 0.95), rgba(8, 12, 24, 0.95));
    border: 1px solid rgba(0, 255, 255, 0.25);
    overflow: hidden;
    isolation: isolate;
}

.quick-play-hero::before {
    /* Subtle animated sheen */
    content: '';
    position: absolute;
    inset: -50% -10%;
    background:
        radial-gradient(40% 50% at 20% 30%, rgba(0, 255, 255, 0.15), transparent 70%),
        radial-gradient(40% 50% at 80% 70%, rgba(255, 51, 102, 0.12), transparent 70%);
    z-index: -1;
    animation: qpDrift 14s ease-in-out infinite alternate;
}

@keyframes qpDrift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(3%, -2%); }
}

.qp-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.18), rgba(0, 255, 255, 0.04));
    border: 1px solid rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.18), inset 0 0 12px rgba(0, 255, 255, 0.1);
}

.qp-content {
    min-width: 0;
}

.qp-eyebrow {
    color: #0ff;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    opacity: 0.85;
}

.qp-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1.1;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}

.qp-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 4px;
}

.qp-cta {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #001318;
    background: linear-gradient(135deg, #4dffe0, #00ffff);
    box-shadow:
        0 6px 18px rgba(0, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    white-space: nowrap;
}

.qp-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
        0 8px 24px rgba(0, 255, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.qp-cta:active { transform: translateY(0); }

@media (max-width: 720px) {
    .quick-play-hero {
        grid-template-columns: auto 1fr;
        row-gap: 12px;
        padding: 16px 16px;
    }
    .qp-cta {
        grid-column: 1 / -1;
        width: 100%;
        padding: 14px;
    }
}

/* ---------- Hub stats row in hero (overlay quick numbers) ---------- */

.qp-stats {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.qp-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.qp-stat strong {
    color: #0ff;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
}

/* ---------- Server list refinements ---------- */

#hub-screen .servers-section {
    gap: 0;
}

#hub-screen .servers-header {
    margin-bottom: 12px;
    align-items: flex-end;
}

#hub-screen .servers-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
}

#hub-screen .servers-title::before {
    content: '◆ ';
    color: #ff3366;
    margin-right: 4px;
}

/* #servers-list is no longer the scroll container — its parent
   .servers-section is. Let it size to its content. */
#hub-screen #servers-list {
    flex: 0 0 auto;
    overflow: visible;
    padding-right: 0;
}

#hub-screen .server-card {
    margin-bottom: 8px;
    border-radius: 10px;
    border-color: rgba(0, 255, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#hub-screen .server-card:hover {
    transform: translateX(0) translateY(-1px);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow:
        0 8px 24px rgba(0, 255, 255, 0.15),
        0 0 0 1px rgba(0, 255, 255, 0.2) inset;
}

#hub-screen .server-card-content {
    padding: 12px 14px;
}

/* ---------- Battle Arenas / Map gallery ---------- */

.map-gallery {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 255, 255, 0.12);
}

.map-gallery-title {
    color: #0ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.map-gallery-title::before {
    content: '⚔ ';
    color: #ff3366;
    margin-right: 4px;
}

.map-gallery-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.map-card {
    position: relative;
    border-radius: 10px;
    padding: 16px 14px 14px;
    background: linear-gradient(180deg, rgba(15, 22, 40, 0.85), rgba(8, 12, 24, 0.95));
    border: 1px solid rgba(0, 255, 255, 0.12);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    cursor: default;
}

.map-card::before {
    /* Color-tinted aura that's unique per map (set via --map-tint) */
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(50% 60% at 70% 20%, var(--map-tint, rgba(0, 255, 255, 0.18)), transparent 70%);
    opacity: 0.6;
    transition: opacity 0.22s ease;
    z-index: 0;
}

.map-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 255, 255, 0.2) inset;
}

.map-card:hover::before { opacity: 1; }

.map-card > * { position: relative; z-index: 1; }

.map-card-emoji {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.map-card-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.map-card-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.4;
}

.map-card-meta {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.map-tag {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.map-card[data-map="classic"]  { --map-tint: rgba(93, 158, 60, 0.30); }
.map-card[data-map="castle"]   { --map-tint: rgba(150, 75, 56, 0.30); }
.map-card[data-map="factory"]  { --map-tint: rgba(255, 165, 0, 0.25); }
.map-card[data-map="islands"]  { --map-tint: rgba(170, 221, 255, 0.30); }

/* ---------- Profile card login overlay cleanup ---------- */

#hub-screen .login-required-overlay.compact {
    /* Cleaner solid backdrop so XP/Coin elements don't peek through */
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.94), rgba(8, 12, 24, 0.98));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 16px 14px;
}

#hub-screen .login-required-icon {
    font-size: 26px;
    margin-bottom: 8px;
    opacity: 0.85;
}

#hub-screen .login-required-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    color: #0ff;
    text-transform: uppercase;
    margin-bottom: 14px;
}

#hub-screen .login-required-buttons {
    gap: 8px;
}

#hub-screen .login-required-buttons .auth-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#hub-screen .login-required-buttons .auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* ---------- Quick Actions polish ---------- */

#hub-screen .quick-actions {
    padding: 16px;
}

#hub-screen .create-server-btn,
#hub-screen .daily-reward-btn {
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

#hub-screen .create-server-btn:hover,
#hub-screen .daily-reward-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

/* ---------- Global Stats card ---------- */

#hub-screen .hub-stats {
    padding: 16px;
}

#hub-screen .hub-stats-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
}

#hub-screen .stat-value {
    background: linear-gradient(180deg, #ffffff, #0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 18px rgba(0, 255, 255, 0.4);
}

/* ---------- Tabs ---------- */

#hub-screen .hub-main-tabs {
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
}

#hub-screen .hub-main-tab {
    transition: color 0.18s ease, background 0.18s ease;
    position: relative;
}

#hub-screen .hub-main-tab.active::after {
    /* Underline accent (works alongside whatever main.css does) */
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ff, transparent);
    border-radius: 2px;
}

/* ---------- Small entrance animation for hub content ---------- */

@keyframes hubFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

#hub-screen .hub-content,
#hub-screen .quick-play-hero,
#hub-screen .map-gallery {
    animation: hubFadeIn 0.45s ease-out both;
}

#hub-screen .quick-play-hero { animation-delay: 0.05s; }
#hub-screen .map-gallery     { animation-delay: 0.15s; }

/* ---------- Light reduced-motion handling ---------- */

@media (prefers-reduced-motion: reduce) {
    #hub-screen .quick-play-hero::before { animation: none; }
    #hub-screen .hub-content,
    #hub-screen .quick-play-hero,
    #hub-screen .map-gallery { animation: none; }
}

/* =============================================================================
   In-game Minimap polish
   Pairs with the rewritten drawMinimapDynamic() in 13-effects.js.
   ========================================================================== */

#minimap-container {
    /* Override main.css defaults: bigger, circular, neon framed. */
    width: 180px !important;
    height: 180px !important;
    background:
        radial-gradient(circle at 35% 30%, rgba(0, 255, 255, 0.08), transparent 55%),
        radial-gradient(circle at 70% 75%, rgba(255, 51, 102, 0.06), transparent 55%),
        rgba(5, 7, 18, 0.85) !important;
    border: 1px solid rgba(0, 255, 255, 0.45) !important;
    border-radius: 50% !important;
    box-shadow:
        0 0 18px rgba(0, 255, 255, 0.18),
        0 0 40px rgba(0, 255, 255, 0.08),
        inset 0 0 14px rgba(0, 0, 0, 0.55),
        inset 0 0 0 2px rgba(0, 0, 0, 0.55),
        inset 0 0 0 3px rgba(0, 255, 255, 0.20);
    overflow: hidden;
    /* Subtle breathing animation on the outer glow */
    animation: minimapPulse 3.6s ease-in-out infinite;
}

@keyframes minimapPulse {
    0%, 100% { box-shadow:
        0 0 18px rgba(0, 255, 255, 0.18),
        0 0 40px rgba(0, 255, 255, 0.08),
        inset 0 0 14px rgba(0, 0, 0, 0.55),
        inset 0 0 0 2px rgba(0, 0, 0, 0.55),
        inset 0 0 0 3px rgba(0, 255, 255, 0.20); }
    50%      { box-shadow:
        0 0 22px rgba(0, 255, 255, 0.28),
        0 0 55px rgba(0, 255, 255, 0.14),
        inset 0 0 14px rgba(0, 0, 0, 0.55),
        inset 0 0 0 2px rgba(0, 0, 0, 0.55),
        inset 0 0 0 3px rgba(0, 255, 255, 0.32); }
}

#minimap-container::before {
    /* Soft tick marks at 12/3/6/9 o'clock for a radar feel */
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(0deg,   transparent calc(50% - 1px), rgba(0, 255, 255, 0.18) 50%, transparent calc(50% + 1px)) center top    / 2px 8px no-repeat,
        linear-gradient(0deg,   transparent calc(50% - 1px), rgba(0, 255, 255, 0.18) 50%, transparent calc(50% + 1px)) center bottom / 2px 8px no-repeat,
        linear-gradient(90deg,  transparent calc(50% - 1px), rgba(0, 255, 255, 0.18) 50%, transparent calc(50% + 1px)) left   center / 8px 2px no-repeat,
        linear-gradient(90deg,  transparent calc(50% - 1px), rgba(0, 255, 255, 0.18) 50%, transparent calc(50% + 1px)) right  center / 8px 2px no-repeat;
    z-index: 1;
}

#minimap {
    width: 100% !important;
    height: 100% !important;
    /* Drop pixelated rendering — the new radar uses smooth gradients */
    image-rendering: auto !important;
    display: block;
}

/* Slightly smaller on narrow viewports / mobile */
@media (max-width: 768px), (pointer: coarse) {
    #minimap-container {
        width: 130px !important;
        height: 130px !important;
        bottom: 70px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #minimap-container { animation: none; }
}

/* =============================================================================
   End-of-match screen — make it scroll instead of overflow.
   The default rules use flex center which pushes tall content above + below
   the viewport, making the top + bottom unreachable. Switch to a scrollable
   overlay anchored to the top, then center horizontally.
   ========================================================================== */

#end-screen {
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 24px 16px !important;
    box-sizing: border-box;
}

#end-screen .end-container {
    max-width: min(960px, 96vw) !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 28px 32px !important;
    width: 100%;
    box-sizing: border-box;
}

#end-screen::-webkit-scrollbar { width: 10px; }
#end-screen::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
#end-screen::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.35);
    border-radius: 5px;
}
#end-screen::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 255, 0.55); }

#end-screen .end-title {
    font-size: clamp(28px, 4vw, 44px) !important;
    margin-bottom: 6px !important;
    letter-spacing: 5px !important;
}

#end-screen .end-subtitle {
    font-size: 14px !important;
    margin-bottom: 18px !important;
}

@media (max-width: 720px) {
    #end-screen .end-container {
        padding: 22px 18px !important;
    }
}

/* =============================================================================
   Unified login wall — single component used by Career / Shop / Ranks tabs
   when the user isn't signed in. Driven by `body.is-locked` (toggled from
   updateAuthUI() based on `authUser`).
   ========================================================================== */

/* Default: lock screen hidden, real content shown */
.tab-lock-screen { display: none; }

/* When the user is anonymous, every gated tab shows ONLY its lock screen */
body.is-locked .hub-main-tab-content.tab-locked > .tab-lock-screen {
    display: flex;
}
body.is-locked .hub-main-tab-content.tab-locked > :not(.tab-lock-screen) {
    display: none !important;
}

/* Lock screen layout */
.tab-lock-screen {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 560px;
    margin: 24px auto;
    padding: 36px 28px 32px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(0, 255, 255, 0.10), transparent 70%),
        radial-gradient(120% 80% at 50% 100%, rgba(255, 51, 102, 0.06), transparent 70%),
        rgba(8, 12, 24, 0.85);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.55),
        0 0 50px rgba(0, 255, 255, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: lockScreenIn 0.45s ease-out;
}

@keyframes lockScreenIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lock-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 18px;
    filter: drop-shadow(0 0 16px rgba(0, 255, 255, 0.35));
}

.lock-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: clamp(22px, 2.4vw, 28px);
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 14px rgba(0, 255, 255, 0.45);
    margin-bottom: 10px;
}

.lock-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.55;
    max-width: 440px;
    margin: 0 auto 18px;
    letter-spacing: 0.2px;
}

.lock-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
}

.lock-perk {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(0, 255, 255, 0.85);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.22);
}

.lock-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.lock-buttons .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}

.lock-buttons .auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.lock-buttons .auth-btn.google {
    background: #ffffff;
    color: #1f1f1f;
}

.lock-buttons .auth-btn.discord {
    background: #5865F2;
    color: #ffffff;
}

.lock-buttons .auth-btn.email {
    background: linear-gradient(135deg, #4dffe0, #00ffff);
    color: #001318;
    border-color: rgba(0, 255, 255, 0.5);
}

.lock-foot {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 0.5px;
    max-width: 400px;
}

/* ----- Email Auth Modal (top-level overlay) -----
   The form used to live inside the Career tab; when the tab was gated by
   the lock screen, its parent went display:none and the form couldn't open.
   It's now a true top-level modal, opened by openEmailAuthModal(). */

#auth-section {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;            /* shown only when its child form has .active */
    align-items: center;
    justify-content: center;
    background: rgba(0, 4, 12, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-top: 0 !important;  /* override inherited .auth-section margin */
    padding-top: 0 !important;
}

#auth-section:has(.email-auth-form.active) { display: flex; }

/* Fallback for browsers without :has() — JS toggles a class on #auth-section */
#auth-section.is-open { display: flex; }

#auth-section .email-auth-form {
    position: relative;
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.96), rgba(0, 0, 0, 0.96));
    border: 1px solid rgba(0, 255, 255, 0.35);
    border-radius: 14px;
    padding: 26px 28px 22px;
    width: min(380px, 92vw);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(0, 255, 255, 0.12),
        inset 0 0 0 1px rgba(0, 255, 255, 0.08);
    animation: emailModalIn 0.25s ease-out;
}

@keyframes emailModalIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.email-auth-title {
    font-family: 'Orbitron', sans-serif;
    color: #0ff;
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}

.email-auth-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.email-auth-close:hover {
    color: #0ff;
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.10);
}

/* Sidebar: small lock indicator on gated tabs while signed-out */
#hub-screen .sidebar-tab.requires-auth { position: relative; }
#hub-screen .sidebar-tab.requires-auth::after {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.15s;
}
#hub-screen .sidebar-tab.requires-auth:hover::after { opacity: 0.9; }

/* Hide the lock indicator once the user is signed in */
body:not(.is-locked) #hub-screen .sidebar-tab.requires-auth::after { content: none; }

/* The active locked tab keeps its highlight; the lock icon switches color */
#hub-screen .sidebar-tab.active.requires-auth::after { color: #001318; opacity: 0.7; }

/* =============================================================================
   Pause menu overhaul (AAA-style overlay)
   ========================================================================== */

#pause-menu .pause-container {
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.96), rgba(0, 0, 0, 0.96)) !important;
    border: 1px solid rgba(0, 255, 255, 0.30) !important;
    border-radius: 16px !important;
    padding: 32px 36px !important;
    max-width: 520px !important;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 255, 255, 0.12),
        inset 0 0 0 1px rgba(0, 255, 255, 0.08) !important;
}

.pause-eyebrow {
    color: rgba(0, 255, 255, 0.6);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 6px;
}

#pause-menu .pause-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 28px;
    text-shadow: 0 0 14px rgba(0, 255, 255, 0.5);
}

#pause-menu .pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

#pause-menu .pause-btn {
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 3px !important;
    font-size: 13px !important;
    padding: 14px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0, 255, 255, 0.25) !important;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s !important;
}

#pause-menu .pause-btn.resume {
    background: linear-gradient(135deg, #4dffe0, #00ffff) !important;
    color: #001318 !important;
    border-color: rgba(0, 255, 255, 0.6) !important;
    box-shadow: 0 6px 18px rgba(0, 255, 255, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

#pause-menu .pause-btn.hub {
    background: rgba(255, 51, 102, 0.10) !important;
    color: #ff5577 !important;
    border-color: rgba(255, 51, 102, 0.45) !important;
}

#pause-menu .pause-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

.pause-section {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(0, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
}

.pause-section-title {
    color: #0ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

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

.pause-keybinds .keybind {
    background: transparent;
    border: 0;
    padding: 6px 2px;
    font-size: 12px;
}

#pause-menu .pause-hint {
    text-align: center;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 2px;
}

#pause-menu .pause-hint kbd {
    font-family: 'Orbitron', monospace;
    background: rgba(0, 255, 255, 0.12);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #0ff;
    border-radius: 4px;
    padding: 1px 7px;
    margin: 0 2px;
    font-size: 10px;
    letter-spacing: 1px;
}

/* =============================================================================
   In-game HUD layout — Valorant/Apex-aligned
   Minimap top-left · timer top-center · killfeed top-right · score top-right
   Charge/ammo bottom-right (weapon block) · killstreak bottom-center
   ========================================================================== */

/* Minimap → top-left */
#minimap-container {
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
    bottom: auto !important;
}

/* Game container + canvas MUST fill the viewport with no top gap so the
   dark body color (#0a0a0f) can't show through above the rendered scene. */
#game-container,
#game-container canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Game timer stays top-center — transparent, just glowing text.
   (We previously had a dark pill + backdrop-filter here which read as a
   horizontal bar across the top of the screen.) */
#game-timer {
    top: 16px !important;
    font-size: 28px !important;
    padding: 0 !important;
    letter-spacing: 4px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.9),
        0 0 16px rgba(0, 255, 255, 0.35) !important;
}

/* Score-board WRAPPER must be position:absolute and content-width — the
   stock #score-board is `display:flex; justify-content:flex-end` with NO
   `position`, so any background we add spans the full width of #ui-layer
   (creating a black bar across the top of the screen). The compact pill
   styling now lives on the inner .stat-box instead. */
#score-board {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: block !important;
    font-family: 'Orbitron', sans-serif;
}

#score-board .stat-box {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 6px 14px !important;
    min-width: 110px;
    background: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(0, 255, 255, 0.25) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#score-board .stat-label {
    font-size: 10px !important;
    letter-spacing: 2px !important;
    color: rgba(0, 255, 255, 0.7) !important;
    text-transform: uppercase !important;
    margin: 0 !important;
}

#score-board .stat-value {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1 !important;
    margin: 0 !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* Kill feed → top-right, anchored BELOW the score-board with breathing room */
#kill-feed {
    top: 76px !important;
    right: 20px !important;
    left: auto !important;
    text-align: right !important;
    align-items: flex-end !important;
}

#kill-feed > * {
    text-align: right;
}

/* Killstreak HUD → bottom-center above the ammo bar (compact pill) */
#killstreak-hud {
    bottom: 100px !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    transform: translateX(-50%);
}

/* Charge bar / "ammo" → bottom-right as a weapon block */
#ammo-container {
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    transform: none !important;
    width: 280px !important;
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.85), rgba(0, 0, 0, 0.85)) !important;
    border: 1px solid rgba(0, 255, 255, 0.30) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#ammo-label {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 2px !important;
    color: rgba(0, 255, 255, 0.75) !important;
    text-transform: uppercase;
    margin-bottom: 6px;
}

#ammo-bar-container {
    height: 8px !important;
    background: rgba(0, 0, 0, 0.65) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 255, 255, 0.18) !important;
}

#ammo-bar {
    border-radius: 4px !important;
    background: linear-gradient(90deg, #4dffe0, #00ffff) !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Crosshair tightened a hair */
#crosshair { opacity: 0.95; }

/* Mobile HUD: keep minimap top-left and shrink the weapon block */
@media (max-width: 768px), (pointer: coarse) {
    #ammo-container {
        bottom: 14px !important;
        right: 14px !important;
        width: 180px !important;
        padding: 6px 10px !important;
    }
    #minimap-container {
        top: 14px !important;
        left: 14px !important;
    }
    #game-timer {
        top: 10px !important;
        font-size: 22px !important;
        padding: 4px 12px !important;
    }
}

/* =============================================================================
   Background-music controls (hub button + pause-menu slider)
   ========================================================================== */

.music-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.35);
    background:
        radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.18), transparent 60%),
        rgba(8, 12, 24, 0.85);
    color: #0ff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 12px rgba(0, 255, 255, 0.18),
        inset 0 0 8px rgba(0, 0, 0, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    margin-left: 10px;
}

.music-toggle-btn:hover {
    transform: translateY(-1px);
    color: #fff;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.35),
        inset 0 0 8px rgba(0, 0, 0, 0.55);
}

.music-toggle-btn.muted {
    color: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 80, 110, 0.45);
    box-shadow:
        0 0 12px rgba(255, 80, 110, 0.18),
        inset 0 0 8px rgba(0, 0, 0, 0.55);
}

/* Position the hub music toggle into the header-stats row */
#hub-header-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Pause-menu music row: button + slider + label */
.pause-music-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px auto 6px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 255, 0.18);
    border-radius: 10px;
    max-width: 320px;
}

.pause-music-row .music-toggle-btn { margin-left: 0; }

.pause-music-label {
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

input[type="range"]#music-volume {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg,
        rgba(0, 255, 255, 0.5) 0%,
        rgba(0, 255, 255, 0.5) var(--vol, 35%),
        rgba(255, 255, 255, 0.1) var(--vol, 35%),
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

input[type="range"]#music-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0ff;
    border: 2px solid #001318;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.55);
    cursor: pointer;
}

input[type="range"]#music-volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0ff;
    border: 2px solid #001318;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.55);
    cursor: pointer;
}
