:root {
    --primary: #37f7ff;
    --primary-soft: rgba(55, 247, 255, 0.18);
    --secondary: #ff2f8f;
    --secondary-soft: rgba(255, 47, 143, 0.18);
    --success: #35ff95;
    --warning: #ffd166;
    --violet: #8e6cff;
    --bg-dark: #02020a;
    --panel-bg: rgba(8, 12, 31, 0.76);
    --panel-border: rgba(141, 233, 255, 0.28);
    --text-muted: #a6b3df;
    --glass: rgba(255, 255, 255, 0.055);
}

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

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 47, 143, 0.24), transparent 28%),
        radial-gradient(circle at 78% 12%, rgba(55, 247, 255, 0.22), transparent 30%),
        radial-gradient(circle at 55% 78%, rgba(142, 108, 255, 0.26), transparent 34%),
        linear-gradient(145deg, #02020a 0%, #07091c 48%, #010106 100%);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
}

body.mobile-game-mode {
    overscroll-behavior: none;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: 0;
    opacity: 0.42;
    background-image:
        radial-gradient(#ffffff 0.7px, transparent 0.7px),
        radial-gradient(rgba(55, 247, 255, 0.85) 0.8px, transparent 0.8px);
    background-size: 58px 58px, 103px 103px;
    background-position: 0 0, 26px 18px;
    animation: starDrift 42s linear infinite;
}

body::after {
    z-index: 2;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.42) 82%);
    background-size: 100% 4px, 100% 100%;
    mix-blend-mode: screen;
    opacity: 0.34;
}

body.game-running::before,
body.game-running::after {
    display: none !important;
}

body.game-running,
body.game-running canvas {
    cursor: none !important;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    position: absolute;
    z-index: 1;
}

#custom-game-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.75));
    transition: opacity 0.12s ease;
}

body.game-running #custom-game-cursor {
    opacity: 1;
}

body.use-normal-cursor,
body.use-normal-cursor canvas {
    cursor: auto !important;
}

body.easy-mode-cursor-off,
body.easy-mode-cursor-off canvas {
    cursor: none !important;
}

body.use-normal-cursor #custom-game-cursor,
body.easy-mode-cursor-off #custom-game-cursor {
    opacity: 0 !important;
}

#game-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 23, 74, 0.20), transparent 28%),
        radial-gradient(circle at 50% 58%, rgba(34, 211, 238, 0.16), transparent 34%),
        rgba(1, 3, 10, 0.82);
}

#game-loading-overlay.active {
    display: flex;
}

.game-loading-card {
    padding: 22px 34px;
    border: 3px solid rgba(40, 224, 255, 0.62);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
        linear-gradient(145deg, rgba(58, 18, 154, 0.92), rgba(15, 112, 209, 0.72));
    color: #eaffff;
    font: 900 clamp(1.1rem, 2vw, 1.75rem) "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    text-shadow: 0 0 16px rgba(31, 222, 255, 0.55);
    box-shadow: 0 0 28px rgba(31, 222, 255, 0.42), inset 0 3px 0 rgba(255, 255, 255, 0.18);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 47, 143, 0.20), transparent 34%),
        radial-gradient(circle at 78% 20%, rgba(55, 247, 255, 0.18), transparent 31%),
        radial-gradient(circle at 48% 86%, rgba(142, 108, 255, 0.24), transparent 38%),
        linear-gradient(160deg, rgba(2, 2, 10, 0.72), rgba(2, 4, 17, 0.96));
    backdrop-filter: blur(18px) saturate(135%);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease;
}

.screen::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(141, 233, 255, 0.10);
    border-radius: 28px;
    pointer-events: none;
    box-shadow: inset 0 0 90px rgba(55, 247, 255, 0.045);
}

.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
}

.panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 44%),
        linear-gradient(135deg, rgba(8, 12, 31, 0.84), rgba(5, 7, 20, 0.78));
    border: 1px solid var(--panel-border);
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.58),
        0 0 55px rgba(55, 247, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 0 42px rgba(55, 247, 255, 0.065);
    border-radius: 22px;
    padding: 38px;
    text-align: center;
    max-width: 780px;
    width: min(92vw, 780px);
    animation: panelFloat 7s ease-in-out infinite;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(55, 247, 255, 0.18), transparent) top left / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 34%);
}

.panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -90px;
    top: -90px;
    background: radial-gradient(circle, rgba(255, 47, 143, 0.20), transparent 68%);
    pointer-events: none;
}

#main-menu {
    justify-content: flex-start;
    overflow-y: auto;
}

#main-menu .panel {
    width: min(92vw, 720px);
    margin: auto 0;
    padding: clamp(22px, 4vh, 34px);
}

.main-stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.main-stat-pill {
    background: rgba(255, 170, 0, 0.1);
    border: 1px dashed var(--warning);
    padding: 7px 18px;
    border-radius: 999px;
    font-family: monospace;
    font-size: clamp(0.88rem, 2vw, 1.1rem);
    color: var(--warning);
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.15);
}

.main-stat-pill.highscore {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--primary);
}

.main-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.main-actions .btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 13px 14px;
}

.mobile-game-btn {
    display: inline-flex;
}

.main-fullscreen-btn {
    position: fixed;
    top: 14px;
    right: 64px;
    z-index: 40;
    width: 38px;
    height: 38px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1;
}

.menu-nav-btn {
    position: fixed;
    top: 14px;
    z-index: 9999;
    width: 42px;
    height: 38px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#menu-back-btn {
    left: 14px;
}

#menu-home-btn {
    right: 14px;
}

.menu-nav-btn.hidden {
    display: none !important;
}

h1,
h2,
h3,
p {
    position: relative;
    z-index: 1;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.95;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0;
    background: linear-gradient(180deg, #ffffff 10%, #bffcff 46%, #37f7ff 72%, #ff9ad0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 22px rgba(55, 247, 255, 0.38));
}

h2 {
    margin: 0 0 10px;
    color: #eef8ff;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    text-transform: uppercase;
    letter-spacing: 0;
    text-shadow: 0 0 18px rgba(55, 247, 255, 0.24);
}

h3 {
    letter-spacing: 0 !important;
}

p {
    color: var(--text-muted);
    line-height: 1.5;
}

.subtitle {
    color: #b8c5ff;
    font-size: 0.95rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 26px;
    text-shadow: 0 0 14px rgba(142, 108, 255, 0.45);
}

.btn {
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    min-width: 190px;
    background:
        linear-gradient(135deg, rgba(55, 247, 255, 0.18), rgba(142, 108, 255, 0.20)),
        rgba(255, 255, 255, 0.035);
    color: #f7fdff;
    border: 1px solid rgba(55, 247, 255, 0.62);
    padding: 14px 28px;
    font-size: 0.98rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, color 0.22s ease;
    box-shadow:
        0 0 18px rgba(55, 247, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
    margin: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: translateX(-120%) skewX(-18deg);
    transition: transform 0.45s ease;
}

.btn:hover {
    transform: translateY(-3px);
    border-color: #ffffff;
    color: #041018;
    background: linear-gradient(135deg, #37f7ff, #8e6cff);
    box-shadow: 0 12px 32px rgba(55, 247, 255, 0.34), 0 0 36px rgba(142, 108, 255, 0.22);
}

.btn:hover::before {
    transform: translateX(120%) skewX(-18deg);
}

.btn:disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.profile-widget {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 60;
}

.profile-button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(55, 247, 255, 0.62);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(55, 247, 255, 0.18), rgba(142, 108, 255, 0.20)),
        rgba(255, 255, 255, 0.035);
    color: #f7fdff;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 0 18px rgba(55, 247, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.profile-button.signed-in {
    border-color: rgba(53, 255, 149, 0.76);
    color: var(--success);
    box-shadow: 0 0 22px rgba(53, 255, 149, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.profile-panel {
    position: absolute;
    top: 48px;
    right: 0;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 28px));
    padding: 14px;
    border: 1px solid rgba(55, 247, 255, 0.26);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(8, 12, 31, 0.96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.56), 0 0 42px rgba(55, 247, 255, 0.14);
    backdrop-filter: blur(16px) saturate(135%);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.auth-tab {
    padding: 10px 12px;
    border: 1px solid rgba(55, 247, 255, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.auth-tab.active {
    border-color: rgba(255, 209, 102, 0.7);
    background: rgba(255, 209, 102, 0.14);
    color: var(--warning);
}

.profile-panel input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(141, 233, 255, 0.28);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
    padding: 11px 12px;
    font: 700 0.92rem "Segoe UI", Arial, sans-serif;
    user-select: text;
}

.profile-panel .btn {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 14px;
    font-size: 0.8rem;
}

.auth-status {
    min-height: 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-status.good {
    color: var(--success);
}

.auth-status.bad {
    color: var(--secondary);
}

.auth-row.hidden,
.auth-actions .hidden {
    display: none;
}

.btn-secondary {
    border-color: rgba(255, 47, 143, 0.64);
    background:
        linear-gradient(135deg, rgba(255, 47, 143, 0.16), rgba(255, 209, 102, 0.08)),
        rgba(255, 255, 255, 0.025);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ff2f8f, #ffd166);
    color: #12040b;
    box-shadow: 0 12px 32px rgba(255, 47, 143, 0.30);
}

.map-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    position: relative;
    padding: 24px 10px;
}

.map-node {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    cursor: not-allowed;
    position: relative;
    transition: all 0.25s ease;
    color: rgba(255, 255, 255, 0.38);
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.5);
}

.map-node::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.map-node.unlocked {
    border-color: rgba(55, 247, 255, 0.75);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(55, 247, 255, 0.24), inset 0 0 26px rgba(55, 247, 255, 0.10);
}

.map-node.unlocked:hover {
    transform: translateY(-5px) scale(1.06);
    border-color: #fff;
    background: radial-gradient(circle at 35% 25%, #ffffff, #37f7ff 46%, #2556ff 100%);
    color: #02020a;
    box-shadow: 0 0 34px rgba(55, 247, 255, 0.52);
}

.map-node.completed {
    border-color: rgba(53, 255, 149, 0.82);
    background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), rgba(53, 255, 149, 0.18));
    color: var(--success);
}

.map-line {
    height: 3px;
    width: 44px;
    flex-grow: 1;
    max-width: 52px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

.map-line.active {
    background: linear-gradient(90deg, var(--success), var(--primary));
    box-shadow: 0 0 14px rgba(55, 247, 255, 0.42);
}

.universe-arrow {
    width: 70px;
    height: 52px;
    border: 1px solid rgba(55, 247, 255, 0.64);
    border-radius: 14px;
    background: rgba(55, 247, 255, 0.12);
    color: #dffcff;
    font-size: 1.35rem;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(55, 247, 255, 0.22);
}

.universe-arrow:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.map-container.blue-universe .map-node.unlocked {
    border-color: rgba(88, 190, 255, 0.88);
    box-shadow: 0 0 24px rgba(88, 190, 255, 0.36), inset 0 0 28px rgba(88, 190, 255, 0.14);
}

.map-container.blue-universe .map-line.active {
    background: linear-gradient(90deg, #58beff, #7ee7ff);
    box-shadow: 0 0 16px rgba(88, 190, 255, 0.54);
}

.shop-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 18px 0;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.shop-viewport {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 18px;
    width: 100%;
    max-width: 690px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.08);
    justify-content: flex-start;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-viewport::-webkit-scrollbar {
    height: 8px;
}

.shop-viewport::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
}

.shop-viewport::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary), var(--violet));
    border-radius: 999px;
}

.shop-card-new {
    scroll-snap-align: center;
    flex: 0 0 292px;
    min-height: 315px;
    background:
        radial-gradient(circle at 50% -10%, rgba(55, 247, 255, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(141, 233, 255, 0.18);
    border-radius: 18px;
    padding: 22px 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 16px 36px rgba(0, 0, 0, 0.26);
}

.shop-card-new:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38), 0 0 28px rgba(55, 247, 255, 0.16);
}

.shop-card-new.selected {
    border-color: rgba(53, 255, 149, 0.82);
    box-shadow: 0 0 30px rgba(53, 255, 149, 0.24), inset 0 0 24px rgba(53, 255, 149, 0.08);
    background:
        radial-gradient(circle at 50% -10%, rgba(53, 255, 149, 0.24), transparent 38%),
        linear-gradient(180deg, rgba(53, 255, 149, 0.09), rgba(255, 255, 255, 0.025));
}

.shop-card-new.locked {
    border-color: rgba(255, 255, 255, 0.09);
    opacity: 0.78;
    filter: saturate(0.65);
}

.scroll-btn {
    background: rgba(5, 8, 22, 0.72);
    border: 1px solid rgba(55, 247, 255, 0.62);
    color: white;
    border-radius: 14px;
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(55, 247, 255, 0.16);
}

.scroll-btn:hover {
    background: var(--primary);
    color: #02020a;
    box-shadow: 0 0 28px rgba(55, 247, 255, 0.5);
    transform: translateY(-2px);
}

.hangar-actions {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-top-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(145px, max-content));
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.free-roam-radar {
    position: absolute;
    top: 78px;
    right: 28px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    place-items: center;
    z-index: 6;
    border: 0;
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.18), transparent 22%),
        radial-gradient(circle at 50% 50%, rgba(55, 247, 255, 0.18), transparent 3px),
        radial-gradient(circle at 50% 50%, rgba(8, 20, 48, 0.88), rgba(2, 5, 18, 0.95) 62%, rgba(4, 14, 34, 0.98));
    box-shadow:
        0 0 0 2px rgba(126, 231, 255, 0.86),
        0 0 0 7px rgba(5, 15, 36, 0.82),
        0 0 0 10px rgba(126, 231, 255, 0.38),
        0 0 30px rgba(55, 247, 255, 0.34),
        0 0 60px rgba(55, 120, 255, 0.18),
        inset 0 0 34px rgba(55, 247, 255, 0.16),
        inset 0 -12px 28px rgba(19, 9, 72, 0.30);
    overflow: hidden;
}

body.game-running .free-roam-radar,
body.free-roam-hud .free-roam-radar {
    display: grid;
}

.free-roam-radar::before,
.free-roam-radar::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 2px solid rgba(126, 231, 255, 0.30);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(126, 231, 255, 0.12), inset 0 0 14px rgba(55, 247, 255, 0.08);
}

.free-roam-radar::after {
    inset: 18px;
    border: 2px solid rgba(126, 231, 255, 0.18);
    box-shadow: inset 0 0 22px rgba(55, 247, 255, 0.08);
}

.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    left: 50%;
    top: 0;
    transform-origin: 0 100%;
    background: linear-gradient(70deg, rgba(126, 231, 255, 0.40), rgba(55, 247, 255, 0.04), rgba(55, 247, 255, 0));
    animation: radarSweep 2.2s linear infinite;
    clip-path: polygon(0 100%, 100% 0, 72% 100%);
    filter: drop-shadow(0 0 10px rgba(126, 231, 255, 0.42));
}

@keyframes radarSweep {
    to {
        transform: rotate(360deg);
    }
}

#free-roam-radar-canvas {
    position: relative;
    z-index: 2;
    width: 230px;
    height: 230px;
}

.big-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 9992;
    display: none;
    background: rgba(1, 6, 18, 0.78);
    backdrop-filter: blur(10px) saturate(130%);
}

.big-map-overlay.open {
    display: block;
}

#big-map-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.big-map-title {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(55, 247, 255, 0.42);
    background: rgba(4, 10, 28, 0.70);
    color: #dffbff;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 0 24px rgba(55, 247, 255, 0.20);
}

.station-trader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9993;
    display: none;
    place-items: center;
    background: rgba(2, 6, 18, 0.48);
    backdrop-filter: blur(8px) saturate(135%);
}

.station-trader-overlay.open {
    display: grid;
}

.station-trader-panel {
    width: min(900px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    padding: 20px;
    border: 2px solid rgba(55, 247, 255, 0.52);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 8%, rgba(53, 255, 149, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
        rgba(5, 12, 34, 0.88);
    box-shadow: 0 0 34px rgba(55, 247, 255, 0.24), 0 24px 60px rgba(0, 0, 0, 0.52);
    color: #f8fbff;
}

.station-trader-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.station-trader-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    color: #8ffcff;
    text-shadow: 0 0 18px rgba(55, 247, 255, 0.46);
}

.station-trader-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.station-trader-section {
    border: 1px solid rgba(94, 234, 255, 0.28);
    border-radius: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.045);
}

.station-choice-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.station-choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid rgba(94, 234, 255, 0.30);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fbff;
    text-align: left;
    cursor: pointer;
    font-weight: 900;
}

.station-choice.selected {
    border-color: rgba(53, 255, 149, 0.72);
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.22);
}

.station-trader-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .station-trader-grid {
        grid-template-columns: 1fr;
    }
}

.hud-stat {
    position: relative;
    overflow: hidden;
    appearance: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(4, 7, 18, 0.72);
    border: 1px solid rgba(141, 233, 255, 0.22);
    padding: 12px 18px;
    border-radius: 14px;
    backdrop-filter: blur(10px) saturate(135%);
    font-weight: 900;
    font-family: "Consolas", "SFMono-Regular", monospace;
    font-size: 1rem;
    letter-spacing: 0.4px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

#wave-display {
    user-select: none;
    touch-action: manipulation;
}

#wave-display::before,
#wave-display::after {
    pointer-events: none !important;
}

body.game-running .profile-widget,
body.game-running #profile-panel {
    display: none !important;
    pointer-events: none !important;
}

body.game-running #main-menu .main-stat-pill {
    pointer-events: none !important;
}

#health-display {
    min-width: 220px;
    padding: 10px 14px 12px;
    color: #fff;
    border-color: rgba(255, 66, 116, 0.44);
}

.hp-label {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 7px;
    color: #ffe8ef;
    text-shadow: 0 0 12px rgba(255, 47, 90, 0.75);
}

.hp-value {
    color: #fff;
    font-size: 1.08rem;
}

.hp-bar-shell {
    position: relative;
    z-index: 1;
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 47, 90, 0.18);
}

#hp-bar-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff285d, #ffd166, #35ff95);
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.55);
    transition: width 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#health-display.low-hp {
    animation: hpPanelAlarm 0.72s ease-in-out infinite;
    border-color: rgba(255, 33, 82, 0.92);
    box-shadow:
        0 0 34px rgba(255, 33, 82, 0.55),
        0 12px 30px rgba(0, 0, 0, 0.38),
        inset 0 0 28px rgba(255, 33, 82, 0.14);
}

#health-display.low-hp #hp-bar-fill {
    background: linear-gradient(90deg, #ff103f, #ff6b8a);
    box-shadow: 0 0 24px rgba(255, 33, 82, 0.9);
}

#xp-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 6;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

#xp-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--violet), var(--success));
    box-shadow: 0 0 18px rgba(55, 247, 255, 0.72);
    transition: width 0.2s ease;
}

#inventory-display {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    max-width: 660px;
    margin-top: auto;
    pointer-events: auto;
}

.inventory-item {
    background: rgba(5, 8, 22, 0.72);
    border: 1px solid rgba(55, 247, 255, 0.28);
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-family: "Consolas", monospace;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.inventory-item.maxed {
    border-color: var(--success);
    box-shadow: 0 0 14px rgba(53, 255, 149, 0.24);
}

#cooldown-hud {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 5;
    pointer-events: none;
}

.cooldown-widget {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(4, 7, 18, 0.76);
    border: 1px solid rgba(55, 247, 255, 0.24);
    padding: 10px 13px;
    border-radius: 14px;
    font-family: "Consolas", monospace;
    font-size: 0.82rem;
    font-weight: 900;
    width: 230px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.cooldown-widget.ready {
    opacity: 1 !important;
    transform: translateX(-2px);
}

.cooldown-widget.ready::after {
    content: "";
    position: absolute;
    inset: -45%;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.5), transparent 65%);
    transform: translateX(-80%) rotate(8deg);
    animation: widgetSweep 0.82s ease-out forwards;
    pointer-events: none;
}

#widget-heal.ready {
    box-shadow: 0 0 26px rgba(53, 255, 149, 0.45), 0 12px 28px rgba(0, 0, 0, 0.36), inset 0 0 20px rgba(53, 255, 149, 0.12);
}

#widget-boost.ready {
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.48), 0 12px 28px rgba(0, 0, 0, 0.36), inset 0 0 20px rgba(255, 255, 255, 0.10);
}

.cd-bar-outer {
    width: 82px;
    height: 7px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.cd-bar-inner {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px currentColor;
}

#boss-ui {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, 72vw);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(9, 1, 12, 0.78);
    border: 1px solid rgba(255, 47, 143, 0.58);
    padding: 12px;
    border-radius: 16px;
    text-align: center;
    z-index: 5;
    transition: opacity 0.3s;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45), 0 0 28px rgba(255, 47, 143, 0.20);
    backdrop-filter: blur(10px);
}

.boss-bar-outer {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 7px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.55);
}

.boss-bar-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff2f8f, #ffd166, #ff2f8f);
    box-shadow: 0 0 16px rgba(255, 47, 143, 0.72);
    transition: width 0.1s;
}

/* --- CINEMATIC BOSS CUTSCENE --- */
.cinematic-bar {
    position: fixed;
    left: 0;
    width: 100%;
    height: 0;
    background: #000;
    z-index: 99999;
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.cinematic-bar.top {
    top: 0;
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 0 20px rgba(255, 47, 143, 0.3);
}

.cinematic-bar.bottom {
    bottom: 0;
    border-top: 2px solid var(--secondary);
    box-shadow: 0 0 20px rgba(255, 47, 143, 0.3);
}

/* Activeer de zwarte balken */
.cutscene-active .cinematic-bar {
    height: 12vh;
}

/* Rode alarm gloed over het hele scherm */
#boss-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99998;
    box-shadow: inset 0 0 0px rgba(255, 0, 85, 0);
    transition: box-shadow 0.5s ease;
}

.cutscene-active #boss-vignette {
    animation: dramaticPulse 1.2s infinite alternate;
}

/* Tekst container in het midden */
#boss-text-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100000;
    text-align: center;
    font-family: 'Courier New', monospace;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cutscene-active #boss-text-container {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.boss-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 10px #ff0055, 0 0 30px #ff0055;
    letter-spacing: 8px;
    margin: 0;
    text-transform: uppercase;
    animation: textGlitch 0.4s infinite alternate;
}

.boss-subtitle {
    font-size: 1.2rem;
    color: #37f7ff;
    text-shadow: 0 0 8px rgba(55, 247, 255, 0.6);
    letter-spacing: 4px;
    margin-top: 15px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* --- ANIMATIES --- */
@keyframes dramaticPulse {
    0% {
        box-shadow: inset 0 0 50px rgba(255, 0, 85, 0.3);
        background: rgba(255, 0, 85, 0.02);
    }

    100% {
        box-shadow: inset 0 0 180px rgba(255, 0, 85, 0.85);
        background: rgba(255, 0, 85, 0.08);
    }
}

@keyframes textGlitch {
    0% {
        transform: skew(0deg);
        text-shadow: 2px 0 10px #ff0055, -2px 0 #00ffff;
    }

    20% {
        transform: skew(-1deg);
    }

    40% {
        transform: skew(1deg);
        text-shadow: -2px 0 10px #ff0055, 2px 0 #00ffff;
    }

    60% {
        transform: skew(0deg);
    }

    100% {
        transform: skew(0deg);
    }
}

/* Scherm schudden (toepassen op canvas of body) */
.heavy-shake {
    animation: screenShake 0.15s infinite;
}

@keyframes screenShake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    20% {
        transform: translate(-4px, 4px) rotate(-0.5deg);
    }

    40% {
        transform: translate(4px, -4px) rotate(0.5deg);
    }

    60% {
        transform: translate(-4px, -4px) rotate(0deg);
    }

    80% {
        transform: translate(4px, 4px) rotate(-0.5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

#boss-cutscene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    perspective: 1200px;
    overflow: hidden;
}

#boss-cutscene.active {
    opacity: 1;
    pointer-events: all;
}

.cutscene-bg-nebula {
    position: absolute;
    inset: 0;
    background-image: url('../nebulari.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    animation: nebulaPan 25s linear infinite;
}

@keyframes nebulaPan {
    0% {
        transform: scale(1) translateX(0);
    }

    50% {
        transform: scale(1.05) translateX(30px);
    }

    100% {
        transform: scale(1) translateX(0);
    }
}

.cutscene-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 47, 143, 0.35), transparent 60%),
        radial-gradient(ellipse at 30% 20%, rgba(142, 108, 255, 0.25), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 240, 255, 0.2), transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    animation: overlayPulse 3s ease-in-out infinite;
}

@keyframes overlayPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

.cutscene-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.cutscene-stars {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.cutscene-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.cutscene-warning {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 6px;
    color: #ff2f8f;
    text-transform: uppercase;
    text-shadow:
        0 0 20px #ff2f8f,
        0 0 40px #ff2f8f,
        0 0 60px rgba(255, 47, 143, 0.6),
        3px 3px 0px rgba(0, 0, 0, 0.9),
        -3px -3px 0px rgba(0, 0, 0, 0.9),
        6px 6px 20px rgba(0, 0, 0, 0.8);
    z-index: 10;
    animation: warningIntense 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: brightness(1.3);
}

@keyframes warningIntense {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px) scale(0.6) rotateX(90deg);
    }

    60% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.05) rotateX(0deg);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1) rotateX(0deg);
    }
}

.cutscene-boss-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: bossEnter 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    opacity: 0;
    transform: scale(0) rotateY(45deg) rotateX(-30deg);
}

@keyframes bossEnter {
    0% {
        opacity: 0;
        transform: scale(0) rotateY(45deg) rotateX(-30deg) translateZ(-500px);
    }

    50% {
        opacity: 1;
    }

    70% {
        transform: scale(1.15) rotateY(-8deg) rotateX(5deg) translateZ(0px);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) rotateX(0deg) translateZ(0px);
    }
}

.cutscene-boss-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 47, 143, 0.4), transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: glowPulseIntense 1.5s ease-in-out infinite;
    filter: blur(40px);
}

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

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
}

.cutscene-boss-image {
    max-width: min(75vw, 550px);
    max-height: 75vh;
    object-fit: contain;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 0 50px rgba(255, 47, 143, 0.9)) drop-shadow(0 0 100px rgba(255, 47, 143, 0.6)) drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8)) brightness(1.15) contrast(1.1);
    animation: bossImagePulse 1.8s ease-in-out infinite;
}

@keyframes bossImagePulse {

    0%,
    100% {
        filter: drop-shadow(0 0 50px rgba(255, 47, 143, 0.9)) drop-shadow(0 0 100px rgba(255, 47, 143, 0.6)) drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8)) brightness(1.15) contrast(1.1);
        transform: scale(1) rotateZ(0deg);
    }

    50% {
        filter: drop-shadow(0 0 80px rgba(255, 47, 143, 1)) drop-shadow(0 0 150px rgba(255, 47, 143, 0.8)) drop-shadow(0 30px 80px rgba(0, 0, 0, 0.9)) brightness(1.25) contrast(1.2);
        transform: scale(1.05) rotateZ(1deg);
    }
}

.cutscene-boss-name {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(1.6rem, 4.5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: #ffffff;
    text-align: center;
    text-shadow:
        0 0 10px rgba(255, 47, 143, 0.6),
        0 0 20px rgba(255, 47, 143, 0.8),
        0 0 40px rgba(255, 47, 143, 0.5),
        0 0 60px rgba(142, 108, 255, 0.3),
        3px 3px 0px rgba(0, 0, 0, 1),
        -3px -3px 0px rgba(0, 0, 0, 1),
        6px 6px 0px rgba(0, 0, 0, 0.7);
    z-index: 3;
    animation: nameReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    opacity: 0;
    pointer-events: none;
}

@keyframes nameReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px) scaleY(0);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scaleY(1);
    }
}

.cutscene-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(255, 47, 143, 0.08) 0px,
            rgba(255, 47, 143, 0.08) 2px,
            transparent 2px,
            transparent 4px);
    animation: scanlineScroll 0.12s linear infinite;
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: overlay;
}

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

    100% {
        transform: translateY(4px);
    }
}

.cutscene-glitch {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.cutscene-glitch-line {
    position: absolute;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 47, 143, 0.3), transparent);
    animation: glitchLine 0.15s ease-in-out infinite;
}

@keyframes glitchLine {

    0%,
    100% {
        opacity: 0;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(20px);
    }
}

.cutscene-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
    pointer-events: none;
}

.cutscene-cosmic-ray {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.6), transparent);
    z-index: 1;
    animation: cosmicRayShoot 0.8s ease-out forwards;
}

@keyframes cosmicRayShoot {
    0% {
        opacity: 1;
        transform: translateX(-100%) scaleX(0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(100vw) scaleX(1);
    }
}

.cutscene-particle-burst {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 47, 143, 0.8), transparent 70%);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 47, 143, 0.6);
    animation: particleBurst 1.2s ease-out forwards;
}

@keyframes particleBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

.cutscene-halo {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(142, 108, 255, 0.3);
    border-radius: 50%;
    animation: haloSpinShrink 1.5s ease-in forwards;
}

@keyframes haloSpinShrink {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(3) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(180deg);
    }
}

#touch-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 18;
    display: none;
    pointer-events: none;
}

#touch-controls.active {
    display: block;
}

#touch-joystick {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 1px solid rgba(55, 247, 255, 0.42);
    background:
        radial-gradient(circle at 50% 50%, rgba(55, 247, 255, 0.10), transparent 58%),
        rgba(3, 8, 18, 0.50);
    box-shadow: 0 0 26px rgba(55, 247, 255, 0.16), inset 0 0 28px rgba(255, 255, 255, 0.06);
    touch-action: none;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

#touch-stick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: linear-gradient(135deg, rgba(55, 247, 255, 0.82), rgba(142, 108, 255, 0.78));
    box-shadow: 0 0 22px rgba(55, 247, 255, 0.42);
}

#touch-abilities {
    position: fixed;
    left: 50%;
    bottom: 42px;
    width: min(360px, calc(100vw - 24px));
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.touch-ability-btn {
    width: 78px;
    height: 70px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035)),
        rgba(4, 7, 18, 0.72);
    color: #f8fdff;
    font-family: "Consolas", monospace;
    font-weight: 1000;
    font-size: 0.78rem;
    touch-action: none;
    pointer-events: auto;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(9px);
}

.touch-ability-btn.boost {
    border-color: rgba(55, 247, 255, 0.54);
    color: var(--primary);
}

.touch-ability-btn.heal {
    border-color: rgba(53, 255, 149, 0.54);
    color: var(--success);
}

.touch-ability-btn:active {
    transform: scale(0.96);
    filter: brightness(1.25);
}

#touch-pause-btn {
    position: fixed;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: 42px;
    height: 34px;
    border: 1px solid rgba(255, 214, 74, 0.46);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(4, 7, 18, 0.74);
    color: var(--warning);
    font-family: "Consolas", monospace;
    font-weight: 1000;
    font-size: 1rem;
    line-height: 1;
    touch-action: none;
    pointer-events: auto;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(9px);
}

.setting-row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin: 18px 0;
    padding: 16px;
    font-family: "Consolas", monospace;
    color: #d7e5ff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

input[type=range] {
    width: min(340px, 50%);
    accent-color: var(--primary);
    cursor: pointer;
}

/* Final sci-fi PLAY button for the main lobby. */
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    left: 50% !important;
    bottom: 20px !important;
    z-index: 9 !important;
    width: 760px !important;
    height: 190px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: visible !important;
    isolation: isolate !important;
    appearance: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    clip-path: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #f6fbff !important;
    transform: translateX(-50%) !important;
    transition: transform 220ms ease, filter 220ms ease !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::before {
    content: "" !important;
    position: absolute !important;
    inset: 18% 5% 8% 5% !important;
    z-index: 0 !important;
    border: 0 !important;
    clip-path: none !important;
    background:
        radial-gradient(ellipse at 50% 52%, rgba(6, 156, 255, 0.40), transparent 54%),
        radial-gradient(ellipse at 19% 50%, rgba(255, 96, 0, 0.32), transparent 38%),
        radial-gradient(ellipse at 81% 50%, rgba(255, 96, 0, 0.32), transparent 38%),
        rgba(0, 0, 0, 0.72) !important;
    filter: blur(18px);
    opacity: 0.92;
    pointer-events: none;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::after {
    content: "" !important;
    position: absolute !important;
    left: 9% !important;
    right: 9% !important;
    top: 42% !important;
    z-index: 1 !important;
    height: 3px !important;
    border: 0 !important;
    clip-path: none !important;
    background:
        linear-gradient(90deg, transparent, rgba(255, 126, 0, 0.95) 11%, rgba(255, 226, 42, 0.96) 18%, transparent 29% 71%, rgba(255, 226, 42, 0.96) 82%, rgba(255, 126, 0, 0.95) 89%, transparent) !important;
    box-shadow:
        0 0 9px rgba(255, 126, 0, 0.98),
        0 0 20px rgba(255, 77, 0, 0.64);
    pointer-events: none;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button > span,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button > strong {
    position: absolute !important;
    pointer-events: none !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-side-beam {
    top: 50% !important;
    z-index: 1 !important;
    width: 210px !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 197, 30, 0.98), rgba(255, 68, 0, 0.82), transparent) !important;
    box-shadow:
        0 0 8px rgba(255, 134, 0, 0.95),
        0 0 18px rgba(255, 48, 0, 0.62);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-side-beam.left {
    left: -92px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-side-beam.right {
    right: -92px !important;
    transform: scaleX(-1);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-light-rail {
    z-index: 8 !important;
    width: 150px !important;
    height: 5px !important;
    background: linear-gradient(90deg, transparent, #ff7200 16%, #fff33a 50%, #ff5600 84%, transparent) !important;
    box-shadow:
        0 0 12px rgba(255, 116, 0, 0.98),
        0 0 28px rgba(255, 68, 0, 0.72);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-light-rail.top-left {
    left: 18.5% !important;
    top: 26.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-light-rail.top-right {
    right: 18.5% !important;
    top: 26.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-light-rail.bottom-left {
    left: 20.5% !important;
    bottom: 23.2% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-light-rail.bottom-right {
    right: 20.5% !important;
    bottom: 23.2% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-outer-frame {
    inset: 8% 5.5% 7% !important;
    z-index: 2 !important;
    clip-path: polygon(13% 0, 35% 0, 38% 8%, 62% 8%, 65% 0, 87% 0, 100% 50%, 87% 100%, 65% 100%, 62% 92%, 38% 92%, 35% 100%, 13% 100%, 0 50%) !important;
    background:
        linear-gradient(90deg, rgba(38, 16, 4, 0.16), rgba(255, 126, 0, 0.98) 12%, rgba(255, 229, 76, 1) 18%, rgba(78, 35, 9, 0.74) 25%, rgba(18, 24, 36, 0.96) 50%, rgba(78, 35, 9, 0.74) 75%, rgba(255, 229, 76, 1) 82%, rgba(255, 126, 0, 0.98) 88%, rgba(38, 16, 4, 0.16)),
        linear-gradient(180deg, rgba(255, 137, 8, 0.98), rgba(110, 49, 0, 0.96) 48%, rgba(255, 87, 0, 0.98)) !important;
    box-shadow:
        0 0 16px rgba(255, 103, 0, 0.90),
        0 0 42px rgba(255, 91, 0, 0.42),
        inset 0 0 0 2px rgba(255, 209, 66, 0.55),
        inset 0 0 20px rgba(255, 85, 0, 0.55);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-steel-frame {
    inset: 15% 8.7% 14% !important;
    z-index: 3 !important;
    clip-path: polygon(11% 0, 38% 0, 41% 11%, 59% 11%, 62% 0, 89% 0, 100% 50%, 89% 100%, 62% 100%, 59% 89%, 41% 89%, 38% 100%, 11% 100%, 0 50%) !important;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.42), rgba(85, 97, 110, 0.65) 8%, rgba(5, 13, 26, 0.95) 21%, rgba(8, 18, 39, 0.96) 50%, rgba(5, 13, 26, 0.95) 79%, rgba(108, 122, 134, 0.76) 92%, rgba(255, 255, 255, 0.45)),
        linear-gradient(180deg, #45505a, #09111f 48%, #303c48) !important;
    box-shadow:
        inset 0 0 0 2px rgba(173, 212, 255, 0.18),
        inset 0 16px 24px rgba(255, 255, 255, 0.10),
        inset 0 -18px 24px rgba(0, 0, 0, 0.50),
        0 0 18px rgba(0, 0, 0, 0.78);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-blue-core {
    inset: 26% 16.5% 25% !important;
    z-index: 4 !important;
    clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%) !important;
    background:
        radial-gradient(circle at 50% 44%, rgba(66, 219, 255, 0.98), transparent 16%),
        radial-gradient(ellipse at 50% 58%, rgba(0, 184, 255, 0.45), transparent 66%),
        linear-gradient(180deg, rgba(0, 178, 255, 0.95) 0%, rgba(0, 89, 213, 0.96) 45%, rgba(5, 32, 111, 0.98) 100%) !important;
    box-shadow:
        0 0 18px rgba(0, 183, 255, 0.86),
        0 0 42px rgba(0, 105, 255, 0.58),
        inset 0 0 0 2px rgba(62, 222, 255, 0.96),
        inset 0 13px 20px rgba(255, 255, 255, 0.22),
        inset 0 -18px 34px rgba(0, 9, 67, 0.58);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-inner-line {
    inset: 30.5% 20.7% 29.5% !important;
    z-index: 5 !important;
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%) !important;
    background: #37f8ff !important;
    box-shadow:
        0 0 12px rgba(42, 247, 255, 0.98),
        0 0 28px rgba(16, 181, 255, 0.74);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-inner-line::before {
    content: "";
    position: absolute;
    inset: 4px 5px;
    clip-path: inherit;
    background: linear-gradient(180deg, rgba(10, 95, 222, 0.82), rgba(2, 22, 98, 0.88));
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-top-glow,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-bottom-glow {
    left: 43.5% !important;
    width: 13% !important;
    height: 5px !important;
    z-index: 7 !important;
    background: linear-gradient(90deg, transparent, rgba(90, 247, 255, 0.96), #ffffff 50%, rgba(53, 230, 255, 0.96), transparent) !important;
    box-shadow:
        0 0 10px rgba(97, 245, 255, 0.98),
        0 0 24px rgba(0, 178, 255, 0.82);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-top-glow {
    top: 30.4% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-bottom-glow {
    bottom: 28.7% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons {
    z-index: 9 !important;
    top: 39% !important;
    width: 86px !important;
    height: 54px !important;
    opacity: 0.78;
    filter: drop-shadow(0 0 10px rgba(0, 128, 255, 0.86));
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::before,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::after {
    content: "";
    position: absolute;
    top: 0;
    width: 34px;
    height: 100%;
    clip-path: polygon(0 0, 44% 0, 100% 50%, 44% 100%, 0 100%, 55% 50%);
    background: linear-gradient(180deg, rgba(63, 191, 255, 0.96), rgba(0, 60, 190, 0.90));
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::before {
    left: 0;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::after {
    right: 0;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons.left {
    left: 31.2% !important;
    transform: scaleX(-1);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons.right {
    right: 31.2% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button strong {
    z-index: 10 !important;
    left: 50% !important;
    top: 50% !important;
    color: #ffffff !important;
    font-family: Impact, "Arial Black", "Segoe UI Black", sans-serif !important;
    font-size: 72px !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    transform: translate(-50%, -52%) !important;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.92),
        0 0 18px rgba(70, 180, 255, 0.96),
        0 7px 16px rgba(0, 16, 96, 0.72) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-flare {
    z-index: 9 !important;
    width: 28px !important;
    height: 12px !important;
    border-radius: 999px;
    background: #fff8a6 !important;
    box-shadow:
        0 0 8px #fff2a8,
        0 0 20px rgba(255, 132, 0, 0.98),
        0 0 38px rgba(255, 61, 0, 0.72);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .flare-a {
    left: 24.5% !important;
    top: 23.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .flare-b {
    right: 24.5% !important;
    top: 23.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .flare-c {
    left: 29% !important;
    bottom: 19.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .flare-d {
    right: 29% !important;
    bottom: 19.5% !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateX(-50%) translateY(-5px) scale(1.015) !important;
    filter: brightness(1.12) saturate(1.16) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover .play-blue-core,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible .play-blue-core {
    box-shadow:
        0 0 24px rgba(0, 207, 255, 0.98),
        0 0 58px rgba(0, 121, 255, 0.72),
        inset 0 0 0 2px rgba(115, 246, 255, 1),
        inset 0 13px 20px rgba(255, 255, 255, 0.25),
        inset 0 -18px 34px rgba(0, 9, 67, 0.58);
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateX(-50%) translateY(-1px) scale(0.992) !important;
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        width: min(100%, 540px) !important;
        height: auto !important;
        aspect-ratio: 4 / 1 !important;
        margin: 18px auto 20px !important;
        transform: none !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
        transform: translateY(-2px) scale(1.01) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
        transform: translateY(1px) scale(0.992) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button strong {
        font-size: clamp(2.3rem, 13vw, 4rem) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons {
        width: 54px !important;
        height: 34px !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::before,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-chevrons::after {
        width: 22px;
    }
}

/* Virus Universe performance/route layout overrides */
#perk-universe-screen {
    background: rgba(1, 3, 12, 0.22);
    backdrop-filter: none;
}

.perk-universe-topbar {
    top: 22px !important;
    left: 124px !important;
    right: 28px !important;
    min-height: 86px;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 47, 82, 0.48);
    border-radius: 8px;
    background: rgba(4, 8, 24, 0.78);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.perk-universe-topbar .btn {
    margin: 0;
    min-width: 92px;
    box-shadow: none !important;
}

.perk-universe-title {
    flex: 1 1 260px;
}

.perk-universe-title .virus-icon,
.perk-blob-icon,
.mini-level-bar span.filled {
    box-shadow: none;
}

.perk-universe-title strong {
    text-shadow: none;
}

.perk-universe-ship-pill,
.perk-universe-xp-panel {
    min-width: 178px;
    padding: 9px 12px;
    border: 1px solid rgba(141, 233, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.perk-universe-ship-pill span,
.perk-universe-xp-head span,
.perk-universe-xp-panel small {
    display: block;
    color: #aebce6;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.perk-universe-ship-pill strong,
.perk-universe-xp-head strong {
    display: block;
    color: #ffffff;
    font-size: 0.96rem;
    line-height: 1.12;
}

.perk-universe-xp-panel {
    flex: 0 1 320px;
}

.perk-universe-xp-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.perk-universe-xp-head strong {
    color: #75ff9d;
    font-family: "Consolas", monospace;
}

.perk-universe-xp-bar {
    height: 10px;
    margin: 7px 0 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.perk-universe-xp-bar i {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #75ff9d, #37f7ff);
}

.perk-universe-zoom-controls {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.perk-universe-zoom-controls button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    font-weight: 1000;
    cursor: pointer;
}

.perk-info-blob,
.perk-preview-panel {
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
        rgba(3, 6, 19, 0.94);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.perk-info-blob h2 {
    text-shadow: none;
}

.perk-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.perk-detail-actions .btn {
    width: 100%;
    margin: 0;
    box-shadow: none;
}

.perk-preview-panel {
    position: absolute;
    z-index: 4;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--perk-color, #35ff95) 45%, rgba(255, 255, 255, 0.18));
}

.perk-preview-panel.hidden {
    display: none;
}

.perk-preview-panel canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
}

.perk-preview-close {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font-weight: 900;
}

.perk-current-panel {
    inset: 0 !important;
    width: auto !important;
    max-height: none !important;
    overflow: hidden;
    padding: 76px 34px 28px;
    border: 0;
    border-radius: 0;
    background: rgba(2, 5, 17, 0.94);
    box-shadow: none;
    backdrop-filter: blur(6px);
}

.perk-current-close {
    top: 24px;
    right: 28px;
    z-index: 8;
}

#perk-current-content {
    height: 100%;
}

.current-full-layout {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(360px, 1fr);
    gap: 28px;
}

.current-flight-zone,
.current-build-zone {
    min-height: 0;
    border: 1px solid rgba(141, 233, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.current-flight-zone {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 24px;
}

.current-flight-zone::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 54px 54px;
    opacity: 0.28;
}

.current-route-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--route-color) 46%, rgba(255, 255, 255, 0.18));
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.26);
    font-size: 0.78rem;
    font-weight: 1000;
}

.current-ship-flight {
    position: relative;
    z-index: 1;
    width: min(58%, 360px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    animation: currentShipPatrol 5.5s ease-in-out infinite;
}

.current-ship-flight img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.current-flight-zone .current-ship-copy {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    text-align: center;
}

.current-build-zone {
    overflow-y: auto;
    padding: 18px;
}

.current-stat-grid {
    margin: 0 0 16px;
}

.current-perk-row.bender-active {
    box-shadow: none;
}

.current-empty-route {
    margin: 0;
    color: #c9d4ff;
}

@keyframes currentShipPatrol {
    0%, 100% {
        transform: translate(-8px, 0) rotate(-2deg);
    }

    50% {
        transform: translate(14px, -14px) rotate(2deg);
    }
}

@media (max-width: 900px) {
    .perk-universe-topbar {
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
        align-items: stretch;
        flex-wrap: wrap;
        min-height: 0;
    }

    .perk-universe-title,
    .perk-universe-ship-pill,
    .perk-universe-xp-panel {
        flex: 1 1 100%;
    }

    .perk-universe-zoom-controls,
    .perk-universe-topbar .btn {
        flex: 1 1 auto;
    }

    .perk-info-blob {
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 10px;
        width: auto !important;
        max-height: 44vh;
        overflow-y: auto;
    }

    .perk-preview-panel {
        display: none !important;
    }

    .perk-current-panel {
        padding: 62px 12px 12px;
    }

    .current-full-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        overflow-y: auto;
    }

    .current-flight-zone {
        min-height: 320px;
    }
}

.setting-select {
    width: min(340px, 50%);
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(55, 247, 255, 0.46);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(55, 247, 255, 0.12), rgba(142, 108, 255, 0.18)),
        rgba(4, 7, 18, 0.82);
    color: #f7fdff;
    font: 900 0.95rem "Consolas", monospace;
    cursor: pointer;
}

.setting-select option {
    color: #f7fdff;
    background: #080c1f;
}

.setting-bg-choice {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 116px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.setting-bg-choice .setting-select {
    width: 100%;
}

.setting-bg-preview {
    position: relative;
    overflow: hidden;
    width: 116px;
    height: 66px;
    border: 1px solid rgba(55, 247, 255, 0.48);
    border-radius: 8px;
    background: rgba(4, 7, 18, 0.78);
    box-shadow:
        0 0 16px rgba(55, 247, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.setting-bg-preview video,
.setting-bg-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.setting-bg-preview img {
    display: none;
}

body.lobby-bg-image-mode .setting-bg-preview video {
    display: none;
}

body.lobby-bg-image-mode .setting-bg-preview img {
    display: block;
}

.upgrade-container {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.upgrade-card {
    background:
        radial-gradient(circle at 50% 0%, rgba(55, 247, 255, 0.13), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    flex: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 14px 30px rgba(0, 0, 0, 0.22);
}

.upgrade-card:hover {
    border-color: rgba(255, 47, 143, 0.78);
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36), 0 0 26px rgba(255, 47, 143, 0.24);
}

.upgrade-card.bonus {
    border-color: rgba(255, 209, 102, 0.52);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 209, 102, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 209, 102, 0.08), rgba(255, 255, 255, 0.025));
}

.upgrade-card.bonus:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36), 0 0 26px rgba(255, 209, 102, 0.24);
    border-color: #fff;
}

.shop-tabs {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 16px;
}

.shop-tab {
    border: 1px solid rgba(55, 247, 255, 0.28);
    border-radius: 999px;
    padding: 9px 14px;
    color: #dffbff;
    background: rgba(255, 255, 255, 0.045);
    font-family: "Consolas", monospace;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.shop-tab.active {
    color: #031018;
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 24px rgba(55, 247, 255, 0.32);
}

.shop-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    width: 100%;
    max-height: min(56vh, 520px);
    overflow-y: auto;
    padding: 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-offer-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    border: 1px solid rgba(141, 233, 255, 0.18);
    border-radius: 16px;
    padding: 18px;
    text-align: left;
    background:
        radial-gradient(circle at 50% -15%, rgba(55, 247, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 14px 30px rgba(0, 0, 0, 0.24);
}

.shop-offer-icon {
    font-size: 2.1rem;
    filter: drop-shadow(0 0 14px rgba(55, 247, 255, 0.45));
}

.shop-offer-title {
    margin-top: 8px;
    color: #fff;
    font-weight: 1000;
    font-size: 1.05rem;
}

.shop-offer-desc {
    margin: 7px 0 12px;
    color: #a6b3df;
    font-size: 0.82rem;
    line-height: 1.35;
}

.shop-price {
    color: var(--warning);
    font-family: "Consolas", monospace;
    font-weight: 1000;
    margin-bottom: 10px;
}

.shop-owned {
    color: var(--success);
    font-family: "Consolas", monospace;
    font-weight: 1000;
    text-shadow: 0 0 12px rgba(53, 255, 149, 0.38);
}

#perk-universe-screen {
    padding: 0;
    justify-content: stretch;
    align-items: stretch;
    background: rgba(1, 3, 12, 0.38);
    backdrop-filter: blur(3px) saturate(125%);
}

#perk-universe-screen::before {
    inset: 14px;
    border-radius: 18px;
    border-color: rgba(116, 255, 157, 0.16);
}

.perk-universe-stage {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#perk-universe-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
}

#perk-universe-canvas.dragging {
    cursor: grabbing;
}

.perk-universe-topbar,
.perk-universe-detail,
.perk-universe-branches {
    position: absolute;
    z-index: 3;
}

.perk-universe-topbar {
    top: 18px;
    left: 18px;
    right: 18px;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(141, 233, 255, 0.18);
    border-radius: 8px;
    background: rgba(3, 6, 19, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.perk-universe-title {
    min-width: 0;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.perk-universe-title .virus-icon {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 3px solid rgba(116, 255, 157, 0.82);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(116, 255, 157, 0.40), inset 0 0 14px rgba(116, 255, 157, 0.14);
}

.perk-universe-title .virus-icon::before,
.perk-universe-title .virus-icon::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 2px dotted rgba(116, 255, 157, 0.82);
    border-radius: 50%;
}

.perk-universe-title .virus-icon::after {
    inset: -8px;
    border-style: dashed;
    opacity: 0.72;
}

.perk-universe-title strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.1rem, 2vw, 1.85rem);
    font-weight: 1000;
    line-height: 1;
    text-shadow: 0 0 16px rgba(116, 255, 157, 0.36);
}

.perk-universe-title small {
    display: block;
    margin-top: 5px;
    color: #a6b3df;
    font-size: 0.78rem;
    line-height: 1.15;
}

.perk-universe-balance {
    min-width: 132px;
    padding: 8px 13px;
    border: 1px solid rgba(116, 255, 157, 0.34);
    border-radius: 8px;
    background: rgba(5, 24, 18, 0.74);
    text-align: right;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.perk-universe-balance span {
    display: block;
    color: rgba(214, 255, 230, 0.78);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.perk-universe-balance strong {
    display: block;
    color: #75ff9d;
    font-size: 1.25rem;
    line-height: 1.05;
    text-shadow: 0 0 14px rgba(116, 255, 157, 0.42);
}

.perk-universe-icon-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border: 1px solid rgba(55, 247, 255, 0.34);
    border-radius: 8px;
    color: #eaffff;
    background: rgba(55, 247, 255, 0.10);
    font-size: 1.35rem;
    font-weight: 1000;
    cursor: pointer;
}

.perk-universe-detail {
    top: 112px;
    right: 18px;
    width: min(360px, calc(100vw - 36px));
    max-height: calc(100vh - 134px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid rgba(141, 233, 255, 0.20);
    border-radius: 8px;
    background: rgba(4, 7, 22, 0.80);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.perk-detail-kicker {
    color: var(--perk-color, #35ff95);
    font-family: "Consolas", monospace;
    font-size: 0.72rem;
    font-weight: 1000;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.perk-universe-detail h2 {
    margin: 5px 0 7px;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.08;
    text-shadow: 0 0 16px color-mix(in srgb, var(--perk-color, #35ff95) 42%, transparent);
}

.perk-universe-detail p {
    margin: 0 0 12px;
    color: #c9d4ff;
    font-size: 0.88rem;
    line-height: 1.4;
}

.perk-detail-meta {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.perk-detail-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.perk-detail-row span {
    color: #8fefff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.perk-detail-row strong {
    color: #ffffff;
    font-size: 0.82rem;
    line-height: 1.25;
}

.perk-universe-detail .btn {
    width: 100%;
    margin: 4px 0 0;
}

.perk-universe-detail .btn.active-bender {
    border-color: rgba(116, 255, 157, 0.72);
    color: #02130a;
    background: linear-gradient(135deg, #75ff9d, #37f7ff);
}

.perk-universe-branches {
    left: 18px;
    bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.perk-universe-branches span {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(238, 248, 255, 0.88);
    background: rgba(4, 7, 22, 0.68);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.perk-info-blob {
    position: absolute;
    z-index: 4;
    min-height: 250px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--perk-color, #35ff95) 55%, rgba(255, 255, 255, 0.20));
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--perk-color, #35ff95) 24%, transparent), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035)),
        rgba(3, 6, 19, 0.90);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.42),
        0 0 38px color-mix(in srgb, var(--perk-color, #35ff95) 24%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.perk-info-blob.hidden {
    display: none;
}

.perk-info-blob.opening {
    animation: perkBlobOpen 0.22s cubic-bezier(0.22, 0.9, 0.26, 1.1);
}

@keyframes perkBlobOpen {
    0% {
        opacity: 0;
        transform: scale(0.18);
        border-radius: 999px;
    }

    70% {
        opacity: 1;
        transform: scale(1.035);
        border-radius: 18px;
    }

    100% {
        opacity: 1;
        transform: scale(1);
        border-radius: 8px;
    }
}

.perk-blob-close,
.perk-current-close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font-weight: 900;
}

.perk-blob-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding-right: 28px;
}

.perk-blob-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--perk-color, #35ff95) 62%, rgba(255, 255, 255, 0.22));
    border-radius: 50%;
    color: #ffffff;
    background: color-mix(in srgb, var(--perk-color, #35ff95) 18%, rgba(0, 0, 0, 0.50));
    font: 900 0.72rem "Consolas", monospace;
    box-shadow: 0 0 22px color-mix(in srgb, var(--perk-color, #35ff95) 30%, transparent);
}

.perk-info-blob h2 {
    margin: 3px 0 0;
    color: #ffffff;
    font-size: 1.28rem;
    line-height: 1.05;
    text-shadow: 0 0 16px color-mix(in srgb, var(--perk-color, #35ff95) 45%, transparent);
}

.perk-info-blob p {
    margin: 12px 0 10px;
    color: #d8e5ff;
    font-size: 0.86rem;
    line-height: 1.4;
}

.perk-info-blob .perk-detail-meta {
    margin: 10px 0 12px;
}

.perk-info-blob .perk-detail-row {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 8px 9px;
}

.perk-info-blob .perk-detail-row span {
    color: color-mix(in srgb, var(--perk-color, #35ff95) 64%, #ffffff 36%);
}

.perk-current-panel {
    position: absolute;
    z-index: 5;
    top: 106px;
    right: 18px;
    width: min(430px, calc(100vw - 36px));
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(141, 233, 255, 0.20);
    border-radius: 8px;
    background: rgba(3, 6, 19, 0.88);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.perk-current-panel.hidden {
    display: none;
}

.current-ship-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 118px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--ship-color, #37f7ff) 42%, rgba(255, 255, 255, 0.14));
    border-radius: 8px;
    background:
        radial-gradient(circle at 14% 50%, color-mix(in srgb, var(--ship-color, #37f7ff) 18%, transparent), transparent 48%),
        rgba(255, 255, 255, 0.045);
}

.current-ship-visual {
    display: grid;
    place-items: center;
    min-height: 92px;
    animation: currentShipHover 2.8s ease-in-out infinite;
    filter: drop-shadow(0 0 16px var(--ship-color, #37f7ff));
}

.current-ship-visual img {
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.current-ship-visual span {
    color: var(--ship-color, #37f7ff);
    font-size: 2rem;
    font-weight: 1000;
}

@keyframes currentShipHover {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

.current-ship-copy span,
.current-stat-grid span {
    display: block;
    color: #8fefff;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.current-ship-copy strong {
    display: block;
    color: #ffffff;
    font-size: 1.28rem;
    line-height: 1.05;
}

.current-ship-copy small {
    display: block;
    margin-top: 6px;
    color: #a6b3df;
}

.current-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.current-stat-grid div {
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.current-stat-grid strong {
    display: block;
    color: #ffffff;
    font-size: 0.92rem;
    line-height: 1.2;
}

.current-perk-list {
    display: grid;
    gap: 12px;
}

.current-perk-section h3 {
    margin: 0 0 7px;
    color: var(--perk-color);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.current-perk-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.current-perk-row.active {
    border-color: color-mix(in srgb, var(--perk-color) 45%, rgba(255, 255, 255, 0.12));
    background: color-mix(in srgb, var(--perk-color) 10%, rgba(255, 255, 255, 0.035));
}

.current-perk-row.bender-active {
    box-shadow: 0 0 18px color-mix(in srgb, var(--perk-color) 24%, transparent);
}

.current-perk-row strong {
    display: block;
    color: #ffffff;
    font-size: 0.84rem;
}

.current-perk-row small {
    display: block;
    color: #a6b3df;
    font-size: 0.72rem;
    line-height: 1.25;
}

.current-perk-level {
    min-width: 86px;
    text-align: right;
}

.current-perk-level > span:last-child {
    display: block;
    margin-top: 3px;
    color: #ffffff;
    font: 900 0.72rem "Consolas", monospace;
}

.mini-level-bar {
    display: inline-flex;
    gap: 3px;
}

.mini-level-bar span {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.14);
}

.mini-level-bar span.filled {
    background: var(--perk-color, #35ff95);
    box-shadow: 0 0 8px var(--perk-color, #35ff95);
}

.difficulty-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
    margin: 24px 0 18px;
}

.difficulty-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(141, 233, 255, 0.22);
    border-radius: 16px;
    padding: 22px 18px;
    min-height: 210px;
    cursor: pointer;
    text-align: left;
    color: #f7fdff;
    background:
        radial-gradient(circle at 50% -10%, rgba(55, 247, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 18px 42px rgba(0, 0, 0, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.difficulty-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: translateX(-130%) skewX(-18deg);
    transition: transform 0.5s ease;
}

.difficulty-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42), 0 0 30px rgba(55, 247, 255, 0.20);
}

.difficulty-card:hover::before {
    transform: translateX(130%) skewX(-18deg);
}

.difficulty-card.hard {
    border-color: rgba(255, 47, 143, 0.48);
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 47, 143, 0.20), transparent 42%),
        linear-gradient(180deg, rgba(255, 47, 143, 0.08), rgba(255, 255, 255, 0.025));
}

.difficulty-card.hard:hover {
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.42), 0 0 34px rgba(255, 47, 143, 0.28);
}

.play-mode-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.free-roam-card {
    border-color: rgba(53, 255, 149, 0.46);
    background:
        radial-gradient(circle at 50% -10%, rgba(53, 255, 149, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(53, 255, 149, 0.07), rgba(255, 255, 255, 0.025));
}

.multiplayer-card {
    border-color: rgba(142, 108, 255, 0.52);
    background:
        radial-gradient(circle at 50% -10%, rgba(142, 108, 255, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(142, 108, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.difficulty-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1.35rem;
    font-weight: 1000;
    text-transform: uppercase;
    font-family: "Consolas", "SFMono-Regular", monospace;
}

.difficulty-tag {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.72rem;
    color: #041018;
    background: var(--success);
    box-shadow: 0 0 16px rgba(53, 255, 149, 0.34);
}

.difficulty-card.hard .difficulty-tag {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 0 16px rgba(255, 47, 143, 0.34);
}

.difficulty-card p {
    margin: 0 0 12px;
    color: #b8c5ff;
}

.difficulty-lines {
    display: grid;
    gap: 8px;
    font-family: "Consolas", "SFMono-Regular", monospace;
    font-size: 0.86rem;
    color: #eaf9ff;
}

.daily-quests {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    margin: 8px auto 12px;
    padding: 0;
    border: 1px solid rgba(53, 255, 149, 0.22);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% -20%, rgba(53, 255, 149, 0.15), transparent 45%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 32px rgba(0, 0, 0, 0.24);
    text-align: left;
    overflow: hidden;
}

.daily-quests summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 14px;
}

.daily-quests summary::-webkit-details-marker {
    display: none;
}

.daily-quests summary.daily-title {
    margin-bottom: 0;
}

.daily-quests summary.daily-title::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    height: 24px;
    border: 1px solid rgba(53, 255, 149, 0.38);
    border-radius: 999px;
    color: #ecfff6;
    background: rgba(53, 255, 149, 0.10);
}

.daily-quests[open] summary.daily-title::after {
    content: "-";
}

.daily-quests #daily-quest-list {
    padding: 0 14px 12px;
}

.daily-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--success);
    font-family: "Consolas", "SFMono-Regular", monospace;
    font-weight: 1000;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(53, 255, 149, 0.34);
}

.daily-reset {
    color: #a6b3df;
    font-size: 0.76rem;
    font-weight: 800;
}

.quest-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.quest-name {
    color: #f8fdff;
    font-weight: 900;
    font-size: 0.92rem;
}

.quest-desc {
    margin-top: 3px;
    color: #a6b3df;
    font-size: 0.78rem;
    line-height: 1.3;
}

.quest-progress {
    margin-top: 8px;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.45);
}

.quest-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--primary));
    box-shadow: 0 0 14px rgba(53, 255, 149, 0.55);
    transition: width 0.22s ease;
}

.quest-claim {
    min-width: 92px;
    border: 1px solid rgba(53, 255, 149, 0.55);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(53, 255, 149, 0.10);
    color: #ecfff6;
    font-family: "Consolas", monospace;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.12);
}

.quest-claim:disabled {
    cursor: default;
    opacity: 0.5;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

#quest-side-panel {
    position: fixed;
    top: 126px;
    left: 24px;
    width: min(340px, calc(100vw - 34px));
    z-index: 6;
    pointer-events: none;
    transform: translate3d(-28px, 0, 0);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.2, 0.85, 0.2, 1), opacity 0.24s ease;
}

#quest-side-panel.open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.quest-side-inner {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(53, 255, 149, 0.30);
    background:
        radial-gradient(circle at 90% 10%, rgba(53, 255, 149, 0.16), transparent 38%),
        rgba(5, 10, 22, 0.54);
    backdrop-filter: blur(12px) saturate(135%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 28px rgba(53, 255, 149, 0.13);
}

.quest-side-inner .quest-row {
    grid-template-columns: 1fr;
    padding: 10px 0;
}

.quest-side-inner .quest-claim {
    display: none;
}

.quest-empty {
    color: #a6b3df;
    font-family: "Consolas", monospace;
    font-size: 0.86rem;
    padding: 10px 0 2px;
    text-align: center;
}

.pause-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
    width: min(96vw, 1260px);
    margin: 0 auto;
}

.pause-statusbar {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: min(96vw, 1180px);
    pointer-events: none;
}

.pause-status-pill {
    border: 1px solid rgba(141, 233, 255, 0.24);
    border-radius: 999px;
    padding: 8px 13px;
    color: #eef8ff;
    background: rgba(5, 8, 22, 0.68);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    font-family: "Consolas", monospace;
    font-size: 0.84rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pause-status-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #041018;
    background: var(--pill-color, var(--primary));
    box-shadow: 0 0 16px var(--pill-glow, rgba(55, 247, 255, 0.45));
    font-size: 0.9rem;
}

.pause-status-ship {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: 2px;
    color: var(--ship-color, #fff);
    text-shadow: 0 0 14px var(--ship-color, #fff);
    animation: pauseShipFloat 2.8s ease-in-out infinite, pauseShipRotate 5.5s linear infinite;
}

.pause-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        rgba(5, 8, 22, 0.76);
    border: 1px solid rgba(141, 233, 255, 0.18);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px) saturate(130%);
}

.pause-card.primary {
    border-color: rgba(255, 209, 102, 0.38);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), 0 0 30px rgba(255, 170, 0, 0.16);
}

.pause-card.side {
    width: 100%;
    height: 100%;
    max-height: min(68vh, 560px);
    overflow-y: auto;
}

.pause-card.quests {
    border-color: rgba(53, 255, 149, 0.30);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), 0 0 30px rgba(53, 255, 149, 0.12);
}

.pause-card.perks {
    border-color: rgba(55, 247, 255, 0.28);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), 0 0 30px rgba(55, 247, 255, 0.12);
}

.pause-perk-row {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.pause-perk-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: #f8fdff;
    font-family: "Consolas", monospace;
    font-weight: 1000;
}

.pause-perk-level {
    flex: 0 0 auto;
    color: var(--success);
    font-size: 0.82rem;
}

.pause-perk-desc {
    margin-top: 5px;
    color: #a6b3df;
    font-size: 0.82rem;
    line-height: 1.35;
}

.pause-perk-effect {
    margin-top: 7px;
    color: var(--primary);
    font-family: "Consolas", monospace;
    font-size: 0.78rem;
}

/* Premium command-deck UI refresh */
:root {
    --premium-ink: #f7fdff;
    --premium-muted: #9fb2d8;
    --premium-panel: rgba(6, 10, 26, 0.78);
    --premium-panel-strong: rgba(8, 12, 31, 0.94);
    --premium-line: rgba(148, 233, 255, 0.22);
    --premium-line-hot: rgba(255, 255, 255, 0.58);
}

.screen {
    background:
        radial-gradient(circle at 18% 12%, rgba(55, 247, 255, 0.18), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(255, 47, 143, 0.16), transparent 28%),
        radial-gradient(circle at 50% 92%, rgba(53, 255, 149, 0.10), transparent 38%),
        linear-gradient(160deg, rgba(2, 2, 10, 0.72), rgba(2, 4, 17, 0.98));
}

.screen::before {
    border-radius: 0;
    inset: 0;
    border: 0;
    background:
        linear-gradient(90deg, rgba(55, 247, 255, 0.16) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 82px 82px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 78%);
    opacity: 0.18;
    box-shadow: none;
}

.panel,
.pause-card,
.profile-panel {
    border-radius: 18px;
    border: 1px solid var(--premium-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025) 42%, rgba(0, 0, 0, 0.08)),
        radial-gradient(circle at 16% 0%, rgba(55, 247, 255, 0.16), transparent 32%),
        radial-gradient(circle at 88% 4%, rgba(255, 47, 143, 0.13), transparent 34%),
        var(--premium-panel);
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(255, 255, 255, 0.045) inset,
        0 0 68px rgba(55, 247, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.panel::before,
.pause-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent) top left / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 30%);
}

.panel::after {
    width: 340px;
    height: 340px;
    right: -140px;
    top: -160px;
    background:
        radial-gradient(circle, rgba(55, 247, 255, 0.18), transparent 62%),
        conic-gradient(from 90deg, transparent, rgba(255, 47, 143, 0.10), transparent, rgba(53, 255, 149, 0.08), transparent);
    opacity: 0.9;
}

.main-panel {
    width: min(94vw, 880px) !important;
    min-height: min(760px, calc(100vh - 86px));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    padding: clamp(24px, 4vw, 44px) !important;
}

.main-kicker {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 7px 13px;
    border: 1px solid rgba(53, 255, 149, 0.28);
    border-radius: 999px;
    color: var(--success);
    background: rgba(53, 255, 149, 0.075);
    font-family: "Consolas", monospace;
    font-size: 0.78rem;
    font-weight: 1000;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(53, 255, 149, 0.36);
}

.main-panel h1 {
    font-size: clamp(3.15rem, 8.2vw, 7.2rem);
    letter-spacing: 0;
    margin-bottom: 4px;
    background: linear-gradient(180deg, #ffffff 4%, #c9fbff 34%, #37f7ff 57%, #ff77bd 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 26px rgba(55, 247, 255, 0.42)) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.38));
}

.main-panel .subtitle {
    margin-bottom: 16px;
    color: #e9efff;
    font-size: clamp(0.82rem, 1.6vw, 1.02rem);
    letter-spacing: 4px;
}

.main-ship-window {
    position: relative;
    z-index: 1;
    width: min(300px, 52vw);
    aspect-ratio: 1;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(141, 233, 255, 0.14);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(55, 247, 255, 0.16), transparent 44%),
        radial-gradient(circle at 55% 45%, rgba(255, 47, 143, 0.13), transparent 28%);
    box-shadow: inset 0 0 50px rgba(55, 247, 255, 0.08), 0 0 46px rgba(55, 247, 255, 0.08);
}

.main-ship-core {
    width: 98px;
    height: 98px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #031018;
    background: linear-gradient(135deg, #ffffff, #37f7ff 48%, #ff7abd);
    font-family: "Consolas", monospace;
    font-size: 2rem;
    font-weight: 1000;
    box-shadow: 0 0 34px rgba(55, 247, 255, 0.45), 0 18px 42px rgba(0, 0, 0, 0.36);
    transform: rotate(45deg);
}

.main-ship-core::first-letter {
    transform: rotate(-45deg);
}

.main-ship-ring {
    position: absolute;
    inset: 28px;
    border: 1px solid rgba(55, 247, 255, 0.28);
    border-radius: 50%;
    border-left-color: rgba(255, 47, 143, 0.52);
    border-bottom-color: rgba(53, 255, 149, 0.38);
    animation: premiumSpin 12s linear infinite;
}

.main-ship-ring.ring-two {
    inset: 58px;
    animation-duration: 8s;
    animation-direction: reverse;
    opacity: 0.72;
}

.main-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 620px);
    margin: 0 auto 14px;
}

.main-stat-pill {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 209, 102, 0.32);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(255, 209, 102, 0.065);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 34px rgba(0, 0, 0, 0.22);
}

.main-stat-pill.highscore {
    border-color: rgba(55, 247, 255, 0.32);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(55, 247, 255, 0.07);
}

.main-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 620px);
    margin: 16px auto 0;
}

.btn {
    min-height: 48px;
    border-radius: 11px;
    font-weight: 950;
    letter-spacing: 0.8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        linear-gradient(135deg, rgba(55, 247, 255, 0.18), rgba(142, 108, 255, 0.18));
}

.main-actions .btn:first-child {
    grid-column: 1 / -1;
    min-height: 58px;
    color: #021016;
    border-color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, #f7fdff 0%, #37f7ff 48%, #35ff95 100%);
    box-shadow: 0 18px 46px rgba(55, 247, 255, 0.28), 0 0 34px rgba(53, 255, 149, 0.12);
}

.profile-button,
.main-fullscreen-btn {
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
        rgba(5, 8, 22, 0.76);
    backdrop-filter: blur(12px);
}

.map-panel,
.hangar-panel,
.difficulty-panel {
    width: min(95vw, 1080px) !important;
    padding: clamp(24px, 3vw, 38px) !important;
}

.map-container {
    width: 100%;
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(55, 247, 255, 0.05), rgba(255, 47, 143, 0.04)),
        rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(141, 233, 255, 0.10);
    box-shadow: inset 0 0 50px rgba(55, 247, 255, 0.035);
}

.map-node {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    transform: rotate(45deg);
}

.map-node>* {
    transform: rotate(-45deg);
}

.map-node.unlocked {
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.32), transparent 32%),
        linear-gradient(135deg, rgba(55, 247, 255, 0.18), rgba(142, 108, 255, 0.16));
}

.map-node.completed {
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.34), transparent 32%),
        linear-gradient(135deg, rgba(53, 255, 149, 0.24), rgba(55, 247, 255, 0.12));
}

.map-line {
    height: 2px;
    max-width: 70px;
    background: linear-gradient(90deg, transparent, rgba(141, 233, 255, 0.28), transparent);
}

.map-node {
    transform: none;
}

.map-node>* {
    transform: none;
}

.map-node.unlocked:hover {
    transform: translateY(-6px) scale(1.04);
}

.map-node-check {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #031018;
    background: var(--success);
    border: 2px solid rgba(255, 255, 255, 0.68);
    font-size: 0.8rem;
    font-weight: 1000;
    box-shadow: 0 0 12px rgba(53, 255, 149, 0.65);
}

.hangar-panel {
    max-width: 1180px !important;
}

.balance-chip {
    border-style: solid !important;
    border-color: rgba(255, 209, 102, 0.36) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(255, 209, 102, 0.08) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25), 0 0 24px rgba(255, 209, 102, 0.10);
}

.shop-tabs {
    padding: 6px;
    width: fit-content;
    max-width: 100%;
    margin: 14px auto 18px;
    border: 1px solid rgba(141, 233, 255, 0.14);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
}

.shop-tab {
    border-radius: 10px;
    padding: 10px 16px;
    border-color: transparent;
}

.shop-tab.active {
    background: linear-gradient(135deg, #37f7ff, #35ff95);
}

.shop-grid,
.shop-viewport {
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
        rgba(0, 0, 0, 0.22);
    border-color: rgba(141, 233, 255, 0.12);
}

.shop-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-height: min(58vh, 560px);
}

.shop-card-new,
.shop-offer-card,
.difficulty-card,
.upgrade-card {
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.115), rgba(255, 255, 255, 0.026)),
        radial-gradient(circle at 18% 0%, rgba(55, 247, 255, 0.16), transparent 35%),
        rgba(8, 12, 31, 0.72);
    border-color: rgba(141, 233, 255, 0.20);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 20px 44px rgba(0, 0, 0, 0.34);
}

.shop-card-new {
    min-height: 350px;
    justify-content: space-between;
}

.shop-card-new.selected {
    transform: translateY(-2px);
    border-color: rgba(53, 255, 149, 0.86);
}

.shop-card-new>div:first-child {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.035);
}

.shop-card-new>div:nth-child(2) {
    font-size: 1.22rem !important;
    font-weight: 1000 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.shop-card-new>div:nth-child(3) {
    border-color: rgba(141, 233, 255, 0.14) !important;
    border-radius: 14px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
        rgba(0, 0, 0, 0.30) !important;
    padding: 12px !important;
    line-height: 1.65 !important;
}

.shop-offer-card {
    min-height: 250px;
}

.shop-offer-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #041018;
    background: linear-gradient(135deg, #ffffff, #37f7ff);
    font-size: 1.1rem;
    font-weight: 1000;
}

.difficulty-grid {
    gap: 18px;
}

.difficulty-card {
    min-height: 260px;
    padding: 26px;
}

.difficulty-card.hard {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.026)),
        radial-gradient(circle at 18% 0%, rgba(255, 47, 143, 0.20), transparent 35%),
        rgba(8, 12, 31, 0.72);
}

.difficulty-title {
    font-size: 1.55rem;
}

.difficulty-lines span {
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

#pause-screen {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 209, 102, 0.11), transparent 32%),
        linear-gradient(160deg, rgba(2, 2, 10, 0.84), rgba(2, 4, 17, 0.98)) !important;
}

.pause-layout {
    grid-template-columns: minmax(250px, 0.9fr) minmax(300px, 1.05fr) minmax(250px, 0.9fr);
    gap: 20px;
    padding-top: 64px;
}

.pause-card {
    border-radius: 18px;
}

.pause-command {
    display: grid;
    align-content: center;
    gap: 10px;
    min-height: 380px;
    text-align: center;
}

.pause-copy {
    margin: -4px 0 10px;
}

.pause-command .btn {
    margin: 4px 0 !important;
    min-height: 54px;
}

.pause-status-pill {
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.032)),
        rgba(5, 8, 22, 0.82);
}

.daily-quests,
.quest-side-inner {
    border-radius: 16px;
}

@keyframes premiumSpin {
    to {
        transform: rotate(360deg);
    }
}

#announcement-layer {
    position: absolute;
    top: 74px;
    left: 50%;
    width: min(560px, calc(100vw - 340px));
    padding: 12px 22px;
    text-align: center;
    font-size: clamp(1.05rem, 2.7vw, 2.35rem);
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #eaffff;
    border: 2px solid rgba(126, 231, 255, 0.46);
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent, rgba(37, 226, 255, 0.12), transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(4, 8, 30, 0.30)),
        rgba(3, 8, 24, 0.46);
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.86),
        0 0 18px rgba(37, 226, 255, 0.86),
        0 0 38px rgba(255, 47, 143, 0.58),
        0 0 68px rgba(142, 108, 255, 0.44);
    box-shadow:
        0 0 24px rgba(37, 226, 255, 0.32),
        0 0 52px rgba(255, 47, 143, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -12px 26px rgba(21, 10, 82, 0.28);
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.42s ease, transform 0.42s ease;
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
}

#announcement-layer.active {
    animation: announcementNeonPop 0.72s cubic-bezier(0.2, 1, 0.2, 1);
    transform: translateX(-50%) translateY(0) scale(1);
}

@keyframes announcementNeonPop {
    0% {
        letter-spacing: 4px;
        filter: brightness(1.8);
        transform: translateX(-50%) translateY(-18px) scale(0.86);
    }

    58% {
        transform: translateX(-50%) translateY(2px) scale(1.04);
    }

    100% {
        letter-spacing: 1.8px;
        filter: brightness(1);
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

#screen-fx {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    display: block;
    opacity: 0;
    transition: opacity 0.18s ease;
}

#screen-fx::before,
.corner-ready {
    content: "";
    position: absolute;
    pointer-events: none;
}

#screen-fx::before {
    inset: 0;
    opacity: var(--fx-opacity, 0);
    background:
        radial-gradient(ellipse at center, transparent 48%, var(--fx-mid, rgba(255, 255, 255, 0.08)) 72%, var(--fx-color, rgba(255, 255, 255, 0.48)) 100%);
    box-shadow: inset 0 0 110px var(--fx-shadow, rgba(255, 255, 255, 0.28));
}

#screen-fx.low-hp {
    opacity: 1;
    --fx-opacity: 1;
    --fx-color: rgba(255, 19, 71, 0.58);
    --fx-mid: rgba(255, 19, 71, 0.10);
    --fx-shadow: rgba(255, 19, 71, 0.50);
    animation: lowHpVignette 0.9s ease-in-out infinite;
}

#screen-fx.pulse-boost {
    opacity: 1;
    --fx-opacity: 0.48;
    --fx-color: rgba(55, 247, 255, 0.46);
    --fx-mid: rgba(55, 247, 255, 0.07);
    --fx-shadow: rgba(55, 247, 255, 0.38);
    animation: boostVignette 0.44s ease-out;
}

#screen-fx.pulse-heal {
    opacity: 1;
    --fx-opacity: 1;
    --fx-color: rgba(53, 255, 149, 0.62);
    --fx-mid: rgba(53, 255, 149, 0.14);
    --fx-shadow: rgba(53, 255, 149, 0.48);
    animation: healVignette 0.7s ease-out;
}

#screen-fx.pulse-hit {
    opacity: 1;
    --fx-opacity: 1;
    --fx-color: rgba(255, 0, 44, 0.72);
    --fx-mid: rgba(255, 0, 44, 0.12);
    --fx-shadow: rgba(255, 0, 44, 0.62);
    animation: hitVignette 0.36s ease-out;
}

.corner-ready {
    width: min(36vw, 390px);
    height: min(36vw, 390px);
    right: -90px;
    bottom: -90px;
    border-radius: 50%;
    opacity: 0;
    filter: blur(1px);
    transform: scale(0.7);
    background:
        radial-gradient(circle, var(--corner-core, rgba(255, 255, 255, 0.75)) 0 2%, var(--corner-color, rgba(255, 255, 255, 0.42)) 16%, transparent 64%);
    mix-blend-mode: screen;
}

.corner-ready.heal-ready {
    --corner-core: rgba(220, 255, 235, 0.95);
    --corner-color: rgba(53, 255, 149, 0.62);
    animation: cornerReadyPulse 0.95s ease-out;
}

.corner-ready.boost-ready {
    --corner-core: rgba(210, 250, 255, 0.88);
    --corner-color: rgba(55, 247, 255, 0.48);
    animation: cornerReadyPulse 0.82s ease-out;
}

@keyframes panelFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes starDrift {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-58px, 58px, 0);
    }
}

@keyframes hpPanelAlarm {

    0%,
    100% {
        transform: translateX(0);
        filter: brightness(1);
    }

    50% {
        transform: translateX(2px);
        filter: brightness(1.28);
    }
}

@keyframes widgetSweep {
    0% {
        transform: translateX(-90%) rotate(8deg);
        opacity: 0;
    }

    22% {
        opacity: 1;
    }

    100% {
        transform: translateX(90%) rotate(8deg);
        opacity: 0;
    }
}

@keyframes lowHpVignette {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.34);
    }
}

@keyframes boostVignette {
    0% {
        filter: brightness(1.22);
        transform: scale(1.004);
    }

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

@keyframes healVignette {
    0% {
        filter: brightness(1.9) saturate(1.6);
        transform: scale(1.01);
    }

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

@keyframes hitVignette {
    0% {
        filter: brightness(1.45) saturate(1.3);
        transform: scale(1.006);
    }

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

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

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

    100% {
        opacity: 0;
        transform: scale(1.28);
    }
}

@keyframes pauseShipFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-4px) scale(1.08);
    }
}

@keyframes pauseShipRotate {
    0% {
        rotate: -8deg;
    }

    50% {
        rotate: 8deg;
    }

    100% {
        rotate: -8deg;
    }
}

@media (max-height: 720px) and (min-width: 781px) {
    #main-menu .panel {
        padding: 20px 24px;
    }

    #main-menu h1 {
        font-size: clamp(2.4rem, 8vh, 3.6rem);
    }

    #main-menu .subtitle {
        margin-bottom: 14px;
    }

    .main-stats {
        margin-bottom: 12px;
    }

    .main-actions .btn {
        padding: 11px 12px;
        font-size: 0.86rem;
    }
}

@media (max-width: 780px) {
    .screen {
        padding: 16px;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .screen::before {
        inset: 10px;
        border-radius: 20px;
    }

    .panel {
        padding: 26px 18px;
        width: 100%;
        margin: auto 0;
        border-radius: 18px;
    }

    .btn {
        width: 100%;
        margin: 6px 0;
        min-width: 0;
    }

    #main-menu .panel {
        padding: 20px 16px;
        margin: auto 0;
    }

    #main-menu h1 {
        font-size: clamp(2.15rem, 14vw, 3.35rem);
    }

    #main-menu .subtitle {
        margin-bottom: 14px;
        font-size: 0.78rem;
        letter-spacing: 2px;
    }

    .profile-widget {
        top: 10px;
        right: 10px;
    }

    .profile-panel {
        top: 44px;
        width: min(330px, calc(100vw - 20px));
        padding: 10px;
    }

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

    .profile-panel .btn {
        width: 100%;
        padding: 10px 8px;
    }

    .main-stats {
        gap: 8px;
        margin-bottom: 12px;
    }

    .main-stat-pill {
        width: 100%;
        padding: 7px 12px;
    }

    .main-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
    }

    .main-actions .btn {
        margin: 0;
        padding: 12px 12px;
    }

    .mobile-game-btn {
        display: inline-flex;
    }

    .main-fullscreen-btn {
        position: fixed;
        top: 10px;
        right: 56px;
        width: 36px;
        height: 36px;
        padding: 0;
    }

    .menu-nav-btn {
        top: 10px;
        width: 38px;
        height: 34px;
    }

    #menu-back-btn {
        left: 10px;
    }

    #menu-home-btn {
        right: 10px;
    }

    .map-container {
        gap: 7px;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .map-node {
        width: 58px;
        height: 58px;
        flex: 0 0 58px;
    }

    .map-line {
        flex: 0 0 28px;
    }

    #hangar-screen {
        padding-bottom: 88px;
    }

    #hangar-screen .panel {
        padding: 16px 12px 92px;
        margin: 0;
        width: 100%;
        min-height: 100%;
        border-radius: 16px;
    }

    #hangar-screen h2 {
        font-size: 1.28rem;
        margin-bottom: 4px;
    }

    #hangar-desc-text {
        margin: 0 0 8px;
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .shop-tabs {
        gap: 6px;
        margin: 8px 0;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .shop-tab {
        flex: 0 0 auto;
        padding: 8px 12px;
    }

    .shop-slider-container {
        gap: 6px;
        margin: 8px 0;
        align-items: stretch;
    }

    .scroll-btn {
        display: none !important;
    }

    .shop-viewport {
        max-width: 100%;
        padding: 10px;
        gap: 10px;
        border-radius: 12px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
        max-height: none;
        padding: 0;
    }

    .shop-card-new {
        flex-basis: min(248px, 76vw);
        min-height: 0;
        padding: 14px 12px;
        border-radius: 14px;
    }

    .shop-card-new .btn {
        margin-top: 8px !important;
        padding: 8px 10px !important;
        font-size: 0.76rem !important;
    }

    .hangar-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(3, 4, 14, 0.90);
        border-top: 1px solid rgba(55, 247, 255, 0.24);
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.42);
        backdrop-filter: blur(12px);
    }

    .hangar-actions .btn {
        margin: 0;
        width: 100%;
        padding: 12px 9px;
        font-size: 0.78rem;
    }

    #hangar-screen.shop-mode #shop-back-btn {
        grid-column: 1 / -1;
    }

    .perk-universe-topbar {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 8px;
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }

    .perk-universe-title {
        width: 100%;
    }

    .perk-universe-title strong {
        font-size: 1.08rem;
    }

    .perk-universe-title small {
        font-size: 0.72rem;
    }

    .perk-universe-balance {
        flex: 1 1 120px;
        text-align: left;
    }

    .perk-universe-topbar .btn {
        flex: 1 1 72px;
        width: auto;
        margin: 0;
    }

    .perk-info-blob {
        left: 10px !important;
        right: 10px;
        top: auto !important;
        bottom: 10px;
        width: auto !important;
        min-height: 0;
        max-height: 46vh;
        overflow-y: auto;
        padding: 13px;
    }

    .perk-current-panel {
        left: 10px;
        right: 10px;
        top: 142px;
        width: auto;
        max-height: calc(100vh - 152px);
        padding: 13px;
    }

    .current-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .perk-detail-row {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .upgrade-container {
        flex-direction: column;
    }

    .difficulty-grid {
        grid-template-columns: 1fr;
    }

    .daily-quests {
        margin-bottom: 10px;
    }

    .daily-quests summary {
        padding: 11px 12px;
    }

    .daily-quests #daily-quest-list {
        padding: 0 12px 10px;
    }

    .quest-row {
        grid-template-columns: 1fr;
    }

    .quest-claim {
        width: 100%;
    }

    #quest-side-panel {
        top: 188px;
        left: 16px;
        width: min(300px, calc(100vw - 32px));
    }

    .pause-layout {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .pause-card {
        padding: 22px 16px;
    }

    .pause-statusbar {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin-bottom: 12px;
    }

    .pause-card.side,
    .pause-card.quests,
    .pause-card.perks {
        width: 100%;
        height: auto;
        max-height: none;
        margin-top: 14px;
    }

    .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }

    input[type=range] {
        width: 100%;
    }

    #hud {
        padding: 10px;
    }

    .hud-top-row {
        position: absolute;
        top: 12px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        margin: 0;
        display: grid;
        grid-template-columns: minmax(118px, 138px) minmax(96px, 136px);
        grid-template-areas:
            "hp wave"
            "hp score";
        justify-content: space-between;
        align-items: start;
        gap: 6px;
    }

    .hud-stat {
        width: 100%;
        min-width: 0;
        font-size: 0.68rem;
        padding: 7px 8px;
        border-radius: 10px;
        letter-spacing: 0;
    }

    #health-display {
        grid-area: hp;
        min-width: 0;
        padding: 7px 8px 8px;
    }

    #wave-display {
        grid-area: wave;
        text-align: right;
    }

    #score-display {
        grid-area: score;
        text-align: right;
    }

    .hp-label {
        gap: 6px;
        margin-bottom: 5px;
        font-size: 0.68rem;
    }

    .hp-value {
        font-size: 0.74rem;
    }

    .hp-bar-shell {
        height: 6px;
    }

    #inventory-display {
        position: absolute;
        top: 86px;
        right: 10px;
        width: min(48vw, 176px);
        max-width: 176px;
        max-height: 124px;
        overflow: hidden;
        justify-content: flex-end;
        gap: 5px;
        margin-top: 0;
    }

    .inventory-item {
        padding: 4px 6px;
        border-radius: 8px;
        font-size: 0.58rem;
        gap: 4px;
    }

    #cooldown-hud {
        position: fixed;
        left: 50%;
        right: auto;
        top: auto;
        bottom: calc(10px + env(safe-area-inset-bottom));
        width: min(330px, calc(100vw - 20px));
        transform: translateX(-50%);
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .cooldown-widget {
        width: 70px;
        height: 14px;
        padding: 3px;
        border-radius: 999px;
        font-size: 0;
        gap: 0;
    }

    .cooldown-widget>span {
        display: none;
    }

    .cd-bar-outer {
        width: 100%;
        height: 6px;
    }

    #boss-ui {
        width: calc(100vw - 28px);
        bottom: calc(232px + env(safe-area-inset-bottom));
    }

    #touch-controls {
        bottom: env(safe-area-inset-bottom);
    }

    #touch-joystick {
        left: 86px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 118px;
        height: 118px;
    }

    #touch-aim-joystick {
        right: 86px;
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 118px;
        height: 118px;
    }

    #touch-stick,
    #touch-aim-stick {
        width: 48px;
        height: 48px;
    }

    #touch-abilities {
        left: 50%;
        bottom: calc(24px + env(safe-area-inset-bottom));
        width: min(210px, calc(100vw - 190px));
    }

    .touch-ability-btn {
        width: 70px;
        height: 62px;
        border-radius: 14px;
        font-size: 0.72rem;
    }

}

@media (orientation: landscape) and (pointer: coarse) {
    #hud {
        padding: 10px 12px;
    }

    .hud-top-row {
        grid-template-columns: minmax(170px, 230px) minmax(170px, 240px) minmax(150px, 210px);
        gap: 8px;
    }

    .hud-stat {
        padding: 7px 10px;
        font-size: 0.78rem;
        border-radius: 12px;
    }

    #touch-joystick {
        left: calc(74px + env(safe-area-inset-left));
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 118px;
        height: 118px;
    }

    #touch-aim-joystick {
        right: calc(74px + env(safe-area-inset-right));
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 118px;
        height: 118px;
    }

    #touch-abilities {
        left: 50%;
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 210px;
        transform: translateX(-50%);
    }

    .touch-ability-btn {
        width: 70px;
        height: 58px;
    }

    .free-roam-radio,
    body.free-roam-hud #quest-side-panel {
        transform: scale(0.86);
        transform-origin: top left;
    }
}

/*
         * Clean UI rebuild
         * This final layer intentionally flattens the earlier experimental glow
         * treatment into a stable, readable app-style game interface.
         */
:root {
    --ui-bg: #070a12;
    --ui-surface: #101624;
    --ui-surface-2: #151d2e;
    --ui-surface-3: #1b2638;
    --ui-border: rgba(167, 188, 220, 0.22);
    --ui-border-strong: rgba(114, 219, 255, 0.42);
    --ui-text: #f4f8ff;
    --ui-muted: #a7b4cb;
    --ui-cyan: #4edcff;
    --ui-pink: #ff5fa8;
    --ui-green: #50f0a4;
    --ui-yellow: #ffd36e;
    --ui-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body,
html {
    background:
        radial-gradient(circle at 20% 0%, rgba(78, 220, 255, 0.16), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(255, 95, 168, 0.12), transparent 28%),
        linear-gradient(145deg, #070a12, #0b1020 52%, #05070d);
}

body::before {
    opacity: 0.16;
    background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.8px, transparent 0.8px);
    background-size: 78px 78px;
}

body::after,
.screen::before,
.panel::before,
.panel::after,
.pause-card::before,
.main-ship-window,
.main-ship-ring {
    display: none !important;
}

.screen {
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 88px 24px 28px !important;
    background: rgba(7, 10, 18, 0.82) !important;
    backdrop-filter: blur(10px) saturate(125%) !important;
    transform: none;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.panel,
.pause-card,
.profile-panel {
    position: relative;
    z-index: 1;
    overflow: visible !important;
    width: min(1120px, 100%) !important;
    max-width: min(1120px, 100%) !important;
    margin: 0 auto !important;
    padding: clamp(22px, 3vw, 34px) !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        var(--ui-surface) !important;
    box-shadow: var(--ui-shadow) !important;
    animation: none !important;
    text-align: left !important;
}

.panel h1,
.panel h2,
.pause-card h2 {
    margin: 0 0 8px !important;
    color: var(--ui-text) !important;
    text-align: left !important;
    text-shadow: none !important;
    filter: none !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    letter-spacing: 0 !important;
    line-height: 1.05 !important;
}

.panel h1 {
    font-size: clamp(2.6rem, 7vw, 5.8rem) !important;
}

.panel h2,
.pause-card h2 {
    font-size: clamp(1.65rem, 3.4vw, 2.65rem) !important;
}

.subtitle,
.panel p,
.pause-copy {
    max-width: 760px;
    margin: 0 0 18px !important;
    color: var(--ui-muted) !important;
    text-align: left !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

.main-kicker {
    justify-self: start !important;
    margin: 0 0 12px !important;
    border-color: rgba(78, 220, 255, 0.26) !important;
    color: var(--ui-cyan) !important;
    background: rgba(78, 220, 255, 0.08) !important;
    text-shadow: none !important;
}

.menu-nav-btn,
.main-fullscreen-btn,
.profile-button {
    position: fixed !important;
    z-index: 80 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid var(--ui-border) !important;
    background: rgba(16, 22, 36, 0.92) !important;
    color: var(--ui-text) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(10px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
}

.menu-nav-btn.hidden {
    display: none !important;
}

#menu-back-btn {
    top: 18px !important;
    left: 18px !important;
}

#menu-home-btn {
    top: 18px !important;
    left: 70px !important;
    right: auto !important;
}

.main-fullscreen-btn {
    top: 18px !important;
    right: 70px !important;
}

.profile-widget {
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 82 !important;
}

.profile-button {
    position: static !important;
}

.profile-panel {
    position: absolute !important;
    top: 54px !important;
    right: 0 !important;
    width: min(340px, calc(100vw - 36px)) !important;
    padding: 16px !important;
}

.btn {
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(78, 220, 255, 0.32) !important;
    background: var(--ui-surface-2) !important;
    color: var(--ui-text) !important;
    box-shadow: none !important;
    font-size: 0.92rem !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
    border-color: var(--ui-cyan) !important;
    background: var(--ui-surface-3) !important;
    color: var(--ui-text) !important;
}

.btn::before {
    display: none !important;
}

.btn:not(.btn-secondary) {
    background: linear-gradient(135deg, #30c7ff, #51e89f) !important;
    color: #041017 !important;
    border-color: transparent !important;
}

.btn:disabled {
    opacity: 0.52 !important;
    transform: none !important;
}

#main-menu .main-panel {
    display: block !important;
    min-height: 0 !important;
}

#main-menu .main-kicker,
#main-menu h1,
#main-menu .subtitle {
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto !important;
}

#main-menu h1 {
    margin-top: 0 !important;
}

#main-menu .subtitle {
    margin-top: 0 !important;
}

.main-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
}

.main-stat-pill {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid var(--ui-border) !important;
    border-radius: 16px !important;
    background: var(--ui-surface-2) !important;
    color: var(--ui-yellow) !important;
    box-shadow: none !important;
    font-size: 1rem !important;
    padding: 16px !important;
}

.main-stat-pill.highscore {
    color: var(--ui-cyan) !important;
    background: var(--ui-surface-2) !important;
}

#main-menu .daily-quests {
    width: 100% !important;
    height: 100%;
    margin: 14px 0 !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-2) !important;
    box-shadow: none !important;
}

.main-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
}

.main-actions .btn:first-child {
    grid-column: 1 / -1 !important;
}

#main-menu .main-actions .btn:last-child {
    grid-column: 1 / -1 !important;
}

.daily-title,
.daily-quests summary.daily-title {
    color: var(--ui-text) !important;
    text-shadow: none !important;
}

.daily-reset,
.quest-desc {
    color: var(--ui-muted) !important;
}

.quest-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.quest-claim {
    border-color: rgba(80, 240, 164, 0.34) !important;
    border-radius: 10px !important;
    background: rgba(80, 240, 164, 0.10) !important;
    color: var(--ui-green) !important;
}

#main-menu .daily-quests {
    overflow: hidden !important;
    transition: width 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

#main-menu .daily-quests:not([open]) {
    width: fit-content !important;
    height: auto !important;
    margin: 14px 0 !important;
    border-color: transparent !important;
    background: transparent !important;
}

#main-menu .daily-quests summary.daily-title {
    width: fit-content !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 14px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 12px !important;
    background: var(--ui-surface-2) !important;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#main-menu .daily-quests summary.daily-title:hover {
    border-color: var(--ui-border-strong) !important;
    background: var(--ui-surface-3) !important;
    transform: translateY(-1px);
}

#main-menu .daily-quests[open] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-color: var(--ui-border) !important;
    background: var(--ui-surface-2) !important;
    padding: 0 14px 14px !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24) !important;
}

#main-menu .daily-quests[open] summary.daily-title {
    width: calc(100% + 28px) !important;
    margin: 0 -14px 0 !important;
    border-width: 0 0 1px 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 12px 14px !important;
}

#main-menu .daily-quests #daily-quest-list {
    width: 100% !important;
    padding: 4px 0 0 !important;
    animation: questsSlideOut 0.22s ease both;
}

#main-menu .daily-quests[open] .quest-row {
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto) !important;
    width: 100% !important;
    padding: 12px 0 !important;
}

#main-menu .daily-quests[open] .quest-claim {
    width: 100% !important;
    max-width: 150px;
    justify-self: end;
}

#main-menu .daily-quests[open] .quest-name,
#main-menu .daily-quests[open] .quest-desc {
    min-width: 0;
    overflow-wrap: anywhere;
}

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

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

.map-panel,
.hangar-panel,
.difficulty-panel,
#settings-screen .panel,
#pause-settings .panel,
#upgrade-screen .panel,
#victory-screen .panel,
#gameover-screen .panel {
    display: block !important;
}

.map-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    margin: 22px 0 !important;
    padding: 18px !important;
    border-radius: 16px !important;
    border: 1px solid var(--ui-border) !important;
    background: #0b1020 !important;
    overflow: visible !important;
}

.map-node {
    width: 100% !important;
    max-width: 86px;
    height: 74px !important;
    justify-self: center;
    border-radius: 16px !important;
    transform: none !important;
    background: var(--ui-surface-2) !important;
    color: var(--ui-muted) !important;
    box-shadow: none !important;
    border-color: var(--ui-border) !important;
}

.map-node.unlocked {
    color: var(--ui-text) !important;
    border-color: var(--ui-border-strong) !important;
    background: #14233a !important;
}

.map-node.completed {
    border-color: rgba(80, 240, 164, 0.45) !important;
    color: var(--ui-green) !important;
}

.map-node.unlocked:hover {
    transform: translateY(-3px) !important;
    background: #19304d !important;
}

.map-line {
    display: none !important;
}

.universe-arrow {
    width: 100% !important;
    max-width: 86px;
    height: 74px !important;
    justify-self: center;
    border-radius: 16px !important;
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-border) !important;
    color: var(--ui-text) !important;
}

.shop-tabs {
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 18px 0 !important;
    padding: 8px !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 14px !important;
    background: #0b1020 !important;
}

.shop-tab {
    border-radius: 10px !important;
    padding: 10px 14px !important;
    background: transparent !important;
    color: var(--ui-muted) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

.shop-tab.active {
    background: var(--ui-surface-3) !important;
    color: var(--ui-text) !important;
    border-color: var(--ui-border-strong) !important;
}

.shop-slider-container {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 0 18px !important;
}

.shop-grid,
.shop-viewport {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.shop-viewport {
    overflow-x: auto !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 300px);
    grid-template-columns: none !important;
    padding-bottom: 8px !important;
}

.shop-card-new,
.shop-offer-card,
.difficulty-card,
.upgrade-card {
    min-height: 0 !important;
    height: auto !important;
    border: 1px solid var(--ui-border) !important;
    border-radius: 16px !important;
    background: var(--ui-surface-2) !important;
    box-shadow: none !important;
    padding: 18px !important;
    transform: none !important;
}

.shop-card-new:hover,
.shop-offer-card:hover,
.difficulty-card:hover,
.upgrade-card:hover {
    border-color: var(--ui-border-strong) !important;
    transform: translateY(-2px) !important;
}

.shop-card-new>div:first-child {
    width: 72px !important;
    height: 72px !important;
    border-radius: 14px !important;
    background: #0b1020 !important;
}

.shop-card-new>div:nth-child(3) {
    width: 100% !important;
    background: #0b1020 !important;
    border-color: var(--ui-border) !important;
}

.shop-offer-icon {
    width: 52px !important;
    height: 52px !important;
    border-radius: 14px !important;
    background: #0b1020 !important;
    color: var(--ui-cyan) !important;
}

.balance-chip {
    margin: 4px 0 16px !important;
    border: 1px solid rgba(255, 211, 110, 0.32) !important;
    border-radius: 12px !important;
    background: rgba(255, 211, 110, 0.08) !important;
    box-shadow: none !important;
}

.hangar-actions {
    position: static !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.difficulty-grid,
.upgrade-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
}

.difficulty-lines span {
    background: #0b1020 !important;
    border-color: var(--ui-border) !important;
}

.pause-statusbar {
    position: static !important;
    transform: none !important;
    width: min(1120px, 100%) !important;
    margin: 0 auto 14px !important;
    justify-content: flex-start !important;
    pointer-events: none;
}

.pause-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr) minmax(0, 1fr) !important;
    gap: 14px !important;
    width: min(1120px, 100%) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.pause-card {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

.pause-command {
    min-height: 0 !important;
    align-content: start !important;
}

.pause-command .btn {
    width: 100% !important;
    margin-top: 10px !important;
}

.pause-status-pill {
    border-radius: 12px !important;
    background: var(--ui-surface-2) !important;
    border-color: var(--ui-border) !important;
    box-shadow: none !important;
}

.setting-row {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 340px);
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
}

input[type=range] {
    width: 100% !important;
}

@media (max-width: 900px) {
    #main-menu .main-panel {
        display: block !important;
    }

    #main-menu .main-kicker,
    #main-menu h1,
    #main-menu .subtitle {
        grid-column: auto !important;
        grid-row: auto !important;
        margin-top: 0 !important;
    }

    .pause-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .screen {
        padding: 78px 14px 18px !important;
    }

    #menu-back-btn {
        top: 12px !important;
        left: 12px !important;
    }

    #menu-home-btn {
        top: 12px !important;
        left: 62px !important;
    }

    .main-fullscreen-btn {
        top: 12px !important;
        right: 62px !important;
    }

    .profile-widget {
        top: 12px !important;
        right: 12px !important;
    }

    .menu-nav-btn,
    .main-fullscreen-btn,
    .profile-button {
        width: 40px !important;
        height: 40px !important;
    }

    .panel,
    .pause-card {
        padding: 18px !important;
        border-radius: 16px !important;
    }

    .main-stats,
    .main-actions,
    .main-info-grid,
    .difficulty-grid,
    .upgrade-container {
        grid-template-columns: 1fr !important;
    }

    #main-menu .daily-quests[open] {
        padding: 0 12px 12px !important;
    }

    #main-menu .daily-quests[open] summary.daily-title {
        width: calc(100% + 24px) !important;
        margin: 0 -12px !important;
    }

    #main-menu .daily-quests[open] .quest-row {
        grid-template-columns: 1fr !important;
    }

    #main-menu .daily-quests[open] .quest-claim {
        max-width: none;
        justify-self: stretch;
    }

    .shop-slider-container {
        grid-template-columns: 1fr !important;
    }

    .scroll-btn {
        display: none !important;
    }

    .shop-viewport {
        grid-auto-columns: minmax(238px, 82vw);
    }

    .map-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px !important;
        padding: 12px !important;
    }

    .map-node,
    .universe-arrow {
        height: 62px !important;
        max-width: none;
    }

    .setting-row {
        grid-template-columns: 1fr;
    }
}

/*
         * Premium polish layer
         * Visual-only upgrades on top of the stable rebuild above.
         */
:root {
    --premium-cyan: #4ee8ff;
    --premium-blue: #5d8cff;
    --premium-pink: #ff5fad;
    --premium-green: #58f5ad;
    --premium-gold: #ffd778;
    --premium-violet: #9d7cff;
    --premium-red: #ff5576;
    --premium-glass: rgba(255, 255, 255, 0.072);
    --premium-glass-2: rgba(255, 255, 255, 0.035);
}

body,
html {
    background:
        radial-gradient(circle at 15% 12%, rgba(78, 232, 255, 0.22), transparent 31%),
        radial-gradient(circle at 82% 8%, rgba(157, 124, 255, 0.16), transparent 28%),
        radial-gradient(circle at 74% 82%, rgba(255, 95, 173, 0.14), transparent 34%),
        linear-gradient(145deg, #050711 0%, #0b1020 45%, #070912 100%) !important;
}

body::before {
    display: block !important;
    opacity: 0.24 !important;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.62) 0.7px, transparent 0.7px),
        linear-gradient(rgba(78, 232, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 232, 255, 0.045) 1px, transparent 1px);
    background-size: 96px 96px, 120px 120px, 120px 120px;
    animation: starDrift 70s linear infinite;
}

.screen {
    background:
        linear-gradient(180deg, rgba(6, 9, 18, 0.68), rgba(6, 9, 18, 0.92)),
        radial-gradient(circle at 50% 0%, rgba(78, 232, 255, 0.08), transparent 38%) !important;
}

.panel,
.pause-card,
.profile-panel {
    border-color: rgba(153, 206, 255, 0.26) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.018)),
        radial-gradient(circle at 14% 0%, rgba(78, 232, 255, 0.11), transparent 34%),
        radial-gradient(circle at 94% 8%, rgba(255, 95, 173, 0.08), transparent 32%),
        rgba(14, 20, 34, 0.92) !important;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.025) !important;
}

.panel::before,
.pause-card::before {
    display: block !important;
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(90deg, transparent, rgba(78, 232, 255, 0.24), transparent) top left / 100% 1px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%);
}

.main-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.032)),
        radial-gradient(circle at 10% 4%, rgba(78, 232, 255, 0.18), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(255, 95, 173, 0.12), transparent 36%),
        rgba(14, 20, 34, 0.94) !important;
}

#main-menu .main-panel {
    width: min(89vw, 1780px) !important;
    max-width: 1780px !important;
    min-height: min(820px, calc(100vh - 128px)) !important;
    margin: 104px auto 46px !important;
    padding: clamp(32px, 5vh, 56px) clamp(42px, 5vw, 72px) clamp(52px, 7vh, 78px) !important;
    overflow: visible !important;
}

#main-menu h1 {
    max-width: 900px;
    font-weight: 1000;
    letter-spacing: -0.02em !important;
    background: linear-gradient(180deg, #ffffff 6%, #c9f8ff 38%, var(--premium-cyan) 66%, #ffadd5 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.34)) !important;
}

#main-menu .subtitle {
    color: #c5d4f4 !important;
    font-size: 1.08rem;
}

.main-kicker {
    border-color: rgba(88, 245, 173, 0.34) !important;
    color: var(--premium-green) !important;
    background: rgba(88, 245, 173, 0.10) !important;
    box-shadow: inset 0 0 18px rgba(88, 245, 173, 0.04);
}

.menu-nav-btn,
.main-fullscreen-btn,
.profile-button {
    border-color: rgba(153, 206, 255, 0.28) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
        rgba(14, 20, 34, 0.92) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.menu-nav-btn:hover,
.main-fullscreen-btn:hover,
.profile-button:hover {
    border-color: rgba(78, 232, 255, 0.68) !important;
    color: var(--premium-cyan) !important;
    transform: translateY(-2px) !important;
}

.profile-button.signed-in {
    color: var(--premium-green) !important;
    border-color: rgba(88, 245, 173, 0.55) !important;
    box-shadow: 0 0 28px rgba(88, 245, 173, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.btn {
    position: relative;
    overflow: hidden;
    border-color: rgba(153, 206, 255, 0.25) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
        rgba(24, 34, 52, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

.btn:not(.btn-secondary) {
    background: linear-gradient(135deg, var(--premium-cyan), var(--premium-green)) !important;
    box-shadow: 0 16px 34px rgba(78, 232, 255, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.btn:hover {
    border-color: rgba(78, 232, 255, 0.72) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
}

.main-actions .btn:first-child {
    font-size: 1.02rem !important;
    min-height: 62px !important;
}

.main-actions .btn:nth-child(2) {
    border-color: rgba(255, 215, 120, 0.35) !important;
}

.main-actions .btn:nth-child(3) {
    border-color: rgba(157, 124, 255, 0.36) !important;
}

.main-actions .btn:nth-child(4) {
    border-color: rgba(255, 95, 173, 0.36) !important;
}

.main-stat-pill {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
        rgba(255, 215, 120, 0.075) !important;
    border-color: rgba(255, 215, 120, 0.30) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.main-stat-pill.highscore {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
        rgba(78, 232, 255, 0.075) !important;
    border-color: rgba(78, 232, 255, 0.30) !important;
}

.main-stat-pill.user-pill {
    color: var(--premium-green) !important;
    border-color: rgba(88, 245, 173, 0.30) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
        rgba(88, 245, 173, 0.075) !important;
}

.main-info-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 0;
}

.main-info-card {
    position: relative;
    overflow: hidden;
    min-height: 84px;
    padding: 14px;
    border: 1px solid rgba(153, 206, 255, 0.20);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022)),
        rgba(19, 28, 44, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--ui-text);
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.main-info-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -34px auto;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--info-glow, rgba(78, 232, 255, 0.16));
    filter: blur(4px);
    opacity: 0.75;
    pointer-events: none;
}

.main-info-card:hover {
    transform: translateY(-3px);
    border-color: var(--info-color, var(--premium-cyan));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.028)),
        rgba(24, 34, 52, 0.90);
}

.campaign-info {
    --info-color: var(--premium-cyan);
    --info-glow: rgba(78, 232, 255, 0.18);
}

.fleet-info {
    --info-color: var(--premium-green);
    --info-glow: rgba(88, 245, 173, 0.18);
}

.boost-info {
    --info-color: var(--premium-gold);
    --info-glow: rgba(255, 215, 120, 0.18);
}

.quest-info {
    --info-color: var(--premium-pink);
    --info-glow: rgba(255, 95, 173, 0.18);
}

.main-info-icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    border: 1px solid color-mix(in srgb, var(--info-color, var(--premium-cyan)) 46%, transparent);
    border-radius: 10px;
    color: var(--info-color, var(--premium-cyan));
    background: color-mix(in srgb, var(--info-color, var(--premium-cyan)) 11%, transparent);
    font-size: 1rem;
    font-weight: 1000;
}

.main-info-label {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: var(--info-color, var(--ui-muted));
    font-family: "Consolas", monospace;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.main-info-card strong {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--ui-text);
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#main-menu .main-stats {
    position: fixed !important;
    top: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 78 !important;
    width: min(620px, calc(100vw - 220px)) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 !important;
    pointer-events: none;
}

#main-menu .main-stat-pill {
    min-height: 44px !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    font-size: 0.88rem !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
        rgba(14, 20, 34, 0.92) !important;
    backdrop-filter: blur(10px);
}

#main-menu .main-settings-btn {
    position: fixed !important;
    top: 18px !important;
    right: 122px !important;
    z-index: 80 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 1.05rem !important;
    line-height: 1 !important;
}

#main-menu .main-fullscreen-btn,
#main-menu .main-settings-btn,
.profile-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#main-menu .main-fullscreen-btn {
    right: 70px !important;
}

#main-menu .main-settings-btn {
    right: 122px !important;
}

.profile-widget {
    right: 18px !important;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--premium-cyan) rgba(9, 15, 29, 0.86);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(9, 15, 29, 0.86);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid rgba(9, 15, 29, 0.86);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--premium-cyan), var(--premium-violet), var(--premium-pink));
    box-shadow: 0 0 16px rgba(78, 232, 255, 0.28);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffffff, var(--premium-cyan), var(--premium-green));
}

#main-menu .daily-quests summary.daily-title,
#main-menu .daily-quests[open] {
    border-color: rgba(153, 206, 255, 0.26) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.028)),
        rgba(19, 28, 44, 0.92) !important;
}

#main-menu .daily-quests[open] {
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

#main-menu .daily-quests[open] summary.daily-title {
    background: rgba(255, 255, 255, 0.035) !important;
}

.quest-row {
    border-top-color: rgba(153, 206, 255, 0.11) !important;
}

.quest-name {
    color: var(--ui-text) !important;
}

.quest-fill {
    background: linear-gradient(90deg, var(--premium-green), var(--premium-cyan)) !important;
}

.quest-claim {
    background: rgba(88, 245, 173, 0.11) !important;
    border-color: rgba(88, 245, 173, 0.42) !important;
    color: #dfffee !important;
}

.quest-claim:not(:disabled):hover {
    background: rgba(88, 245, 173, 0.20) !important;
    border-color: rgba(88, 245, 173, 0.72) !important;
}

.quest-row.bonus-quest {
    border: 1px solid rgba(255, 215, 120, 0.30) !important;
    border-radius: 14px;
    box-sizing: border-box;
    padding: 12px !important;
    margin: 10px auto;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.024)),
        radial-gradient(circle at 0% 0%, rgba(255, 215, 120, 0.18), transparent 36%),
        rgba(36, 28, 16, 0.50);
}

.quest-row.bonus-quest .quest-name {
    color: var(--premium-gold) !important;
}

.quest-row.bonus-quest .quest-fill {
    background: linear-gradient(90deg, var(--premium-gold), var(--premium-pink)) !important;
}

.quest-row.bonus-quest .quest-claim {
    border-color: rgba(255, 215, 120, 0.48) !important;
    background: rgba(255, 215, 120, 0.12) !important;
    color: var(--premium-gold) !important;
}

.map-container {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(9, 15, 29, 0.94) !important;
    border-color: rgba(153, 206, 255, 0.20) !important;
}

.map-node,
.universe-arrow {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.026)),
        rgba(22, 31, 48, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.map-node.unlocked {
    background:
        radial-gradient(circle at 50% 0%, rgba(78, 232, 255, 0.20), transparent 48%),
        rgba(20, 35, 58, 0.94) !important;
    border-color: rgba(78, 232, 255, 0.46) !important;
}

.map-node.completed {
    background:
        radial-gradient(circle at 50% 0%, rgba(88, 245, 173, 0.20), transparent 48%),
        rgba(21, 45, 42, 0.94) !important;
    border-color: rgba(88, 245, 173, 0.56) !important;
}

.map-node-check {
    background: linear-gradient(135deg, var(--premium-green), var(--premium-cyan)) !important;
    box-shadow: 0 0 18px rgba(88, 245, 173, 0.36) !important;
}

.shop-tabs {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(9, 15, 29, 0.94) !important;
}

.shop-tab.active {
    background:
        linear-gradient(135deg, rgba(78, 232, 255, 0.20), rgba(88, 245, 173, 0.13)),
        rgba(31, 43, 64, 0.96) !important;
    border-color: rgba(78, 232, 255, 0.48) !important;
    color: #f9fdff !important;
}

.shop-card-new,
.shop-offer-card,
.difficulty-card,
.upgrade-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.026)),
        radial-gradient(circle at 18% 0%, rgba(78, 232, 255, 0.10), transparent 34%),
        rgba(19, 28, 44, 0.92) !important;
    border-color: rgba(153, 206, 255, 0.20) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

.shop-card-new.selected {
    border-color: rgba(88, 245, 173, 0.58) !important;
    box-shadow: 0 0 0 1px rgba(88, 245, 173, 0.12), 0 18px 38px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.shop-card-new.locked {
    opacity: 0.72 !important;
}

.shop-card-new>div:first-child,
.shop-offer-icon {
    background:
        radial-gradient(circle at 50% 0%, rgba(78, 232, 255, 0.18), transparent 60%),
        #0a1020 !important;
    border: 1px solid rgba(153, 206, 255, 0.16) !important;
}

.shop-card-new>div:nth-child(2),
.shop-offer-title {
    color: #ffffff !important;
    letter-spacing: 0.01em;
}

.shop-card-new>div:nth-child(3) {
    background: rgba(8, 13, 25, 0.72) !important;
}

.shop-price,
.balance-chip {
    color: var(--premium-gold) !important;
}

.shop-owned {
    color: var(--premium-green) !important;
}

.difficulty-card {
    border-color: rgba(78, 232, 255, 0.26) !important;
}

.difficulty-card.hard {
    border-color: rgba(255, 95, 173, 0.32) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.026)),
        radial-gradient(circle at 18% 0%, rgba(255, 95, 173, 0.13), transparent 34%),
        rgba(22, 25, 43, 0.92) !important;
}

.difficulty-tag {
    background: linear-gradient(135deg, var(--premium-green), var(--premium-cyan)) !important;
    color: #041017 !important;
}

.difficulty-card.hard .difficulty-tag {
    background: linear-gradient(135deg, var(--premium-pink), var(--premium-violet)) !important;
    color: #fff !important;
}

.difficulty-lines span {
    background: rgba(7, 12, 24, 0.72) !important;
}

.pause-status-pill {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.026)),
        rgba(19, 28, 44, 0.94) !important;
    border-color: rgba(153, 206, 255, 0.20) !important;
}

.pause-command {
    border-color: rgba(255, 215, 120, 0.25) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)),
        radial-gradient(circle at 50% 0%, rgba(255, 215, 120, 0.12), transparent 40%),
        rgba(19, 28, 44, 0.92) !important;
}

.pause-card.quests {
    border-color: rgba(88, 245, 173, 0.24) !important;
}

.pause-card.perks {
    border-color: rgba(78, 232, 255, 0.24) !important;
}

.pause-perk-row {
    border-top-color: rgba(153, 206, 255, 0.11) !important;
}

.pause-perk-level,
.pause-perk-effect {
    color: var(--premium-cyan) !important;
}

.setting-row {
    border-bottom-color: rgba(153, 206, 255, 0.10) !important;
}

input[type=range] {
    accent-color: var(--premium-cyan);
}

.profile-panel input {
    border-color: rgba(153, 206, 255, 0.22) !important;
    background: rgba(7, 12, 24, 0.72) !important;
    color: var(--ui-text) !important;
}

.daily-quest-drawer {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 76;
    width: min(920px, calc(100vw - 36px));
    max-height: calc(100vh - 112px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 34px));
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.daily-quest-drawer.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.daily-quest-drawer-inner {
    overflow: hidden;
    max-height: inherit;
    padding: 18px;
    border: 1px solid rgba(153, 206, 255, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.032)),
        radial-gradient(circle at 16% 0%, rgba(88, 245, 173, 0.13), transparent 36%),
        rgba(14, 20, 34, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(135%);
}

.daily-quest-drawer-inner::-webkit-scrollbar {
    display: none;
}

.daily-quest-drawer .daily-title {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 8px !important;
    padding-right: 42px;
    text-align: center;
}

.daily-quest-drawer .daily-title span:first-child {
    justify-self: start;
}

.daily-quest-drawer .daily-title .daily-reset {
    justify-self: center;
    grid-column: 2;
}

.quest-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.daily-quest-drawer .quest-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto) !important;
    padding: 12px 0 !important;
}

.daily-quest-drawer .quest-row.bonus-quest {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto) !important;
    align-items: center;
    justify-self: center;
    padding: 12px !important;
}

.daily-quest-drawer .quest-claim {
    width: 100% !important;
    max-width: 150px;
    justify-self: end;
}

#daily-quest-list.compact-quests .quest-row {
    padding: 10px 0 !important;
}

#daily-quest-list.compact-quests .quest-desc {
    font-size: 0.78rem;
    line-height: 1.3;
}

#daily-quest-list.compact-quests .quest-progress {
    height: 6px;
    margin-top: 6px;
}

#daily-quest-list.scroll-quests {
    max-height: min(58vh, 520px);
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--premium-cyan) rgba(9, 15, 29, 0.86);
}

#daily-quest-list.scroll-quests::-webkit-scrollbar {
    width: 8px;
}

#daily-quest-list.scroll-quests::-webkit-scrollbar-track {
    margin-top: 18px;
    background: rgba(9, 15, 29, 0.86);
    border-radius: 999px;
}

#daily-quest-list.scroll-quests::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, var(--premium-cyan), var(--premium-violet));
}

@media (max-width: 640px) {
    #main-menu h1 {
        font-size: clamp(2.45rem, 16vw, 4rem) !important;
    }

    #main-menu .subtitle {
        font-size: 0.98rem;
    }

    .main-actions .btn:first-child {
        min-height: 56px !important;
    }

    #main-menu .main-stats {
        top: 58px !important;
        width: calc(100vw - 24px) !important;
    }

    #main-menu .main-stat-pill {
        min-height: 36px !important;
        padding: 6px 8px !important;
        font-size: 0.76rem !important;
    }

    #main-menu .main-settings-btn {
        top: 12px !important;
        right: 112px !important;
        width: 40px !important;
        height: 40px !important;
    }

    #main-menu .main-fullscreen-btn,
    #main-menu .main-settings-btn,
    .profile-button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }

    #main-menu .main-fullscreen-btn {
        right: 62px !important;
    }

    #main-menu .main-settings-btn {
        right: 112px !important;
    }

    .daily-quest-drawer {
        bottom: 14px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 92px);
    }

    .daily-quest-drawer-inner {
        padding: 14px;
        border-radius: 16px;
    }

    .daily-quest-drawer .daily-title {
        grid-template-columns: 1fr;
        padding-right: 38px;
        text-align: left;
    }

    .daily-quest-drawer .daily-title .daily-reset {
        grid-column: 1;
        justify-self: start;
        margin-top: 3px;
    }

    .quest-drawer-close {
        top: 12px;
        right: 12px;
    }

    .daily-quest-drawer .quest-row {
        grid-template-columns: 1fr !important;
    }

    .daily-quest-drawer .quest-claim {
        max-width: none;
        justify-self: stretch;
    }

    #daily-quest-list.scroll-quests {
        max-height: min(56vh, 480px);
    }
}

.hero-title-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 4vw, 40px);
    width: 100%;
    margin-bottom: 4px;
}

.hero-logo {
    display: block;
    width: min(62vw, 760px);
    max-height: clamp(92px, 18vh, 190px);
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(78, 232, 255, 0.34)) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.42));
}

.hero-ufo-img {
    display: block;
    flex: 0 0 clamp(88px, 13vw, 168px);
    width: clamp(88px, 13vw, 168px);
    max-height: clamp(76px, 13vh, 150px);
    object-fit: contain;
    animation: ufoFloat 4.2s ease-in-out infinite;
    filter: drop-shadow(0 0 24px rgba(78, 232, 255, 0.34)) drop-shadow(0 0 34px rgba(255, 95, 173, 0.16));
}

#main-menu .hero-title-row h1 {
    margin: 0 !important;
    background: linear-gradient(110deg, #ffffff 0%, #62f0ff 24%, #8dffbd 48%, #ff74bd 72%, #ffffff 100%) !important;
    background-size: 260% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text;
    -webkit-text-fill-color: transparent !important;
    animation: alienTitleGradient 5.5s ease-in-out infinite;
}

.hero-ufo {
    position: relative;
    flex: 0 0 clamp(94px, 14vw, 154px);
    width: clamp(94px, 14vw, 154px);
    height: clamp(70px, 10vw, 112px);
    animation: ufoFloat 4.2s ease-in-out infinite;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35));
}

.ufo-dome,
.ufo-body,
.ufo-beam {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
}

.ufo-dome {
    top: 10%;
    width: 42%;
    height: 32%;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px 999px 8px 8px;
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.95), transparent 16%),
        linear-gradient(135deg, rgba(98, 240, 255, 0.92), rgba(157, 124, 255, 0.62));
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.22), 0 0 24px rgba(78, 232, 255, 0.26);
}

.ufo-body {
    top: 35%;
    width: 88%;
    height: 34%;
    border: 1px solid rgba(153, 206, 255, 0.44);
    border-radius: 50%;
    background:
        radial-gradient(circle at 25% 50%, #58f5ad 0 5%, transparent 6%),
        radial-gradient(circle at 50% 58%, #ffd778 0 4%, transparent 5%),
        radial-gradient(circle at 75% 50%, #ff5fad 0 5%, transparent 6%),
        linear-gradient(180deg, #eaf9ff 0%, #6acfff 46%, #23476d 100%);
    box-shadow:
        inset 0 8px 18px rgba(255, 255, 255, 0.32),
        inset 0 -14px 18px rgba(0, 0, 0, 0.24),
        0 0 34px rgba(78, 232, 255, 0.30);
    animation: ufoRotate 6.5s ease-in-out infinite;
}

.ufo-beam {
    top: 62%;
    width: 54%;
    height: 48%;
    clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
    background: linear-gradient(180deg, rgba(88, 245, 173, 0.26), rgba(88, 245, 173, 0));
    opacity: 0.82;
    animation: ufoBeam 2.8s ease-in-out infinite;
}

@keyframes alienTitleGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes ufoFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes ufoRotate {

    0%,
    100% {
        transform: translateX(-50%) rotate(-3deg) scaleX(1);
    }

    50% {
        transform: translateX(-50%) rotate(4deg) scaleX(0.96);
    }
}

@keyframes ufoBeam {

    0%,
    100% {
        opacity: 0.36;
        transform: translateX(-50%) scaleY(0.88);
    }

    50% {
        opacity: 0.82;
        transform: translateX(-50%) scaleY(1.05);
    }
}

@media (max-width: 760px) {
    .hero-title-row {
        align-items: flex-start;
        gap: 12px;
    }

    .hero-logo {
        width: min(68vw, 460px);
        max-height: 120px;
    }

    .hero-ufo-img {
        flex-basis: 78px;
        width: 78px;
        max-height: 72px;
        margin-top: 4px;
    }

    .hero-ufo {
        flex-basis: 78px;
        width: 78px;
        height: 62px;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .hero-title-row {
        flex-direction: column;
        align-items: center;
    }

    .hero-ufo,
    .hero-ufo-img {
        margin: 10px 0 2px;
    }
}

/* Auth/profile menu fix: keep the login/register menu readable and inside the viewport. */
.profile-widget {
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 20000 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.profile-panel {
    position: fixed !important;
    top: 76px !important;
    right: 18px !important;
    left: auto !important;
    width: min(390px, calc(100vw - 36px)) !important;
    max-width: min(390px, calc(100vw - 36px)) !important;
    margin: 0 !important;
    padding: 18px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    overflow: visible !important;
    text-align: left !important;
    border-radius: 18px !important;
    transform-origin: top right !important;
}

.profile-panel.hidden {
    display: grid !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) scale(0.98) !important;
}

.profile-panel:not(.hidden) {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-title {
    color: var(--ui-text, #f4f8ff);
    font-size: 1.05rem;
    font-weight: 1000;
}

.auth-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(153, 206, 255, 0.22);
    border-radius: 10px;
    background: rgba(7, 12, 24, 0.72);
    color: var(--ui-text, #f4f8ff);
    font-size: 1.35rem;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
}

.auth-status {
    width: 100% !important;
    min-height: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

.auth-status.hidden {
    display: none !important;
}

.auth-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
}

.auth-tabs.hidden {
    display: none !important;
}

.auth-tab {
    width: 100%;
    min-height: 42px;
    text-align: center;
}

.auth-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

.auth-row.hidden {
    display: none !important;
}

.profile-panel input.hidden {
    display: none !important;
}

.profile-panel input {
    height: 46px !important;
    font-size: 0.95rem !important;
}

.auth-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
}

.auth-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
    justify-content: center !important;
}

.auth-actions .hidden {
    display: none !important;
}

@media (max-width: 520px) {
    .profile-panel {
        top: 64px !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        padding: 14px !important;
    }
}

.profile-overview.hidden {
    display: none !important;
}

.profile-overview {
    display: grid;
    gap: 12px;
}

.profile-screen-panel {
    width: min(760px, calc(100vw - 28px));
    overflow: auto;
}

.profile-screen-panel.command-open {
    width: min(1180px, calc(100vw - 28px));
}

.profile-identity {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(55, 247, 255, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(53, 255, 149, 0.48);
    color: var(--success);
    background: rgba(53, 255, 149, 0.10);
    font-weight: 1000;
    font-size: 1.2rem;
}

.profile-name {
    color: #fff;
    font-weight: 1000;
    overflow-wrap: anywhere;
}

.profile-email {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.profile-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-field-grid label {
    display: grid;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-field-grid input {
    height: 40px !important;
    color: #f8fdff !important;
    background: rgba(0, 0, 0, 0.22) !important;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-stat {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(141, 233, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
}

.profile-stat span,
.profile-current span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-stat strong,
.profile-current strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.profile-current {
    padding: 10px;
    border: 1px solid rgba(255, 209, 102, 0.24);
    border-radius: 10px;
    background: rgba(255, 209, 102, 0.07);
}

.profile-settings-card {
    padding: 14px;
    border: 1px solid rgba(55, 247, 255, 0.20);
    border-radius: 14px;
    background: rgba(4, 7, 18, 0.48);
}

.profile-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-action-card {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(72, 226, 255, 0.26);
    background: linear-gradient(145deg, rgba(31, 24, 94, 0.82), rgba(13, 91, 122, 0.54));
    color: #f7fdff;
    font-weight: 1000;
    text-align: left;
    cursor: pointer;
}

.profile-action-card span {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.profile-action-card strong {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.profile-options-note {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.login-reminder {
    position: fixed;
    inset: 0;
    z-index: 21000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(3, 5, 14, 0.52);
    backdrop-filter: blur(8px);
}

.login-reminder.hidden {
    display: none !important;
}

.login-reminder-panel {
    width: min(420px, 100%);
    padding: 20px;
    border-radius: 22px;
    border: 2px solid rgba(255, 221, 92, 0.66);
    background:
        radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.24), transparent 22%),
        linear-gradient(155deg, rgba(24, 19, 85, 0.98), rgba(130, 58, 20, 0.94), rgba(23, 112, 150, 0.92));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58), 0 0 30px rgba(255, 196, 42, 0.28);
    text-align: center;
}

.login-reminder-title {
    color: #fff7c7;
    font-size: 1.2rem;
    font-weight: 1000;
    text-shadow: 0 0 16px rgba(255, 221, 92, 0.38);
}

.login-reminder-text {
    margin: 10px 0 16px;
    color: #effbff;
    font-weight: 750;
    line-height: 1.4;
}

.login-reminder-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-edit-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.profile-edit-form.hidden {
    display: none !important;
}

button.main-stat-pill {
    cursor: pointer;
    font: inherit;
}

.pause-user-pill {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 18;
    min-width: 220px;
    justify-content: center;
}

.pause-user-pill:hover {
    transform: translateX(-50%) translateY(-2px) scale(1.03) !important;
}

.profile-screen-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.command-panel {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: 14px;
    padding: 14px;
    border: 2px solid rgba(255, 47, 143, 0.45);
    border-radius: 16px;
    background: rgba(8, 2, 22, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 24px rgba(255, 47, 143, 0.18);
    text-align: left;
}

.command-primary-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.command-primary-actions .btn {
    min-height: 54px !important;
    border-radius: 18px !important;
}

.command-action-undo {
    border-color: rgba(126, 247, 255, 0.82) !important;
    background: linear-gradient(145deg, rgba(15, 99, 132, 0.94), rgba(46, 184, 221, 0.72)) !important;
}

.command-action-reset {
    border-color: rgba(255, 75, 129, 0.86) !important;
    background: linear-gradient(145deg, rgba(116, 22, 54, 0.96), rgba(235, 43, 107, 0.74)) !important;
}

.command-action-restore {
    border-color: rgba(69, 255, 160, 0.82) !important;
    background: linear-gradient(145deg, rgba(17, 100, 64, 0.96), rgba(38, 202, 125, 0.72)) !important;
}

.command-panel.hidden {
    display: none !important;
}

.command-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.command-actions input,
.command-actions select,
.command-field input,
.command-field textarea,
.command-field select {
    min-width: 0;
    height: 42px;
    border-radius: 12px;
    width: 100%;
    border: 1px solid rgba(55, 247, 255, 0.28);
    background: rgba(4, 7, 18, 0.84);
    color: #fff;
    padding: 0 10px;
    font-weight: 800;
}

.command-field textarea {
    height: 82px;
    resize: vertical;
    padding: 9px 10px;
    font-family: "Consolas", monospace;
    font-size: 0.78rem;
}

.command-section {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
}

.command-section-title {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 1000;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.command-card {
    border: 1px solid rgba(55, 247, 255, 0.20);
    border-radius: 14px;
    padding: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(4, 7, 18, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.command-card.collapsed .command-card-body,
.command-card.collapsed> :not(.command-section-toggle) {
    display: none;
}

.command-section-toggle {
    width: 100%;
    justify-content: space-between !important;
    min-height: 42px !important;
    padding-inline: 14px !important;
    font-size: 0.85rem !important;
}

.command-card-body {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.command-field {
    display: grid;
    gap: 4px;
}

.command-field span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.command-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.command-pill {
    border: 1px solid rgba(55, 247, 255, 0.34);
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(55, 247, 255, 0.08);
    color: #dffcff;
    font-size: 0.72rem;
    font-weight: 1000;
    cursor: pointer;
}

.command-pill input {
    margin-right: 5px;
}

.command-pill:has(input:checked) {
    border-color: rgba(53, 255, 149, 0.78);
    color: #dcffef;
    background: rgba(53, 255, 149, 0.18);
    box-shadow: 0 0 14px rgba(53, 255, 149, 0.20);
}

.command-table-wrap {
    max-height: 300px;
    overflow: auto;
    border: 1px solid rgba(55, 247, 255, 0.18);
    border-radius: 12px;
}

.command-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.command-table th,
.command-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    white-space: nowrap;
}

.command-table th {
    position: sticky;
    top: 0;
    background: rgba(7, 12, 30, 0.95);
    color: var(--primary);
    z-index: 1;
}

.command-status {
    color: var(--text-muted);
    font-weight: 900;
    min-height: 20px;
    grid-column: 1 / -1;
    text-align: center;
}

.command-status.good {
    color: var(--success);
}

.command-live-toggle.active {
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.35);
    border-color: rgba(53, 255, 149, 0.72);
    color: var(--success);
}

@media (max-width: 720px) {

    .profile-field-grid,
    .profile-stat-grid,
    .profile-quick-actions,
    .command-actions {
        grid-template-columns: 1fr;
    }

    .command-panel,
    .command-grid,
    .command-primary-actions {
        grid-template-columns: 1fr;
    }
}

#main-menu {
    justify-content: center !important;
    overflow: hidden !important;
    padding: 96px clamp(18px, 4vw, 56px) 28px !important;
}

#main-menu .main-panel {
    width: min(89vw, 1780px) !important;
    height: calc(100vh - 144px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 144px) !important;
    margin: 0 auto !important;
    padding: clamp(26px, 4vh, 54px) clamp(40px, 5vw, 72px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
}

#main-menu .main-kicker {
    margin-bottom: clamp(8px, 1.5vh, 14px) !important;
}

#main-menu .hero-title-row {
    margin-bottom: clamp(4px, 1vh, 10px) !important;
}

#main-menu h1 {
    font-size: clamp(4rem, 6.8vw, 7rem) !important;
    line-height: 0.96 !important;
    margin: 0 !important;
}

#main-menu .subtitle {
    margin: clamp(8px, 1.4vh, 14px) 0 clamp(14px, 2vh, 24px) !important;
}

#main-menu .main-actions {
    width: 100% !important;
    margin: 0 auto !important;
    gap: clamp(8px, 1.4vh, 12px) !important;
}

#main-menu .main-actions .btn {
    min-height: clamp(46px, 6.7vh, 62px) !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

#main-menu .main-actions .btn:first-child {
    min-height: clamp(54px, 8vh, 70px) !important;
}

#main-menu .main-info-grid {
    width: 100% !important;
    margin-top: clamp(14px, 2.2vh, 28px) !important;
    gap: clamp(8px, 1.4vh, 14px) !important;
}

#main-menu .main-info-card {
    min-height: clamp(74px, 10vh, 104px) !important;
    padding: clamp(10px, 1.8vh, 16px) !important;
    border-radius: 14px !important;
}

#main-menu .main-info-icon {
    width: clamp(26px, 3.7vh, 34px) !important;
    height: clamp(26px, 3.7vh, 34px) !important;
    margin-bottom: clamp(6px, 1vh, 10px) !important;
}

#main-menu .main-info-label {
    margin-bottom: clamp(4px, 0.8vh, 8px) !important;
}

@media (max-height: 860px) and (min-width: 900px) {
    #main-menu {
        padding-top: 86px !important;
        padding-bottom: 22px !important;
    }

    #main-menu .main-panel {
        height: calc(100vh - 108px) !important;
        max-height: calc(100vh - 108px) !important;
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }

    #main-menu h1 {
        font-size: clamp(3.55rem, 6.2vw, 6.4rem) !important;
    }

    #main-menu .hero-ufo {
        width: clamp(108px, 13vw, 170px) !important;
        height: clamp(86px, 10vw, 132px) !important;
    }

    #main-menu .main-info-card strong {
        font-size: 0.9rem !important;
    }
}

/* Main menu visual upgrade */
#main-menu {
    isolation: isolate;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(55, 247, 255, 0.18), transparent 34%),
        radial-gradient(ellipse at 78% 18%, rgba(255, 47, 143, 0.16), transparent 32%),
        radial-gradient(ellipse at 52% 92%, rgba(53, 255, 149, 0.10), transparent 34%),
        linear-gradient(145deg, rgba(2, 3, 14, 0.96), rgba(5, 9, 28, 0.94) 52%, rgba(2, 2, 10, 0.98)) !important;
}

#main-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 0;
    border-radius: 0;
    opacity: 0.64;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(160, 226, 255, 0.48) 0 0.8px, transparent 1.4px),
        radial-gradient(circle, rgba(255, 255, 255, 0.32) 0 0.65px, transparent 1.2px),
        radial-gradient(circle, rgba(55, 247, 255, 0.22) 0 0.75px, transparent 1.3px);
    background-size: 96px 96px, 148px 148px, 64px 64px, 220px 220px;
    background-position: 0 0, 42px 26px, 18px 40px, 96px 72px;
    animation: calmStarField 74s linear infinite, calmStarTwinkle 8s ease-in-out infinite;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.42);
}

#main-menu::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 18%, rgba(55, 247, 255, 0.10), transparent 32%),
        radial-gradient(circle at 78% 28%, rgba(255, 47, 143, 0.08), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(142, 108, 255, 0.10), transparent 38%);
    background-size: 100% 100%;
    mix-blend-mode: screen;
    opacity: 0.36;
    animation: softSpaceGlow 14s ease-in-out infinite alternate;
}

#main-menu .main-panel {
    border: 1px solid rgba(153, 206, 255, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.036) 42%, rgba(255, 255, 255, 0.018)),
        radial-gradient(ellipse at 16% 0%, rgba(78, 232, 255, 0.20), transparent 38%),
        radial-gradient(ellipse at 88% 12%, rgba(255, 95, 173, 0.15), transparent 36%),
        radial-gradient(ellipse at 55% 115%, rgba(88, 245, 173, 0.13), transparent 42%),
        rgba(9, 14, 31, 0.82) !important;
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow:
        0 30px 110px rgba(0, 0, 0, 0.62),
        0 0 44px rgba(78, 232, 255, 0.14),
        0 0 72px rgba(255, 95, 173, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 0 54px rgba(78, 232, 255, 0.07) !important;
    animation: none !important;
}

#main-menu .main-panel::before {
    background:
        linear-gradient(90deg, transparent 0%, rgba(78, 232, 255, 0.72) 20%, rgba(255, 95, 173, 0.56) 48%, rgba(88, 245, 173, 0.56) 72%, transparent 100%) top left / 220% 2px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%) !important;
    animation: none !important;
}

#main-menu .main-panel::after {
    background:
        radial-gradient(circle, rgba(255, 95, 173, 0.22), transparent 64%),
        radial-gradient(circle at 25% 75%, rgba(78, 232, 255, 0.12), transparent 54%) !important;
    animation: none !important;
}

#main-menu .main-kicker {
    border-color: rgba(88, 245, 173, 0.62) !important;
    box-shadow: 0 0 22px rgba(88, 245, 173, 0.20), inset 0 0 20px rgba(88, 245, 173, 0.08) !important;
    animation: none !important;
}

#main-menu h1 {
    background: linear-gradient(100deg, #ffffff 0%, #7df7ff 28%, #58f5ad 52%, #ffd778 68%, #ff5fad 86%, #ffffff 100%) !important;
    background-size: 220% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text;
    -webkit-text-fill-color: transparent !important;
    filter:
        drop-shadow(0 0 18px rgba(78, 232, 255, 0.34)) drop-shadow(0 0 32px rgba(255, 95, 173, 0.20)) drop-shadow(0 18px 34px rgba(0, 0, 0, 0.46)) !important;
    animation: none !important;
}

#main-menu .subtitle {
    text-shadow: 0 0 18px rgba(153, 206, 255, 0.28);
}

#main-menu .hero-ufo {
    filter: drop-shadow(0 0 24px rgba(78, 232, 255, 0.34)) drop-shadow(0 0 34px rgba(255, 95, 173, 0.16));
}

#main-menu .main-actions .btn,
#main-menu .main-info-card,
#main-menu .main-stat-pill,
.menu-nav-btn,
#main-menu .main-fullscreen-btn,
#main-menu .main-settings-btn,
.profile-button {
    backdrop-filter: blur(14px) saturate(145%);
}

#main-menu .main-actions .btn {
    border-color: rgba(153, 206, 255, 0.36) !important;
    background:
        linear-gradient(135deg, rgba(78, 232, 255, 0.15), rgba(157, 124, 255, 0.12), rgba(255, 95, 173, 0.10)),
        rgba(18, 28, 48, 0.82) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.025),
        0 12px 34px rgba(0, 0, 0, 0.28) !important;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

#main-menu .main-actions .btn:first-child {
    background:
        linear-gradient(100deg, #37f7ff 0%, #35ff95 48%, #ffd166 100%) !important;
    box-shadow:
        0 0 32px rgba(78, 232, 255, 0.28),
        0 0 40px rgba(88, 245, 173, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
    animation: none !important;
}

#main-menu .main-actions .btn:hover,
#main-menu .main-info-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
    border-color: rgba(78, 232, 255, 0.76) !important;
    box-shadow:
        0 0 26px rgba(78, 232, 255, 0.24),
        0 0 34px rgba(255, 95, 173, 0.13),
        0 18px 42px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

#main-menu .main-info-card {
    border-color: color-mix(in srgb, var(--info-color, var(--premium-cyan)) 34%, rgba(153, 206, 255, 0.18)) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.028)),
        radial-gradient(circle at 92% 115%, var(--info-glow, rgba(78, 232, 255, 0.16)), transparent 48%),
        rgba(15, 24, 45, 0.76) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 12px 34px rgba(0, 0, 0, 0.24),
        0 0 20px color-mix(in srgb, var(--info-color, var(--premium-cyan)) 18%, transparent) !important;
    animation: none !important;
}

#main-menu .main-info-card:nth-child(2) {
    animation-delay: -1.2s;
}

#main-menu .main-info-card:nth-child(3) {
    animation-delay: -2.4s;
}

#main-menu .main-info-card:nth-child(4) {
    animation-delay: -3.6s;
}

#main-menu .main-info-icon {
    box-shadow: 0 0 18px color-mix(in srgb, var(--info-color, var(--premium-cyan)) 34%, transparent);
}

#main-menu .main-stat-pill {
    box-shadow:
        0 0 22px rgba(255, 215, 120, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
}

#main-menu .main-stat-pill.highscore {
    box-shadow:
        0 0 24px rgba(78, 232, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
}

#main-menu .main-stat-pill.user-pill {
    box-shadow:
        0 0 24px rgba(88, 245, 173, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
}

@keyframes galaxyStarsDrift {
    from {
        background-position: 0 0, 20px 30px, 80px 10px, 140px 90px, 0 0;
    }

    to {
        background-position: 130px 260px, -170px 220px, 280px -170px, -240px -120px, 0 0;
    }
}

@keyframes calmStarField {
    from {
        background-position: 0 0, 42px 26px, 18px 40px, 96px 72px;
    }

    to {
        background-position: -96px 160px, -106px 238px, -46px 104px, -124px 300px;
    }
}

@keyframes calmStarTwinkle {

    0%,
    100% {
        opacity: 0.52;
        filter: brightness(0.88);
    }

    50% {
        opacity: 0.72;
        filter: brightness(1.08);
    }
}

@keyframes softSpaceGlow {
    from {
        opacity: 0.22;
        transform: scale(1);
    }

    to {
        opacity: 0.38;
        transform: scale(1.04);
    }
}

@keyframes galaxyBreath {

    0%,
    100% {
        opacity: 0.58;
        filter: saturate(1);
    }

    50% {
        opacity: 0.82;
        filter: saturate(1.18);
    }
}

@keyframes galaxyVeilSweep {
    from {
        background-position: 0% 0, 0 0;
    }

    to {
        background-position: 100% 0, 0 18px;
    }
}

@keyframes menuPanelGlow {

    0%,
    100% {
        box-shadow:
            0 30px 110px rgba(0, 0, 0, 0.62),
            0 0 44px rgba(78, 232, 255, 0.14),
            0 0 72px rgba(255, 95, 173, 0.09),
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            inset 0 0 54px rgba(78, 232, 255, 0.07);
    }

    50% {
        box-shadow:
            0 34px 120px rgba(0, 0, 0, 0.68),
            0 0 62px rgba(78, 232, 255, 0.22),
            0 0 86px rgba(255, 95, 173, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            inset 0 0 68px rgba(88, 245, 173, 0.07);
    }
}

@keyframes neonBorderSweep {
    from {
        background-position: 220% 0, 0 0;
    }

    to {
        background-position: -220% 0, 0 0;
    }
}

@keyframes panelAuroraDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.75;
    }

    to {
        transform: translate3d(-28px, 22px, 0) scale(1.08);
        opacity: 0.95;
    }
}

@keyframes titleNeonBreath {

    0%,
    100% {
        filter:
            drop-shadow(0 0 18px rgba(78, 232, 255, 0.34)) drop-shadow(0 0 32px rgba(255, 95, 173, 0.20)) drop-shadow(0 18px 34px rgba(0, 0, 0, 0.46));
    }

    50% {
        filter:
            drop-shadow(0 0 25px rgba(78, 232, 255, 0.48)) drop-shadow(0 0 42px rgba(255, 95, 173, 0.28)) drop-shadow(0 20px 38px rgba(0, 0, 0, 0.50));
    }
}

@keyframes neonPulseGreen {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(88, 245, 173, 0.18), inset 0 0 18px rgba(88, 245, 173, 0.07);
    }

    50% {
        box-shadow: 0 0 30px rgba(88, 245, 173, 0.30), inset 0 0 24px rgba(88, 245, 173, 0.12);
    }
}

@keyframes primaryButtonGlow {

    0%,
    100% {
        filter: saturate(1);
    }

    50% {
        filter: saturate(1.18) brightness(1.04);
    }
}

@keyframes infoCardFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Game-style star background for the main menu */
#main-menu {
    background:
        radial-gradient(circle at 72% 14%, rgba(55, 247, 255, 0.10), transparent 28%),
        radial-gradient(circle at 44% 78%, rgba(142, 108, 255, 0.12), transparent 34%),
        linear-gradient(180deg, #071024 0%, #080c23 48%, #030615 100%) !important;
}

#main-menu::before {
    opacity: 1 !important;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.35px, transparent 1.7px),
        radial-gradient(circle, rgba(255, 255, 255, 0.70) 0 1px, transparent 1.45px),
        radial-gradient(circle, rgba(180, 213, 255, 0.46) 0 0.9px, transparent 1.35px),
        radial-gradient(circle, rgba(255, 255, 255, 0.34) 0 0.65px, transparent 1.15px) !important;
    background-size: 136px 136px, 214px 214px, 92px 92px, 320px 320px !important;
    background-position: 18px 24px, 92px 58px, 44px 12px, 128px 104px !important;
    animation: gameStarDrift 62s linear infinite, gameStarPulse 7s ease-in-out infinite !important;
    box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.34) !important;
    z-index: 0;
}

#main-menu::after {
    opacity: 0.24 !important;
    background:
        radial-gradient(circle at 70% 16%, rgba(55, 247, 255, 0.18), transparent 32%),
        radial-gradient(circle at 48% 92%, rgba(142, 108, 255, 0.16), transparent 38%) !important;
    animation: gameSpaceBreath 12s ease-in-out infinite alternate !important;
    z-index: 0;
}

#main-menu .main-panel,
#main-menu .main-stats,
#main-menu .main-fullscreen-btn,
#main-menu .main-settings-btn {
    position: relative;
    z-index: 2 !important;
}

@keyframes gameStarDrift {
    from {
        background-position: 18px 24px, 92px 58px, 44px 12px, 128px 104px;
    }

    to {
        background-position: 18px 160px, 92px 272px, 44px 104px, 128px 424px;
    }
}

@keyframes gameStarPulse {

    0%,
    100% {
        filter: brightness(0.82);
    }

    50% {
        filter: brightness(1.22);
    }
}

@keyframes gameSpaceBreath {
    from {
        opacity: 0.16;
    }

    to {
        opacity: 0.30;
    }
}

/* Hard override: visible black star field on the startup main menu. */
#main-menu.screen {
    background:
        radial-gradient(ellipse at 18% 18%, rgba(55, 247, 255, 0.18), transparent 34%),
        radial-gradient(ellipse at 82% 26%, rgba(255, 47, 143, 0.16), transparent 32%),
        radial-gradient(ellipse at 52% 92%, rgba(142, 108, 255, 0.20), transparent 40%),
        linear-gradient(180deg, #02040d 0%, #05081c 48%, #01030b 100%) !important;
}

#main-menu.screen::before,
#main-menu.screen::after {
    display: none !important;
}

.main-starfield {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    z-index: 0 !important;
    overflow: hidden !important;
    background-image:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0.82) 1px, transparent 1.45px),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.46) 0, rgba(255, 255, 255, 0.46) 0.75px, transparent 1.1px),
        radial-gradient(circle at center, rgba(120, 210, 255, 0.28) 0, rgba(120, 210, 255, 0.28) 0.85px, transparent 1.15px) !important;
    background-size: 132px 132px, 82px 82px, 220px 220px !important;
    background-position: 24px 32px, 12px 8px, 96px 70px !important;
    animation: simpleMenuStars 120s linear infinite !important;
    will-change: background-position;
}

#main-menu.screen>* {
    position: relative;
    z-index: 2;
}

#main-menu.screen>.main-starfield {
    position: absolute !important;
    z-index: 0 !important;
}

@keyframes simpleMenuStars {
    from {
        background-position: 24px 32px, 12px 8px, 96px 70px;
    }

    to {
        background-position: 24px 296px, 12px 172px, 96px 510px;
    }
}

.main-starfield {
    display: none !important;
}

.screen {
    background:
        radial-gradient(circle at 72% 16%, rgba(55, 247, 255, 0.12), transparent 30%),
        radial-gradient(circle at 18% 84%, rgba(142, 108, 255, 0.10), transparent 34%),
        linear-gradient(180deg, #02040d 0%, #060a1f 50%, #02030b 100%) !important;
}

.screen-random-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    display: none !important;
}

.screen-random-stars .star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 2px;
    background: rgba(255, 255, 255, var(--o));
    box-shadow: 0 0 4px rgba(255, 255, 255, calc(var(--o) * 0.58));
    animation: randomStarFall var(--d) linear infinite;
    animation-delay: var(--delay);
    transform: translateY(-12vh);
}

.screen-random-stars .star.near {
    box-shadow: 0 0 7px rgba(255, 255, 255, 0.42);
}

.screen> :not(.screen-random-stars) {
    position: relative;
    z-index: 2;
}

#main-menu.screen>.screen-random-stars {
    position: absolute !important;
    z-index: 1 !important;
    display: block !important;
    opacity: 1 !important;
    background: transparent !important;
}

#main-menu.screen>.lobby-ufo-layer {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.lobby-ufo-flyby {
    position: absolute;
    left: var(--fly-start-x, -190px);
    top: 18%;
    width: var(--fly-size, clamp(72px, 9vw, 132px));
    height: auto;
    opacity: 0;
    filter: drop-shadow(0 0 14px rgba(35, 224, 255, 0.72)) drop-shadow(0 0 24px rgba(206, 61, 255, 0.36));
    transform: translate3d(0, 0, 0) rotate(var(--fly-tilt, 8deg)) scale(0.82);
    animation: lobbyUfoFlyby var(--fly-duration, 7s) linear forwards;
    will-change: transform, opacity;
}

.lobby-ufo-flyby::after {
    content: "";
    position: absolute;
    right: var(--trail-right, 72%);
    left: var(--trail-left, auto);
    top: 45%;
    width: clamp(110px, 18vw, 260px);
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(210, 61, 255, 0), rgba(210, 61, 255, 0.66), rgba(35, 224, 255, 0.86));
    filter: blur(5px);
    transform: translateY(-50%) scaleX(var(--trail-flip, 1));
    opacity: 0.9;
}

.lobby-ufo-flyby img {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
}

#main-menu.hidden .lobby-ufo-layer {
    display: none !important;
}

@keyframes lobbyUfoFlyby {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(var(--fly-tilt, 8deg)) scale(0.78);
    }

    9% {
        opacity: 0.95;
    }

    34% {
        transform: translate3d(calc(var(--fly-distance) * 0.34), var(--fly-arc-up, -70px), 0) rotate(calc(var(--fly-tilt, 8deg) * -0.35)) scale(0.92);
    }

    68% {
        transform: translate3d(calc(var(--fly-distance) * 0.68), var(--fly-arc-down, 46px), 0) rotate(calc(var(--fly-tilt, 8deg) * 0.55)) scale(1);
    }

    88% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--fly-distance), var(--fly-end-y, 28px), 0) rotate(var(--fly-tilt, 8deg)) scale(0.9);
    }
}

#main-menu.screen> :not(.screen-random-stars):not(.main-starfield):not(.lobby-ufo-layer) {
    position: relative;
    z-index: 2 !important;
}

@keyframes randomStarFall {
    from {
        transform: translateY(-16vh);
    }

    to {
        transform: translateY(116vh);
    }
}

/* Keep the main menu top status controls outside the main panel. */
#main-menu.screen {
    padding-top: 102px !important;
    padding-bottom: 26px !important;
}

#main-menu .main-stats {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 500 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
    width: min(660px, calc(100vw - 270px)) !important;
    gap: 10px !important;
    margin: 0 !important;
    pointer-events: none !important;
}

#main-menu .main-stat-pill {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding: 8px 14px !important;
}

#main-menu .main-settings-btn {
    position: fixed !important;
    top: 20px !important;
    right: 122px !important;
    z-index: 520 !important;
}

#main-menu .main-fullscreen-btn {
    position: fixed !important;
    top: 20px !important;
    right: 70px !important;
    z-index: 520 !important;
}

.profile-widget {
    top: 20px !important;
    right: 18px !important;
    z-index: 530 !important;
}

#main-menu .main-panel {
    height: calc(100vh - 138px) !important;
    max-height: calc(100vh - 138px) !important;
    margin-top: 0 !important;
}

@media (max-width: 760px) {
    #main-menu.screen {
        padding-top: 126px !important;
    }

    #main-menu .main-stats {
        top: 68px !important;
        width: calc(100vw - 20px) !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    #main-menu .main-stat-pill {
        min-height: 38px !important;
        padding: 6px 7px !important;
        font-size: 0.72rem !important;
    }
}

@media (max-width: 900px) {
    .play-mode-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Performance pass: keep the neon look, but avoid expensive full-screen filters and DOM animations. */
.screen,
.panel,
.profile-panel,
.pause-card,
#boss-ui,
#hud,
#cooldown-hud {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.screen::before,
.screen::after,
body::before,
body::after,
.screen-random-stars,
.main-starfield {
    animation: none !important;
    filter: none !important;
}

.panel,
.btn,
.main-info-card,
.main-stat-pill,
.upgrade-card,
.pause-card {
    transition-property: transform, border-color, color, background !important;
}

/* Purple alien UI polish: rounded Jarno-inspired colors without image layout. */
:root {
    --alien-purple: #8d35ff;
    --alien-pink: #ff4fe3;
    --alien-cyan: #1bd7ff;
    --alien-green: #55ff9a;
    --alien-white: #f8fbff;
    --alien-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.06) 42%, rgba(12, 6, 46, 0.18) 100%);
    --alien-shell: linear-gradient(145deg, rgba(25, 19, 96, 0.92), rgba(95, 24, 188, 0.82) 48%, rgba(18, 129, 214, 0.62));
    --alien-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 20px rgba(27, 215, 255, 0.30), inset 0 2px 0 rgba(255, 255, 255, 0.24), inset 0 -8px 18px rgba(0, 0, 0, 0.20);
}

body,
html {
    background:
        radial-gradient(circle at 12% 18%, rgba(141, 53, 255, 0.34), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(27, 215, 255, 0.24), transparent 26%),
        radial-gradient(circle at 48% 82%, rgba(255, 79, 227, 0.18), transparent 36%),
        linear-gradient(150deg, #030313 0%, #080729 48%, #030313 100%) !important;
}

.screen {
    background:
        radial-gradient(circle at 18% 18%, rgba(141, 53, 255, 0.36), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(27, 215, 255, 0.26), transparent 28%),
        radial-gradient(circle at 52% 86%, rgba(255, 79, 227, 0.18), transparent 38%),
        linear-gradient(155deg, rgba(4, 4, 22, 0.78), rgba(11, 8, 44, 0.96)) !important;
}

.panel,
.profile-panel,
.daily-quest-drawer-inner,
.pause-card {
    border: 2px solid rgba(89, 226, 255, 0.44) !important;
    border-radius: 28px !important;
    background:
        var(--alien-gloss),
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.18), transparent 26%),
        var(--alien-shell) !important;
    box-shadow: var(--alien-shadow) !important;
}

.btn,
.shop-tab,
.scroll-btn,
.auth-tab,
.quest-claim,
.menu-nav-btn,
.profile-button {
    border: 2px solid rgba(111, 232, 255, 0.58) !important;
    border-radius: 999px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 40%, rgba(27, 10, 78, 0.18) 100%),
        linear-gradient(135deg, #243dce 0%, #7d35ff 52%, #d943ff 100%) !important;
    color: var(--alien-white) !important;
    text-shadow: 0 2px 0 rgba(22, 8, 66, 0.42), 0 0 10px rgba(27, 215, 255, 0.35) !important;
    box-shadow: var(--alien-shadow) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.btn-secondary,
.auth-tab {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06) 42%, rgba(0, 0, 0, 0.16)),
        linear-gradient(135deg, #153c9f, #5921bb 58%, #166fc9) !important;
}

.btn:hover,
.shop-tab:hover,
.scroll-btn:hover,
.auth-tab:hover,
.quest-claim:hover,
.menu-nav-btn:hover,
.profile-button:hover {
    transform: translateY(-3px) scale(1.035) !important;
    border-color: rgba(255, 255, 255, 0.92) !important;
    filter: brightness(1.10) saturate(1.18);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48), 0 0 24px rgba(27, 215, 255, 0.58), 0 0 34px rgba(255, 79, 227, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.28) !important;
}

#main-menu.screen {
    background:
        radial-gradient(circle at 16% 20%, rgba(190, 62, 255, 0.46), transparent 24%),
        radial-gradient(circle at 78% 18%, rgba(24, 210, 255, 0.34), transparent 28%),
        radial-gradient(circle at 54% 84%, rgba(91, 28, 220, 0.38), transparent 38%),
        linear-gradient(150deg, #030414 0%, #12063f 48%, #04132f 100%) !important;
}

#main-menu .main-panel {
    border-color: rgba(99, 230, 255, 0.62) !important;
    border-radius: 34px !important;
    background:
        radial-gradient(circle at 24% 10%, rgba(255, 255, 255, 0.22), transparent 16%),
        radial-gradient(circle at 72% 8%, rgba(47, 232, 255, 0.22), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 42%),
        linear-gradient(145deg, rgba(83, 20, 185, 0.96), rgba(151, 42, 226, 0.84) 52%, rgba(10, 140, 213, 0.70)) !important;
    box-shadow:
        0 24px 52px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(35, 219, 255, 0.42),
        0 0 46px rgba(185, 62, 255, 0.28),
        inset 0 3px 0 rgba(255, 255, 255, 0.24),
        inset 0 -16px 28px rgba(23, 6, 79, 0.28) !important;
}

#main-menu .main-kicker {
    border-color: rgba(39, 239, 255, 0.58) !important;
    color: #eaffff !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.05) 48%),
        linear-gradient(135deg, rgba(102, 35, 210, 0.78), rgba(10, 143, 205, 0.54)) !important;
    box-shadow: 0 0 18px rgba(39, 239, 255, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.22) !important;
}

#main-menu .btn {
    border-color: rgba(111, 235, 255, 0.76) !important;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.42), transparent 13%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 44%),
        linear-gradient(135deg, #641ee2 0%, #a735ff 48%, #18c9ff 100%) !important;
}

#main-menu .btn-secondary {
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.34), transparent 13%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 44%),
        linear-gradient(135deg, #2a50e7 0%, #7b2eea 52%, #10aee8 100%) !important;
}

.main-stat-pill,
.balance-chip {
    border: 2px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 999px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04) 44%),
        rgba(28, 18, 86, 0.74) !important;
    color: #fff3b0 !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32), 0 0 16px rgba(27, 215, 255, 0.20), inset 0 2px 0 rgba(255, 255, 255, 0.18) !important;
}

.main-stat-pill.user-pill {
    color: #d9fbff !important;
}

.main-stat-pill.highscore,
.balance-chip {
    color: #ffe482 !important;
    border-color: rgba(255, 212, 71, 0.40) !important;
}

.main-info-card,
.difficulty-card,
.shop-card-new,
.upgrade-card,
.profile-stat,
.profile-current,
.setting-row,
.pause-perk-row {
    border: 2px solid rgba(89, 226, 255, 0.34) !important;
    border-radius: 24px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 42%),
        linear-gradient(145deg, rgba(27, 23, 105, 0.78), rgba(95, 30, 176, 0.72)) !important;
    color: #f8fbff !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34), 0 0 14px rgba(27, 215, 255, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.16) !important;
}

body.free-roam-hud #quest-side-panel {
    left: 26px !important;
    top: 210px !important;
    right: auto !important;
    width: min(220px, calc(100vw - 60px)) !important;
    max-width: min(220px, calc(100vw - 60px)) !important;
}

body.free-roam-radio-open #quest-side-panel {
    top: 210px !important;
}

.quest-side-inner {
    border-radius: 22px !important;
    border: 2px solid rgba(72, 226, 255, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(13, 18, 54, 0.58) !important;
    box-shadow: 0 0 22px rgba(37, 226, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

#quest-side-panel .quest-side-inner {
    height: min(54vh, 382px) !important;
    max-height: min(54vh, 382px) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    padding: 8px !important;
}

#quest-side-panel .quest-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    align-items: center !important;
    padding: 7px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(94, 234, 255, 0.24) !important;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.16), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(5, 9, 28, 0.38) !important;
    box-shadow: 0 0 14px rgba(37, 226, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

#quest-side-panel .quest-reward-badge {
    justify-self: start;
    min-width: 0;
}

#quest-side-panel .quest-desc {
    font-size: 0.72rem !important;
    line-height: 1.16 !important;
}

#quest-side-panel .quest-progress {
    height: 5px !important;
    margin-top: 5px !important;
}

#quest-side-panel .quest-row.quest-done {
    border-color: rgba(53, 255, 149, 0.44) !important;
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.16), inset 0 0 18px rgba(53, 255, 149, 0.06) !important;
}

#quest-side-panel .quest-name-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

#quest-side-panel .quest-done-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(94, 234, 255, 0.34);
    color: rgba(223, 250, 255, 0.44);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.74rem;
    font-weight: 1000;
}

#quest-side-panel .quest-row.quest-done .quest-done-mark {
    color: #072414;
    border-color: rgba(53, 255, 149, 0.72);
    background: radial-gradient(circle at 35% 25%, #ffffff, #35ff95 48%, #12a765);
    box-shadow: 0 0 14px rgba(53, 255, 149, 0.42);
}

#quest-side-panel .quest-reward-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 84px;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 221, 92, 0.46);
    background: rgba(255, 221, 92, 0.10);
    color: #fff2b8;
    font-size: 0.68rem;
    font-weight: 1000;
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(255, 221, 92, 0.14);
}

/* Specifieke styling voor het 2FA invoerveld */
#auth-2fa-code {
    text-align: center;
    letter-spacing: 8px;
    font-size: 1.4rem;
    font-family: "Consolas", monospace;
    border-color: var(--warning);
    /* Geeft een visueel onderscheid met normale velden */
}

#auth-2fa-status {
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.profile-2fa-state {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(55, 247, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    line-height: 1.5;
}

.profile-2fa-state.good {
    color: var(--success);
    border-color: rgba(53, 255, 149, 0.26);
    background: rgba(53, 255, 149, 0.07);
}

.profile-2fa-state.bad {
    color: var(--secondary);
    border-color: rgba(255, 47, 143, 0.26);
    background: rgba(255, 47, 143, 0.07);
}

.twofa-screen-panel {
    width: min(920px, calc(100vw - 28px));
    max-height: min(860px, calc(100vh - 36px));
    overflow: auto;
}

.twofa-flow {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    text-align: left;
}

.twofa-step-card {
    padding: 16px;
    border: 1px solid rgba(141, 233, 255, 0.18);
    border-radius: 18px;
    background: rgba(4, 7, 18, 0.48);
}

.twofa-step-card.hidden {
    display: none !important;
}

.twofa-step-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    text-transform: uppercase;
}

.twofa-step-copy {
    margin: 0 0 12px;
    color: var(--text-muted);
}

.twofa-qr-wrap {
    display: grid;
    place-items: center;
    gap: 10px;
    margin: 6px auto 0;
}

.twofa-qr-wrap img {
    width: min(240px, 70vw);
    height: auto;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 0 26px rgba(55, 247, 255, 0.18);
}

.twofa-secret-line {
    width: 100%;
    font-family: "Consolas", monospace;
    word-break: break-all;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.twofa-backup-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.twofa-backup-code {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(55, 247, 255, 0.16);
    font-family: "Consolas", monospace;
    text-align: center;
    overflow-wrap: anywhere;
}

.twofa-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
}

.twofa-actions-row .btn {
    margin: 0;
}

.twofa-enabled-panel {
    display: grid;
    gap: 12px;
}

.twofa-enabled-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.twofa-enabled-stat {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(55, 247, 255, 0.16);
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
}

.twofa-enabled-stat span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.twofa-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    background: rgba(1, 4, 12, 0.72);
    backdrop-filter: blur(10px) saturate(135%);
    padding: 18px;
}

.twofa-modal.hidden {
    display: none !important;
}

.twofa-modal-card {
    width: min(520px, calc(100vw - 24px));
    border: 1px solid rgba(55, 247, 255, 0.28);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)),
        rgba(8, 12, 31, 0.96);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.60), 0 0 40px rgba(55, 247, 255, 0.12);
    padding: 22px;
}

.twofa-modal-card h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.twofa-modal-card p {
    margin-top: 0;
}

.twofa-modal-card input {
    width: 100%;
    height: 48px;
    font-size: 1.4rem;
    text-align: center;
    letter-spacing: 0.35em;
    font-family: "Consolas", monospace;
}

.twofa-modal-status {
    min-height: 22px;
    margin-top: 10px;
    color: var(--text-muted);
    text-align: center;
}

.twofa-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.twofa-modal-actions .btn {
    min-width: 180px;
}

#quest-side-panel .quest-reward-badge.score {
    border-color: rgba(53, 255, 149, 0.46);
    background: rgba(53, 255, 149, 0.10);
    color: #caffdd;
    box-shadow: 0 0 14px rgba(53, 255, 149, 0.14);
}

body.free-roam-hud #wave-display {
    pointer-events: auto !important;
    cursor: pointer;
    color: #ffded4 !important;
    border-color: rgba(255, 92, 69, 0.72) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
        linear-gradient(135deg, rgba(72, 14, 36, 0.92), rgba(170, 39, 76, 0.62)) !important;
    box-shadow: 0 0 24px rgba(255, 58, 76, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

body.free-roam-hud #wave-display:hover {
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 0 30px rgba(255, 58, 76, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

.controls-help-panel {
    position: relative;
    z-index: 1;
    display: none;
    width: 100%;
    margin: 14px 0;
    padding: 14px;
    border: 2px solid rgba(72, 226, 255, 0.34);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(13, 18, 54, 0.52);
    box-shadow: 0 0 22px rgba(37, 226, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    text-align: left;
}

.controls-help-panel.open {
    display: grid;
    gap: 8px;
}

.control-help-row {
    display: grid;
    grid-template-columns: minmax(76px, auto) 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.control-key {
    display: inline-flex;
    justify-content: center;
    min-width: 54px;
    padding: 5px 8px;
    border-radius: 10px;
    border: 1px solid rgba(126, 244, 255, 0.38);
    background: rgba(5, 10, 28, 0.52);
    color: #7ef4ff;
    font-weight: 1000;
    font-family: Consolas, monospace;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.control-desc {
    color: rgba(244, 251, 255, 0.92);
    font-weight: 800;
    line-height: 1.25;
}

.main-info-icon {
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.52), transparent 22%),
        linear-gradient(145deg, #c33cff 0%, #7b2cff 48%, #1be2ff 100%) !important;
    box-shadow: 0 0 16px rgba(37, 226, 255, 0.44), inset 0 2px 0 rgba(255, 255, 255, 0.26) !important;
}

/* Glossy purple blob buttons, inspired by the Spelen sign artwork. */
.btn,
.shop-tab,
.scroll-btn,
.auth-tab,
.quest-claim,
.menu-nav-btn,
.profile-button {
    isolation: isolate !important;
    overflow: hidden !important;
    border: 3px solid rgba(40, 224, 255, 0.88) !important;
    border-radius: 999px !important;
    background:
        linear-gradient(115deg, transparent 0 18%, rgba(255, 118, 255, 0.20) 18% 22%, transparent 22% 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.06) 32%, rgba(12, 5, 56, 0.34) 100%),
        repeating-linear-gradient(0deg, rgba(255, 119, 255, 0.055) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.08) 32%, rgba(12, 5, 56, 0.34) 100%),
        linear-gradient(135deg, #4f18d6 0%, #a923ff 46%, #e94dff 72%, #1778ff 100%) !important;
    color: #fff7ff !important;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif !important;
    font-weight: 1000 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    text-shadow:
        0 3px 0 rgba(25, 7, 78, 0.82),
        0 -1px 0 rgba(255, 255, 255, 0.32),
        0 0 12px rgba(255, 83, 238, 0.44),
        0 0 20px rgba(31, 222, 255, 0.24) !important;
    box-shadow:
        0 0 0 2px rgba(30, 32, 128, 0.84),
        0 0 22px rgba(31, 222, 255, 0.72),
        0 0 40px rgba(167, 35, 255, 0.36),
        0 16px 28px rgba(0, 0, 0, 0.44),
        inset 0 4px 0 rgba(255, 255, 255, 0.34),
        inset 0 -14px 24px rgba(30, 7, 92, 0.48) !important;
}

.btn::before,
.shop-tab::before,
.scroll-btn::before,
.auth-tab::before,
.quest-claim::before,
.profile-button::before {
    content: "" !important;
    position: absolute !important;
    inset: 8px 12px auto 12px !important;
    height: 38% !important;
    border-radius: inherit !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.05)) !important;
    transform: none !important;
    opacity: 0.82 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.btn::after,
.shop-tab::after,
.scroll-btn::after,
.auth-tab::after,
.quest-claim::after,
.profile-button::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    background:
        linear-gradient(110deg, transparent 0 16%, rgba(255, 113, 255, 0.14) 16% 18%, transparent 18% 100%),
        linear-gradient(70deg, transparent 0 62%, rgba(38, 222, 255, 0.15) 62% 64%, transparent 64% 100%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 7px) !important;
    mix-blend-mode: screen;
    opacity: 0.66;
    pointer-events: none !important;
    z-index: -1 !important;
}

.btn:hover,
.shop-tab:hover,
.scroll-btn:hover,
.auth-tab:hover,
.quest-claim:hover,
.profile-button:hover {
    transform: translateY(-4px) scale(1.035) !important;
    border-color: #f4fdff !important;
    filter: brightness(1.12) saturate(1.18);
    box-shadow:
        0 0 0 2px rgba(36, 24, 154, 0.92),
        0 0 30px rgba(31, 222, 255, 0.92),
        0 0 54px rgba(233, 77, 255, 0.46),
        0 19px 34px rgba(0, 0, 0, 0.48),
        inset 0 4px 0 rgba(255, 255, 255, 0.42),
        inset 0 -14px 24px rgba(30, 7, 92, 0.50) !important;
}

#main-menu .main-actions .btn:first-child {
    font-size: clamp(1.2rem, 2.8vw, 1.9rem) !important;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif !important;
    color: #b9f8ff !important;
    letter-spacing: 0.03em !important;
    text-shadow:
        0 2px 0 rgba(28, 6, 93, 0.78),
        0 0 12px rgba(126, 231, 255, 0.80),
        0 0 24px rgba(37, 226, 255, 0.45) !important;
    border-width: 4px !important;
    background:
        linear-gradient(115deg, transparent 0 18%, rgba(255, 118, 255, 0.22) 18% 22%, transparent 22% 100%),
        repeating-linear-gradient(0deg, rgba(255, 119, 255, 0.06) 0 2px, transparent 2px 9px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 34%, rgba(14, 5, 68, 0.38) 100%),
        linear-gradient(135deg, #6322ea 0%, #b42cff 48%, #ff5bee 74%, #11c8ff 100%) !important;
}

#main-menu .play-ufo-icon {
    width: clamp(34px, 4vw, 58px);
    height: clamp(24px, 3vw, 44px);
    object-fit: contain;
    margin-right: 8px;
    vertical-align: -0.18em;
    transform: translateY(3px);
    filter: drop-shadow(0 0 12px rgba(31, 222, 255, 0.82));
    animation: playUfoHover 3.2s ease-in-out infinite;
}

#main-menu .hero-logo {
    position: relative !important;
    width: min(78vw, 900px) !important;
    max-height: clamp(130px, 24vh, 260px) !important;
    z-index: 1 !important;
    filter:
        drop-shadow(0 0 18px rgba(37, 226, 255, 0.62)) drop-shadow(0 0 34px rgba(255, 77, 205, 0.40)) !important;
}

#main-menu .hero-title-row {
    position: relative !important;
}

#main-menu .hero-title-row::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(82vw, 860px);
    height: clamp(115px, 20vh, 230px);
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, rgba(79, 226, 255, 0.38), rgba(168, 85, 247, 0.20) 42%, rgba(236, 72, 153, 0.12) 62%, transparent 76%);
    filter: blur(12px);
    opacity: 0.92;
    animation: logoGlowPulse 4.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes logoGlowPulse {

    0%,
    100% {
        opacity: 0.72;
        transform: translate(-50%, -50%) scale(0.97);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.04);
    }
}

@keyframes playUfoHover {

    0%,
    100% {
        transform: translateY(3px) rotate(-2deg);
    }

    35% {
        transform: translateY(-4px) translateX(2px) rotate(3deg);
    }

    70% {
        transform: translateY(6px) translateX(-2px) rotate(-4deg);
    }
}

#main-menu .main-panel {
    padding: clamp(16px, 2.2vh, 28px) clamp(28px, 4vw, 56px) !important;
    justify-content: center !important;
    gap: clamp(6px, 1vh, 10px) !important;
    position: relative !important;
}

#main-menu .main-kicker {
    position: absolute !important;
    top: clamp(12px, 1.8vh, 18px) !important;
    left: clamp(14px, 2vw, 24px) !important;
    margin: 0 !important;
    padding: 7px 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: clamp(0.72rem, 1vw, 0.88rem) !important;
    z-index: 4 !important;
}

#main-menu .update-info-toggle {
    position: absolute !important;
    top: clamp(12px, 1.8vh, 18px) !important;
    right: clamp(14px, 2vw, 24px) !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 7px 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: clamp(0.72rem, 1vw, 0.88rem) !important;
    line-height: normal !important;
    z-index: 4 !important;
    border: 2px solid rgba(39, 239, 255, 0.58) !important;
    border-radius: 999px !important;
    color: #eaffff !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.05) 48%),
        linear-gradient(135deg, rgba(102, 35, 210, 0.78), rgba(10, 143, 205, 0.54)) !important;
    box-shadow: 0 0 18px rgba(39, 239, 255, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.22) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    cursor: pointer !important;
}

#main-menu .update-info-toggle::before,
#main-menu .update-info-toggle::after {
    display: none !important;
    content: none !important;
}

#main-menu .update-info-toggle:hover {
    transform: none !important;
    filter: none !important;
    border-color: rgba(39, 239, 255, 0.58) !important;
    color: #eaffff !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.05) 48%),
        linear-gradient(135deg, rgba(102, 35, 210, 0.78), rgba(10, 143, 205, 0.54)) !important;
    box-shadow: 0 0 18px rgba(39, 239, 255, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.22) !important;
}

#main-menu #edition-subtitle {
    color: rgba(234, 255, 255, 0.86) !important;
    font-size: 1em !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

#main-menu .update-info-panel {
    position: absolute;
    top: clamp(54px, 6vw, 72px);
    right: clamp(14px, 2vw, 24px);
    z-index: 100;
    width: min(420px, calc(100vw - 28px));
    max-height: min(68vh, 520px);
    overflow-y: auto;
    padding: 18px 20px;
    text-align: left;
    border: 3px solid rgba(40, 224, 255, 0.58);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 40%, rgba(12, 5, 56, 0.28) 100%),
        repeating-linear-gradient(0deg, rgba(255, 119, 255, 0.035) 0 2px, transparent 2px 10px),
        linear-gradient(145deg, rgba(58, 18, 154, 0.96), rgba(123, 31, 205, 0.86) 54%, rgba(15, 112, 209, 0.70));
    box-shadow:
        0 0 0 2px rgba(25, 28, 112, 0.58),
        0 0 22px rgba(31, 222, 255, 0.40),
        0 16px 30px rgba(0, 0, 0, 0.44),
        inset 0 3px 0 rgba(255, 255, 255, 0.18);
    transform-origin: top right;
    transform: scale(0.01, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.18s ease;
}

#main-menu .update-info-panel.open {
    animation: update-info-open 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: auto;
}

@keyframes update-info-open {
    0% {
        transform: scale(0.01, 0);
        opacity: 0;
    }

    60% {
        transform: scale(1, 0.08);
        opacity: 0.55;
    }

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

#main-menu .update-info-panel.hidden {
    pointer-events: none;
}

#main-menu .update-info-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

#main-menu .update-info-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

#main-menu .update-info-title {
    margin-bottom: 8px;
    color: #fff7ff;
    font: 1000 0.98rem "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    text-shadow: 0 0 12px rgba(31, 222, 255, 0.36);
}

#main-menu .update-info-panel ul {
    margin: 0;
    padding-left: 18px;
    color: #d9fbff;
    font-size: 0.88rem;
    line-height: 1.35;
}

.update-version {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(55, 247, 255, 0.42);
    color: #7ff8ff;
    background: rgba(55, 247, 255, 0.10);
    font-size: 0.78rem;
}

#main-menu .hero-title-row {
    margin-top: clamp(18px, 2.6vh, 28px) !important;
    margin-bottom: clamp(6px, 1vh, 12px) !important;
}

#main-menu .main-actions {
    gap: clamp(6px, 1vh, 10px) !important;
    margin: 0 auto !important;
}

#main-menu .main-actions .btn {
    min-height: clamp(54px, 7vh, 72px) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    font-size: clamp(0.82rem, 1.3vw, 0.98rem) !important;
}

#main-menu .main-actions .btn:first-child {
    min-height: clamp(64px, 8.3vh, 86px) !important;
    font-size: clamp(1.05rem, 2.1vw, 1.45rem) !important;
}

#main-menu .main-info-grid {
    margin-top: clamp(8px, 1.4vh, 16px) !important;
    gap: clamp(6px, 1vh, 10px) !important;
}

#main-menu .main-info-card {
    min-height: clamp(62px, 8vh, 84px) !important;
    padding: clamp(8px, 1.2vh, 12px) !important;
}

#main-menu .main-info-card strong {
    font-size: clamp(0.72rem, 1vw, 0.86rem) !important;
}

.main-info-card,
.difficulty-card,
.shop-card-new,
.upgrade-card,
.profile-stat,
.profile-current,
.setting-row,
.pause-perk-row,
.map-node,
.cooldown-widget,
#boss-ui,
#touch-pause-btn,
.touch-ability-btn {
    border: 3px solid rgba(40, 224, 255, 0.46) !important;
    border-radius: 24px !important;
    background:
        linear-gradient(115deg, transparent 0 18%, rgba(255, 118, 255, 0.12) 18% 22%, transparent 22% 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 40%, rgba(12, 5, 56, 0.28) 100%),
        repeating-linear-gradient(0deg, rgba(255, 119, 255, 0.035) 0 2px, transparent 2px 10px),
        linear-gradient(145deg, rgba(58, 18, 154, 0.90), rgba(123, 31, 205, 0.76) 54%, rgba(15, 112, 209, 0.54)) !important;
    box-shadow:
        0 0 0 2px rgba(25, 28, 112, 0.58),
        0 0 18px rgba(31, 222, 255, 0.30),
        0 14px 26px rgba(0, 0, 0, 0.36),
        inset 0 3px 0 rgba(255, 255, 255, 0.18),
        inset 0 -12px 22px rgba(30, 7, 92, 0.38) !important;
}

.main-stat-pill,
.balance-chip {
    border: 3px solid rgba(40, 224, 255, 0.42) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 42%),
        repeating-linear-gradient(0deg, rgba(255, 119, 255, 0.035) 0 2px, transparent 2px 10px),
        linear-gradient(135deg, rgba(71, 19, 169, 0.88), rgba(126, 31, 204, 0.70), rgba(17, 119, 202, 0.50)) !important;
}

#main-menu .main-stat-pill {
    min-height: 54px !important;
    border-radius: 22px !important;
    border-width: 3px !important;
    padding: 10px 20px !important;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif !important;
    font-weight: 1000 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 2px 0 rgba(25, 7, 78, 0.65), 0 0 10px rgba(255, 255, 255, 0.18) !important;
}

#main-menu .main-stat-pill:nth-child(1) {
    border-color: rgba(255, 210, 72, 0.76) !important;
    color: #fff2a3 !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.36), transparent 20%),
        linear-gradient(145deg, rgba(117, 62, 12, 0.96), rgba(181, 107, 18, 0.78), rgba(82, 26, 151, 0.68)) !important;
    box-shadow: 0 0 22px rgba(255, 196, 42, 0.42), inset 0 3px 0 rgba(255, 255, 255, 0.24) !important;
}

#main-menu .main-stat-pill.user-pill {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 540 !important;
    border-color: rgba(96, 255, 191, 0.76) !important;
    color: #d8fff0 !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.32), transparent 20%),
        linear-gradient(145deg, rgba(17, 116, 91, 0.94), rgba(26, 168, 147, 0.72), rgba(95, 30, 176, 0.72)) !important;
    box-shadow: 0 0 22px rgba(52, 255, 163, 0.36), inset 0 3px 0 rgba(255, 255, 255, 0.22) !important;
}

#main-menu .main-stat-pill.user-pill {
    min-width: 210px !important;
    display: inline-grid !important;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 14px 8px 9px !important;
    text-align: left !important;
    white-space: normal !important;
}

#main-menu .user-pill-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    border: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
    line-height: 0;
}

#main-menu .user-pill-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.22)) drop-shadow(0 0 6px var(--rank-glow, rgba(142, 108, 255, 0.24)));
}

#main-menu .rank-info-icon {
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

#main-menu .rank-info-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px var(--rank-glow, rgba(142, 108, 255, 0.24)));
}

.rank-overview-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2, 4, 14, 0.74);
    backdrop-filter: blur(10px);
}

.rank-overview-modal.hidden {
    display: none;
}

.rank-overview-panel {
    width: min(920px, 100%);
    max-height: min(780px, calc(100vh - 44px));
    overflow: auto;
    border-radius: 26px;
    border: 1px solid rgba(126, 231, 255, 0.30);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 209, 102, 0.14), transparent 32%),
        radial-gradient(circle at 86% 0%, rgba(55, 247, 255, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(4, 8, 24, 0.96));
    box-shadow: 0 32px 120px rgba(0, 0, 0, 0.58), inset 0 0 60px rgba(55, 247, 255, 0.08);
    padding: 24px;
}

.rank-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.rank-overview-title {
    font-size: clamp(1.7rem, 4vw, 3rem);
    font-weight: 1000;
    color: var(--primary);
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(55, 247, 255, 0.32);
}

.rank-overview-subtitle {
    color: rgba(206, 220, 255, 0.82);
    margin-top: 6px;
    font-weight: 900;
}

.rank-overview-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.rank-progress-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    margin: 18px 0;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.055);
}

.rank-emblem,
.rank-node-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    background: transparent;
    overflow: visible;
}

.rank-emblem img,
.rank-node-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.22)) drop-shadow(0 0 6px var(--rank-glow, rgba(156, 163, 175, 0.24)));
}

.rank-current-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 1000;
    color: var(--rank-a);
    text-shadow: 0 0 16px var(--rank-glow);
}

.rank-score-glow {
    color: var(--warning);
    text-shadow: 0 0 14px rgba(255, 209, 102, 0.58);
}

.rank-progress-bar {
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.48);
    margin: 12px 0 8px;
}

.rank-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--success), var(--primary), var(--warning));
    box-shadow: 0 0 18px rgba(55, 247, 255, 0.42);
}

.rank-path {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, minmax(96px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding: 18px 4px 4px;
}

.rank-path::before {
    content: "";
    position: absolute;
    left: 48px;
    right: 48px;
    top: 62px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(53, 255, 149, 0.55), rgba(55, 247, 255, 0.28), rgba(255, 255, 255, 0.08));
}

.rank-node {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 96px;
    padding: 10px 8px;
    color: rgba(206, 220, 255, 0.82);
    text-align: center;
}

.rank-node.current {
    color: #fff;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 1px var(--rank-glow), 0 0 24px var(--rank-glow);
    transform: translateY(-4px);
}

.rank-node.current strong {
    color: var(--rank-a);
    text-shadow: 0 0 12px var(--rank-glow);
}

.rank-node small {
    color: rgba(206, 220, 255, 0.74);
    font-weight: 900;
}

.rank-reset-btn {
    margin-top: 12px;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.30), rgba(255, 47, 143, 0.30));
    color: #fff;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.18);
}

.battlepass-chest-modal {
    position: fixed;
    inset: 0;
    z-index: 20010;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 209, 102, 0.16), transparent 28%),
        radial-gradient(circle at 78% 12%, rgba(55, 247, 255, 0.14), transparent 30%),
        rgba(2, 4, 14, 0.78);
    backdrop-filter: blur(10px);
}

.battlepass-chest-modal.hidden {
    display: none;
}

.battlepass-chest-panel {
    width: min(980px, 100%);
    max-height: min(820px, calc(100vh - 44px));
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(255, 209, 102, 0.34);
    background:
        radial-gradient(circle at 16% 0%, rgba(255, 120, 53, 0.13), transparent 34%),
        radial-gradient(circle at 86% 4%, rgba(55, 247, 255, 0.13), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(5, 8, 24, 0.97));
    box-shadow:
        0 34px 130px rgba(0, 0, 0, 0.62),
        inset 0 0 72px rgba(255, 209, 102, 0.07);
    padding: 24px;
}

.battlepass-chest-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.battlepass-chest-title {
    color: #ffd166;
    font-size: clamp(1.8rem, 4vw, 3.15rem);
    font-weight: 1000;
    line-height: 0.95;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(255, 209, 102, 0.32);
}

.battlepass-chest-subtitle {
    margin-top: 7px;
    color: rgba(221, 234, 255, 0.84);
    font-weight: 900;
}

.battlepass-chest-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.battlepass-chest-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1.08fr) minmax(250px, 0.92fr);
    gap: 22px;
    align-items: center;
    margin-top: 20px;
}

.battlepass-chest-stage {
    position: relative;
    isolation: isolate;
    min-height: clamp(290px, 42vw, 430px);
    border: 0;
    clip-path: polygon(8% 0, 88% 0, 100% 14%, 100% 84%, 88% 100%, 8% 100%, 0 84%, 0 14%);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 34%),
        radial-gradient(circle at 50% 52%, rgba(255, 209, 102, 0.26), transparent 28%),
        radial-gradient(circle at 50% 68%, rgba(34, 15, 7, 0.95), rgba(5, 7, 23, 0.90) 52%, rgba(11, 18, 42, 0.82));
    box-shadow:
        0 0 0 1px rgba(255, 209, 102, 0.38),
        inset 0 0 40px rgba(255, 209, 102, 0.08);
    cursor: pointer;
    overflow: hidden;
}

.battlepass-chest-stage::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 11%;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.42);
    filter: blur(10px);
    transform: scaleX(0.85);
}

.battlepass-chest-stage:disabled {
    cursor: default;
}

.battlepass-chest-stage.disabled {
    cursor: default;
}

.battlepass-chest-glow {
    position: absolute;
    inset: 14%;
    z-index: -1;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 226, 122, 0.50), rgba(55, 247, 255, 0.14) 42%, transparent 68%);
    filter: blur(18px);
    opacity: 0.72;
    transform: scale(0.82);
}

.battlepass-chest-img {
    position: absolute;
    left: 50%;
    top: 54%;
    z-index: 2;
    width: min(96%, 440px);
    max-height: 92%;
    object-fit: contain;
    pointer-events: none;
    filter:
        drop-shadow(0 24px 24px rgba(0, 0, 0, 0.50))
        drop-shadow(0 0 22px rgba(255, 209, 102, 0.24));
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.18s ease, transform 0.28s ease, filter 0.28s ease;
}

.battlepass-chest-img.chest-open {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
}

.battlepass-chest-stage.open .chest-closed {
    opacity: 0;
    transform: translate(-50%, -48%) scale(1.03);
}

.battlepass-chest-stage.open .chest-open {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.04);
    filter:
        drop-shadow(0 24px 24px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 34px rgba(255, 209, 102, 0.42));
}

.battlepass-chest-stage.opening .chest-closed,
.battlepass-chest-stage.opening .chest-open {
    animation: battlepassChestShake 0.58s cubic-bezier(.2, .8, .2, 1);
}

.battlepass-chest-stage.opening .battlepass-chest-glow {
    animation: battlepassChestGlow 0.72s ease-out;
}

.battlepass-chest-item-pop {
    position: absolute;
    left: 50%;
    top: 47%;
    z-index: 4;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.32), transparent 24%),
        linear-gradient(145deg, var(--loot-a, #37f7ff), var(--loot-b, #5b35ce));
    box-shadow:
        0 0 0 5px rgba(255, 255, 255, 0.05),
        0 0 34px var(--loot-glow, rgba(55, 247, 255, 0.42));
    transform: translate(-50%, -50%) scale(0.2);
    pointer-events: none;
}

.battlepass-chest-item-pop.hidden {
    display: none;
}

.battlepass-chest-item-pop.revealed {
    animation: battlepassLootPop 0.78s cubic-bezier(.14, 1.24, .35, 1) forwards;
}

.battlepass-chest-item-pop img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.34));
}

.battlepass-chest-item-pop span {
    color: #fff;
    font-weight: 1000;
    letter-spacing: 0;
}

.battlepass-chest-info {
    display: grid;
    gap: 12px;
    align-content: center;
}

.battlepass-chest-counter {
    width: max-content;
    min-width: 98px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 209, 102, 0.34);
    color: #ffd166;
    background: rgba(255, 209, 102, 0.08);
    font-weight: 1000;
    text-align: center;
}

.battlepass-chest-status {
    color: rgba(221, 234, 255, 0.88);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
}

.battlepass-chest-latest {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid var(--loot-border, rgba(255, 255, 255, 0.14));
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035)),
        rgba(3, 6, 22, 0.55);
    box-shadow: 0 0 24px var(--loot-glow, rgba(55, 247, 255, 0.18));
}

.battlepass-chest-latest.hidden {
    display: none;
}

.battlepass-chest-action {
    width: min(240px, 100%);
}

.battlepass-loot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.battlepass-loot-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 86px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--loot-border, rgba(255, 255, 255, 0.12));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
        rgba(6, 8, 28, 0.62);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.035);
    opacity: 0.48;
}

.battlepass-loot-card.claimed {
    opacity: 1;
    animation: battlepassCardArrive 0.34s ease-out both;
    box-shadow:
        0 0 24px var(--loot-glow, rgba(55, 247, 255, 0.18)),
        inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.battlepass-loot-card.rare {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.20), rgba(255, 47, 143, 0.08)),
        rgba(11, 8, 32, 0.78);
}

.battlepass-loot-visual {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    border: 1px solid var(--loot-border, rgba(255, 255, 255, 0.18));
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.28), transparent 24%),
        linear-gradient(145deg, var(--loot-a, #37f7ff), var(--loot-b, #5b35ce));
    box-shadow: 0 0 18px var(--loot-glow, rgba(55, 247, 255, 0.24));
    overflow: hidden;
}

.battlepass-loot-visual img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.30));
}

.battlepass-loot-visual span {
    color: #fff;
    font-weight: 1000;
    font-size: 0.84rem;
    line-height: 1;
}

.battlepass-loot-copy {
    min-width: 0;
}

.battlepass-loot-copy strong {
    display: block;
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.battlepass-loot-copy small {
    display: block;
    margin-top: 4px;
    color: rgba(221, 234, 255, 0.78);
    font-weight: 800;
    line-height: 1.25;
}

.battlepass-loot-rarity {
    display: inline-block;
    margin-top: 5px;
    color: var(--loot-a, #37f7ff);
    font-size: 0.68rem;
    font-weight: 1000;
    text-transform: uppercase;
}

@keyframes battlepassChestShake {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    18% { transform: translate(calc(-50% - 8px), -51%) rotate(-2deg) scale(1.02); }
    36% { transform: translate(calc(-50% + 9px), -49%) rotate(2deg) scale(1.02); }
    56% { transform: translate(calc(-50% - 5px), -52%) rotate(-1deg) scale(1.04); }
    78% { transform: translate(calc(-50% + 3px), -50%) rotate(1deg) scale(1.02); }
    100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

@keyframes battlepassChestGlow {
    0% { opacity: 0.56; transform: scale(0.72); }
    48% { opacity: 1; transform: scale(1.22); }
    100% { opacity: 0.72; transform: scale(0.82); }
}

@keyframes battlepassLootPop {
    0% { opacity: 0; transform: translate(-50%, 16%) scale(0.2) rotate(-10deg); }
    42% { opacity: 1; transform: translate(-50%, -92%) scale(1.18) rotate(4deg); }
    72% { opacity: 1; transform: translate(-50%, -72%) scale(1) rotate(0deg); }
    100% { opacity: 1; transform: translate(-50%, -72%) scale(1) rotate(0deg); }
}

@keyframes battlepassCardArrive {
    0% { opacity: 0; transform: translateY(10px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 820px) {
    .battlepass-chest-layout {
        grid-template-columns: 1fr;
    }

    .battlepass-loot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .battlepass-chest-modal {
        padding: 12px;
    }

    .battlepass-chest-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .battlepass-chest-stage {
        min-height: 260px;
    }

    .battlepass-loot-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .battlepass-chest-stage.opening .chest-closed,
    .battlepass-chest-stage.opening .chest-open,
    .battlepass-chest-stage.opening .battlepass-chest-glow,
    .battlepass-chest-item-pop.revealed,
    .battlepass-loot-card.claimed {
        animation: none;
    }
}

/* Animation-only battlepass chest scene */
.battlepass-chest-modal {
    place-items: stretch;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 47%, rgba(77, 126, 255, 0.72), rgba(16, 52, 213, 0.92) 42%, #071a9f 76%),
        linear-gradient(180deg, #154bff 0%, #061ca4 100%);
    backdrop-filter: none;
}

.battlepass-chest-panel {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    padding: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(103, 150, 255, 0.84), rgba(25, 75, 232, 0.28) 28%, transparent 54%),
        linear-gradient(180deg, rgba(48, 107, 255, 0.35), rgba(2, 22, 160, 0.28));
    box-shadow: inset 0 0 90px rgba(3, 9, 94, 0.42);
    animation: battlepassSceneIn 0.32s ease-out both;
}

.battlepass-bg-pattern {
    position: absolute;
    inset: -12%;
    opacity: 0.28;
    background-image:
        radial-gradient(circle at 34px 30px, rgba(255, 255, 255, 0.30) 0 12px, transparent 13px),
        radial-gradient(circle at 26px 34px, rgba(2, 20, 145, 0.30) 0 4px, transparent 5px),
        radial-gradient(circle at 42px 34px, rgba(2, 20, 145, 0.30) 0 4px, transparent 5px),
        radial-gradient(circle at 34px 45px, rgba(2, 20, 145, 0.26) 0 4px, transparent 5px);
    background-size: 170px 170px;
    transform: rotate(-12deg) scale(1.1);
    animation: battlepassPatternDrift 26s linear infinite;
    pointer-events: none;
}

.battlepass-chest-panel::before,
.battlepass-chest-panel::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
}

.battlepass-chest-panel::before {
    left: 50%;
    top: 49%;
    width: min(78vw, 820px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110, 169, 255, 0.64), rgba(55, 87, 255, 0.24) 40%, transparent 70%);
    filter: blur(12px);
    transform: translate(-50%, -50%);
    animation: battlepassCenterPulse 3.8s ease-in-out infinite;
}

.battlepass-chest-panel::after {
    left: 50%;
    bottom: 13%;
    width: min(42vw, 440px);
    height: 34px;
    border-radius: 50%;
    background: rgba(3, 10, 88, 0.34);
    filter: blur(14px);
    transform: translateX(-50%);
    animation: battlepassShadowBreath 3s ease-in-out infinite;
}

.battlepass-chest-title {
    position: absolute;
    left: 50%;
    top: clamp(24px, 5vh, 56px);
    z-index: 5;
    color: #fff;
    font-family: Impact, "Arial Black", "Trebuchet MS", sans-serif;
    font-size: clamp(1.8rem, 4.2vw, 3.7rem);
    font-weight: 1000;
    line-height: 0.9;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    text-shadow:
        0 5px 0 rgba(0, 18, 126, 0.18),
        0 0 26px rgba(255, 255, 255, 0.32);
    transform: translateX(-50%);
    animation: battlepassTitleIn 0.5s cubic-bezier(.18, .86, .25, 1.16) both;
}

.battlepass-chest-close {
    display: none;
}

.battlepass-chest-stage {
    position: relative;
    z-index: 4;
    width: min(72vw, 620px);
    height: min(56vw, 480px);
    min-height: 0;
    margin-top: clamp(36px, 8vh, 104px);
    border: 0;
    clip-path: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    cursor: pointer;
    transform-origin: 50% 62%;
    animation: battlepassChestIdle 6.2s ease-in-out infinite;
}

.battlepass-chest-stage::after {
    display: none;
}

.battlepass-chest-stage:disabled {
    cursor: default;
}

.battlepass-chest-glow {
    position: absolute;
    left: 50%;
    top: 52%;
    z-index: 0;
    width: 72%;
    height: 58%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.54), rgba(117, 77, 255, 0.22) 38%, transparent 72%);
    filter: blur(22px);
    opacity: 0.76;
    transform: translate(-50%, -50%);
    animation: battlepassChestAura 2.7s ease-in-out infinite;
}

.battlepass-chest-img {
    left: 50%;
    top: 54%;
    z-index: 2;
    width: min(100%, 570px);
    max-height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 34px 22px rgba(0, 8, 80, 0.30))
        drop-shadow(0 0 34px rgba(130, 167, 255, 0.30));
    transform: translate(-50%, -50%) scale(1);
    transition:
        opacity 0.5s cubic-bezier(.2, .8, .2, 1),
        transform 0.7s cubic-bezier(.12, .86, .24, 1),
        filter 0.6s ease;
}

.battlepass-chest-img.chest-open {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94) rotate(-1deg);
}

.battlepass-chest-stage.open .chest-closed {
    opacity: 0;
    transform: translate(-50%, -49%) scale(0.96) rotate(1deg);
}

.battlepass-chest-stage.open .chest-open {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.05) rotate(0deg);
    filter:
        drop-shadow(0 36px 22px rgba(0, 8, 80, 0.28))
        drop-shadow(0 0 56px rgba(174, 82, 255, 0.48));
}

.battlepass-chest-stage.opening {
    animation: battlepassChestImpact 0.92s cubic-bezier(.12, .9, .2, 1) both;
}

.battlepass-chest-stage.opening .chest-closed {
    animation: battlepassChestClosedOut 0.92s cubic-bezier(.12, .9, .2, 1) both;
}

.battlepass-chest-stage.opening .chest-open {
    animation: battlepassChestOpenIn 0.92s cubic-bezier(.12, .9, .2, 1) both;
}

.battlepass-chest-stage.opening .battlepass-chest-glow {
    animation: battlepassOpenFlash 0.92s ease-out both;
}

.battlepass-chest-item-pop {
    left: 50%;
    top: 46%;
    z-index: 6;
    width: min(34vw, 250px);
    height: min(34vw, 250px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
}

.battlepass-chest-item-pop::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 182%;
    height: 182%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(219, 86, 255, 0.84) 24%, rgba(138, 55, 255, 0.54) 48%, rgba(75, 35, 255, 0.20) 67%, transparent 82%);
    filter: blur(18px);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.battlepass-chest-item-pop.hidden {
    display: none;
}

.battlepass-chest-item-pop.revealed {
    display: grid;
    place-items: center;
    animation: battlepassItemReveal 1.15s cubic-bezier(.12, .92, .18, 1) forwards;
}

.battlepass-chest-item-pop img {
    width: 78%;
    height: 78%;
    object-fit: contain;
    filter:
        drop-shadow(0 18px 14px rgba(0, 0, 0, 0.24))
        drop-shadow(0 0 38px rgba(230, 108, 255, 0.92));
}

.battlepass-chest-item-pop.revealed img {
    animation: battlepassItemCalmFloat 3.8s ease-in-out 1.05s infinite;
}

.battlepass-item-amount {
    position: absolute;
    left: 50%;
    top: calc(50% + min(15vw, 112px));
    min-width: 140px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(130, 58, 255, 0.90), rgba(70, 25, 184, 0.92));
    box-shadow:
        0 0 22px rgba(203, 84, 255, 0.62),
        inset 0 3px 0 rgba(255, 255, 255, 0.18);
    font-size: clamp(0.9rem, 2vw, 1.18rem);
    font-weight: 1000;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 0 rgba(24, 4, 94, 0.28);
    transform: translateX(-50%);
    animation: battlepassAmountFloat 3.8s ease-in-out 1.05s infinite;
}

.battlepass-chest-counter {
    position: absolute;
    right: clamp(18px, 4vw, 56px);
    bottom: clamp(18px, 4vw, 48px);
    z-index: 7;
    min-width: 132px;
    height: auto;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.42);
    color: #fff;
    background: linear-gradient(180deg, rgba(52, 107, 255, 0.98), rgba(18, 47, 198, 0.98));
    box-shadow:
        0 12px 26px rgba(0, 8, 90, 0.28),
        inset 0 4px 0 rgba(255, 255, 255, 0.18),
        inset 0 -6px 0 rgba(0, 9, 120, 0.24);
    text-align: left;
    animation: battlepassCounterIn 0.42s ease-out both;
}

.battlepass-chest-counter strong {
    display: grid;
    place-items: center;
    min-width: 38px;
    color: #fff45d;
    font-size: 2rem;
    font-weight: 1000;
    line-height: 1;
    text-shadow: 0 3px 0 rgba(0, 13, 116, 0.25);
}

.battlepass-chest-counter span {
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.86rem;
    font-weight: 1000;
    line-height: 1;
    text-transform: uppercase;
}

.battlepass-chest-counter.empty {
    opacity: 0.72;
    filter: grayscale(0.25);
}

.battlepass-chest-counter.legendary-ready {
    border-color: rgba(255, 244, 168, 0.84);
    background:
        radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.38), transparent 25%),
        linear-gradient(180deg, rgba(158, 73, 255, 0.98), rgba(69, 30, 196, 0.98));
    box-shadow:
        0 0 34px rgba(255, 210, 82, 0.64),
        0 0 54px rgba(198, 71, 255, 0.42),
        inset 0 4px 0 rgba(255, 255, 255, 0.22),
        inset 0 -6px 0 rgba(60, 7, 130, 0.25);
    animation: battlepassLegendaryCounter 1.55s ease-in-out infinite;
}

.battlepass-chest-counter.legendary-ready strong {
    color: #fff2a8;
    text-shadow:
        0 0 18px rgba(255, 224, 102, 0.88),
        0 3px 0 rgba(0, 13, 116, 0.22);
}

.battlepass-chest-head,
.battlepass-chest-layout,
.battlepass-chest-info,
.battlepass-chest-status,
.battlepass-chest-latest,
.battlepass-chest-action,
.battlepass-loot-grid {
    display: none !important;
}

@keyframes battlepassSceneIn {
    from { opacity: 0; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes battlepassPatternDrift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 170px 170px, 170px 170px, 170px 170px, 170px 170px; }
}

@keyframes battlepassCenterPulse {
    0%, 100% { opacity: 0.72; transform: translate(-50%, -50%) scale(0.96); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes battlepassShadowBreath {
    0%, 100% { opacity: 0.34; transform: translateX(-50%) scaleX(0.88); }
    50% { opacity: 0.48; transform: translateX(-50%) scaleX(1.04); }
}

@keyframes battlepassTitleIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(0.92); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes battlepassChestIdle {
    0%, 100% { transform: translateY(0) rotate(-0.25deg) scale(1); }
    50% { transform: translateY(-4px) rotate(0.25deg) scale(1.004); }
}

@keyframes battlepassChestAura {
    0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.88); }
    50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes battlepassChestImpact {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    16% { transform: translateY(7px) rotate(-0.8deg) scale(0.985); }
    38% { transform: translateY(-7px) rotate(0.9deg) scale(1.022); }
    64% { transform: translateY(1px) rotate(-0.25deg) scale(1.01); }
    100% { transform: translateY(-2px) rotate(0deg) scale(1.01); }
}

@keyframes battlepassChestClosedOut {
    0%, 34% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    58% { opacity: 0.42; transform: translate(-50%, -52%) scale(1.04) rotate(-1deg); }
    100% { opacity: 0; transform: translate(-50%, -49%) scale(0.96) rotate(1deg); }
}

@keyframes battlepassChestOpenIn {
    0%, 34% { opacity: 0; transform: translate(-50%, -48%) scale(0.90) rotate(-1deg); }
    60% { opacity: 1; transform: translate(-50%, -54%) scale(1.10) rotate(0.5deg); }
    100% { opacity: 1; transform: translate(-50%, -52%) scale(1.05) rotate(0deg); }
}

@keyframes battlepassOpenFlash {
    0% { opacity: 0.42; transform: translate(-50%, -50%) scale(0.78); filter: blur(22px); }
    44% { opacity: 1; transform: translate(-50%, -50%) scale(1.45); filter: blur(18px); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.04); filter: blur(22px); }
}

@keyframes battlepassItemReveal {
    0% { opacity: 0; transform: translate(-50%, -4%) scale(0.42) rotate(-3deg); }
    42% { opacity: 1; transform: translate(-50%, -98%) scale(1.08) rotate(1.6deg); }
    72% { opacity: 1; transform: translate(-50%, -86%) scale(1) rotate(0deg); }
    100% { opacity: 1; transform: translate(-50%, -86%) scale(1) rotate(0deg); }
}

@keyframes battlepassItemCalmFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-7px) scale(1.018); }
}

@keyframes battlepassAmountFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes battlepassLegendaryCounter {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: saturate(1);
    }
    50% {
        transform: translateY(-3px) scale(1.035);
        filter: saturate(1.24);
    }
}

@keyframes battlepassCounterIn {
    from { opacity: 0; transform: translateY(16px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
    .battlepass-chest-title {
        top: 34px;
        font-size: clamp(1.75rem, 9vw, 3rem);
    }

    .battlepass-chest-stage {
        width: min(96vw, 520px);
        height: min(82vw, 420px);
        margin-top: 58px;
    }

    .battlepass-chest-counter {
        right: 14px;
        bottom: 14px;
        min-width: 116px;
        padding: 10px 13px;
        border-radius: 16px;
    }

    .battlepass-item-amount {
        top: calc(50% + min(22vw, 92px));
        min-width: 118px;
        padding: 7px 11px;
    }

    .battlepass-chest-counter strong {
        min-width: 32px;
        font-size: 1.65rem;
    }

    .battlepass-chest-counter span {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .battlepass-bg-pattern,
    .battlepass-chest-panel,
    .battlepass-chest-panel::before,
    .battlepass-chest-panel::after,
    .battlepass-chest-title,
    .battlepass-chest-stage,
    .battlepass-chest-glow,
    .battlepass-chest-stage.opening,
    .battlepass-chest-stage.opening .chest-closed,
    .battlepass-chest-stage.opening .chest-open,
    .battlepass-chest-stage.opening .battlepass-chest-glow,
    .battlepass-chest-item-pop.revealed,
    .battlepass-chest-item-pop.revealed img,
    .battlepass-item-amount,
    .battlepass-chest-counter {
        animation: none;
    }
}

.battlepass-chest-modal {
    background:
        radial-gradient(circle at 50% 43%, rgba(179, 75, 255, 0.42) 0%, rgba(59, 34, 187, 0.58) 25%, rgba(8, 30, 133, 0.94) 58%, rgba(4, 8, 48, 0.98) 100%),
        linear-gradient(135deg, #071649 0%, #111d8f 42%, #3c157b 100%);
}

.battlepass-chest-panel {
    background:
        radial-gradient(circle at 50% 45%, rgba(219, 92, 255, 0.30), rgba(65, 68, 255, 0.24) 30%, transparent 58%),
        radial-gradient(circle at 50% 50%, rgba(55, 247, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(13, 22, 92, 0.10), rgba(3, 6, 38, 0.28));
}

.battlepass-bg-pattern {
    opacity: 0.18;
    mix-blend-mode: screen;
}

.battlepass-chest-stage.item-pulse {
    animation: battlepassItemPulse 0.54s cubic-bezier(.2, .82, .22, 1) both;
}

.battlepass-chest-stage.item-pulse .chest-open {
    animation: battlepassOpenChestBreathe 0.54s cubic-bezier(.2, .82, .22, 1) both;
}

.battlepass-chest-counter,
.battlepass-skip-button {
    min-width: 136px;
    border-radius: 18px;
    border: 2px solid rgba(153, 232, 255, 0.56);
    background:
        linear-gradient(180deg, rgba(28, 218, 255, 0.98), rgba(22, 91, 221, 0.96) 52%, rgba(80, 32, 184, 0.98));
    box-shadow:
        0 14px 30px rgba(4, 12, 76, 0.34),
        0 0 26px rgba(55, 247, 255, 0.22),
        inset 0 4px 0 rgba(255, 255, 255, 0.20),
        inset 0 -7px 0 rgba(25, 8, 130, 0.22);
}

.battlepass-skip-button {
    position: absolute;
    left: clamp(18px, 4vw, 56px);
    bottom: clamp(18px, 4vw, 48px);
    z-index: 7;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    align-items: center;
    color: #fff;
    cursor: pointer;
    text-align: left;
    text-transform: uppercase;
    animation: battlepassCounterIn 0.42s ease-out both;
}

.battlepass-skip-button strong {
    color: #fff45d;
    font-size: 1.2rem;
    font-weight: 1000;
    line-height: 1;
    text-shadow: 0 3px 0 rgba(0, 13, 116, 0.20);
}

.battlepass-skip-button span {
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.72rem;
    font-weight: 1000;
    line-height: 1;
}

.battlepass-skip-button:disabled,
.battlepass-skip-button.disabled {
    opacity: 0.58;
    filter: grayscale(0.25);
    cursor: default;
}

.battlepass-reward-row {
    position: absolute;
    left: 50%;
    bottom: clamp(94px, 12vh, 128px);
    z-index: 7;
    width: min(920px, calc(100vw - 36px));
    min-height: 86px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    pointer-events: none;
}

.battlepass-summary-card {
    width: min(21vw, 168px);
    min-width: 122px;
    padding: 9px 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    border: 2px solid var(--loot-border, rgba(255, 255, 255, 0.24));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05)),
        rgba(15, 16, 82, 0.76);
    box-shadow:
        0 0 22px var(--loot-glow, rgba(203, 84, 255, 0.34)),
        inset 0 2px 0 rgba(255, 255, 255, 0.16);
    animation: battlepassSummaryIn 0.28s ease-out both;
}

.battlepass-summary-card img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--loot-glow, rgba(203, 84, 255, 0.50)));
}

.battlepass-summary-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.battlepass-summary-copy strong,
.battlepass-summary-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.battlepass-summary-copy strong {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 1000;
    line-height: 1;
}

.battlepass-summary-copy span {
    color: #fff45d;
    font-size: 0.9rem;
    font-weight: 1000;
    line-height: 1;
}

.battlepass-fly-layer {
    position: fixed;
    inset: 0;
    z-index: 22000;
    pointer-events: none;
}

.battlepass-fly-item {
    position: fixed;
    left: var(--from-x);
    top: var(--from-y);
    width: var(--fly-size, 38px);
    height: var(--fly-size, 38px);
    object-fit: contain;
    transform: translate(-50%, -50%) scale(1);
    filter:
        drop-shadow(0 0 12px rgba(203, 84, 255, 0.72))
        drop-shadow(0 8px 8px rgba(0, 0, 0, 0.22));
    animation: battlepassFlyToStat var(--fly-duration, 0.86s) cubic-bezier(.22, .78, .24, 1) forwards;
    animation-delay: var(--fly-delay, 0s);
}

.battlepass-stat-bump {
    animation: battlepassStatBump 0.48s cubic-bezier(.18, .9, .25, 1.28) both !important;
}

@keyframes battlepassItemPulse {
    0% { transform: translateY(0) scale(1.01); }
    36% { transform: translateY(-5px) scale(1.025); }
    100% { transform: translateY(-2px) scale(1.01); }
}

@keyframes battlepassOpenChestBreathe {
    0% { transform: translate(-50%, -52%) scale(1.05); }
    42% { transform: translate(-50%, -53.4%) scale(1.075); }
    100% { transform: translate(-50%, -52%) scale(1.05); }
}

@keyframes battlepassSummaryIn {
    from { opacity: 0; transform: translateY(12px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes battlepassFlyToStat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.68);
    }
    12% {
        opacity: 1;
        transform: translate(calc(-50% + var(--arc-x, 0px)), calc(-50% - 42px)) scale(1.05);
    }
    100% {
        opacity: 0;
        left: var(--to-x);
        top: var(--to-y);
        transform: translate(-50%, -50%) scale(0.28);
    }
}

@keyframes battlepassStatBump {
    0%, 100% { transform: translateY(0) scale(1); }
    42% { transform: translateY(-8px) scale(1.05); }
    72% { transform: translateY(3px) scale(0.99); }
}

@media (max-width: 760px) {
    .battlepass-reward-row {
        bottom: 86px;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 4px 8px;
    }

    .battlepass-summary-card {
        width: 142px;
        min-width: 142px;
    }

    .battlepass-skip-button {
        left: 14px;
        bottom: 14px;
        min-width: 116px;
        padding: 10px 13px;
        border-radius: 16px;
    }
}

#main-menu .user-pill-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    line-height: 1.05;
}

#main-menu .user-pill-state {
    font-size: 0.62rem;
    font-weight: 1000;
    color: rgba(238, 255, 250, 0.82);
    text-transform: uppercase;
}

#main-menu #active-username-val {
    display: block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 0.9rem;
}

#main-menu .main-stat-pill.user-pill.signed-out {
    border-color: rgba(255, 221, 92, 0.86) !important;
    color: #fff6c7 !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 20%),
        linear-gradient(145deg, rgba(141, 79, 18, 0.96), rgba(219, 143, 24, 0.76), rgba(122, 36, 153, 0.70)) !important;
    box-shadow: 0 0 24px rgba(255, 196, 42, 0.46), inset 0 3px 0 rgba(255, 255, 255, 0.24) !important;
}

#main-menu .main-stat-pill.user-pill.signed-in {
    border-color: rgba(96, 255, 191, 0.86) !important;
}

#main-menu .main-stat-pill.user-pill:hover {
    transform: translateY(-2px) scale(1.03) !important;
    border-color: rgba(128, 255, 212, 0.95) !important;
    box-shadow: 0 0 30px rgba(52, 255, 163, 0.52), inset 0 3px 0 rgba(255, 255, 255, 0.28) !important;
}

#main-menu .main-stat-pill.user-pill:active {
    transform: translateY(1px) scale(0.98) !important;
}

#main-menu .main-stat-pill.stat-shop-pill {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 540 !important;
}

#main-menu .main-stat-pill.stat-shop-pill:hover {
    transform: translateY(-2px) scale(1.03) !important;
    filter: brightness(1.12) saturate(1.08);
}

#main-menu .main-stat-pill.stat-shop-pill:active {
    transform: translateY(1px) scale(0.98) !important;
}

#main-menu .main-stat-pill.highscore {
    border-color: rgba(255, 88, 190, 0.78) !important;
    color: #ffe5f7 !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.32), transparent 20%),
        linear-gradient(145deg, rgba(122, 24, 139, 0.94), rgba(218, 53, 181, 0.72), rgba(24, 130, 201, 0.66)) !important;
    box-shadow: 0 0 22px rgba(255, 77, 205, 0.40), inset 0 3px 0 rgba(255, 255, 255, 0.22) !important;
}

#hud {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.upgrade-card:not(.bonus)>div:first-child,
.upgrade-icon-bubble,
.shop-card-new>div:first-child,
.shop-offer-icon,
.inventory-item>span:first-child,
.pause-status-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    border: 2px solid rgba(40, 224, 255, 0.56) !important;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.55), transparent 24%),
        linear-gradient(145deg, #c33cff 0%, #7b2cff 48%, #1be2ff 100%) !important;
    box-shadow:
        0 0 16px rgba(37, 226, 255, 0.42),
        inset 0 2px 0 rgba(255, 255, 255, 0.28),
        inset 0 -8px 14px rgba(28, 6, 93, 0.32) !important;
    color: #fff !important;
    text-shadow: 0 2px 0 rgba(28, 6, 93, 0.62), 0 0 10px rgba(255, 255, 255, 0.28) !important;
}

.upgrade-card:not(.bonus)>div:first-child,
.upgrade-icon-bubble {
    width: 58px !important;
    height: 58px !important;
    margin: 0 auto 10px !important;
    font-size: 1.8rem !important;
}

.bonus-price-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 100% !important;
    margin: 0 auto 8px !important;
    padding: 6px 11px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(251, 191, 36, 0.64) !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(168, 85, 247, 0.14)) !important;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    color: #ffeaa0 !important;
    font-size: 0.68rem !important;
    line-height: 1 !important;
    font-weight: 1000 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 0 rgba(60, 25, 0, 0.55) !important;
}

.profile-panel {
    top: 76px !important;
    left: 50% !important;
    right: auto !important;
    width: min(480px, calc(100vw - 32px)) !important;
    max-width: min(480px, calc(100vw - 32px)) !important;
    padding: 20px !important;
    border-radius: 26px !important;
    border: 2px solid rgba(72, 226, 255, 0.46) !important;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.26), transparent 18%),
        radial-gradient(circle at 82% 6%, rgba(255, 76, 216, 0.18), transparent 28%),
        linear-gradient(155deg, rgba(23, 20, 93, 0.98), rgba(107, 33, 168, 0.95) 52%, rgba(12, 132, 174, 0.92)) !important;
    box-shadow:
        0 28px 74px rgba(0, 0, 0, 0.58),
        0 0 34px rgba(37, 226, 255, 0.30),
        inset 0 3px 0 rgba(255, 255, 255, 0.20),
        inset 0 -18px 30px rgba(18, 4, 71, 0.34) !important;
    transform-origin: top center !important;
}

.profile-panel.hidden {
    transform: translateX(-50%) translateY(-10px) scale(0.96) !important;
}

.profile-panel:not(.hidden) {
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

.profile-panel::before {
    content: "";
    position: absolute;
    top: -11px;
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translateX(-50%) rotate(45deg);
    border-left: 2px solid rgba(72, 226, 255, 0.46);
    border-top: 2px solid rgba(72, 226, 255, 0.46);
    border-radius: 6px 0 0 0;
    background: rgba(42, 22, 116, 0.98);
    box-shadow: -5px -5px 18px rgba(37, 226, 255, 0.16);
}

.auth-header,
.auth-status,
.auth-tabs,
.auth-row,
.auth-actions,
.auth-account-card {
    position: relative;
    z-index: 1;
}

.auth-title {
    color: #f8fbff !important;
    font-size: 1.24rem !important;
    text-shadow: 0 0 14px rgba(37, 226, 255, 0.42), 0 2px 0 rgba(38, 9, 93, 0.7);
}

.auth-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-settings-top {
    min-width: 184px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid rgba(72, 226, 255, 0.62);
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.34), transparent 24%),
        linear-gradient(145deg, rgba(117, 44, 210, 0.96), rgba(22, 176, 219, 0.78));
    color: #f8fbff;
    box-shadow: 0 0 16px rgba(37, 226, 255, 0.30), inset 0 2px 0 rgba(255, 255, 255, 0.22);
    font-weight: 1000;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    cursor: pointer;
}

.auth-settings-top.hidden {
    display: none !important;
}

.auth-settings-top:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 0 24px rgba(37, 226, 255, 0.44), inset 0 2px 0 rgba(255, 255, 255, 0.28);
}

.profile-settings-logout {
    position: absolute;
    top: 18px;
    right: 18px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 100, 129, 0.76);
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.34), transparent 22%),
        linear-gradient(145deg, rgba(176, 22, 69, 0.96), rgba(255, 72, 116, 0.82), rgba(117, 44, 210, 0.58));
    color: #fff0f4;
    box-shadow: 0 0 18px rgba(255, 72, 116, 0.38), inset 0 2px 0 rgba(255, 255, 255, 0.22);
    font-weight: 1000;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    z-index: 4;
}

.profile-settings-logout.hidden {
    display: none !important;
}

.profile-settings-logout:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 0 26px rgba(255, 72, 116, 0.52), inset 0 2px 0 rgba(255, 255, 255, 0.26);
}

.profile-settings-logout:disabled {
    cursor: wait;
    opacity: 0.82;
    transform: none;
}

.auth-close {
    border-radius: 999px !important;
    border-color: rgba(255, 106, 214, 0.48) !important;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.32), transparent 24%),
        linear-gradient(145deg, rgba(195, 60, 255, 0.92), rgba(33, 189, 255, 0.72)) !important;
    box-shadow: 0 0 16px rgba(255, 76, 216, 0.24), inset 0 2px 0 rgba(255, 255, 255, 0.20) !important;
}

.auth-account-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
        rgba(17, 20, 77, 0.58);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), 0 0 18px rgba(37, 226, 255, 0.16);
}

.auth-account-card.hidden {
    display: none !important;
}

.auth-account-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid rgba(37, 226, 255, 0.72);
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.54), transparent 24%),
        linear-gradient(145deg, #c33cff 0%, #7b2cff 48%, #1be2ff 100%);
    color: #fff;
    font-weight: 1000;
    font-size: 1.45rem;
    text-shadow: 0 2px 0 rgba(28, 6, 93, 0.62);
    box-shadow: 0 0 18px rgba(37, 226, 255, 0.42), inset 0 -8px 14px rgba(28, 6, 93, 0.32);
}

.auth-account-name {
    color: #fff;
    font-weight: 1000;
    font-size: 1.05rem;
}

.auth-account-sub {
    margin-top: 3px;
    color: #d4faff;
    font-size: 0.82rem;
    font-weight: 800;
    opacity: 0.92;
}

.profile-panel .auth-tab,
.profile-panel .btn {
    border-radius: 18px !important;
    border: 2px solid rgba(72, 226, 255, 0.36) !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.28), transparent 19%),
        linear-gradient(145deg, rgba(117, 44, 210, 0.94), rgba(22, 176, 219, 0.74)) !important;
    color: #f9fdff !important;
    box-shadow: 0 0 16px rgba(37, 226, 255, 0.20), inset 0 2px 0 rgba(255, 255, 255, 0.18) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}

.profile-panel .auth-tab:hover,
.profile-panel .btn:hover {
    transform: translateY(-1px) scale(1.02) !important;
    border-color: rgba(255, 96, 218, 0.62) !important;
    box-shadow: 0 0 24px rgba(255, 96, 218, 0.28), 0 0 18px rgba(37, 226, 255, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.24) !important;
}

.profile-panel .auth-tab.active {
    border-color: rgba(255, 221, 92, 0.74) !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 19%),
        linear-gradient(145deg, rgba(168, 85, 247, 0.96), rgba(236, 72, 153, 0.78), rgba(251, 191, 36, 0.50)) !important;
    color: #fff8c9 !important;
}

.profile-panel input {
    border-radius: 16px !important;
    border: 2px solid rgba(72, 226, 255, 0.28) !important;
    background: rgba(6, 8, 37, 0.58) !important;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08) !important;
}

#auth-logout-btn {
    border-color: rgba(255, 100, 129, 0.76) !important;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.34), transparent 22%),
        linear-gradient(145deg, rgba(176, 22, 69, 0.96), rgba(255, 72, 116, 0.82), rgba(117, 44, 210, 0.58)) !important;
    color: #fff0f4 !important;
    box-shadow: 0 0 18px rgba(255, 72, 116, 0.38), inset 0 2px 0 rgba(255, 255, 255, 0.22) !important;
}

.profile-screen-panel {
    border: 2px solid rgba(72, 226, 255, 0.42) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 16% 8%, rgba(255, 221, 92, 0.14), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(53, 255, 149, 0.12), transparent 26%),
        linear-gradient(160deg, rgba(9, 13, 39, 0.96), rgba(34, 22, 96, 0.92), rgba(7, 70, 96, 0.90)) !important;
    box-shadow: 0 28px 82px rgba(0, 0, 0, 0.56), 0 0 34px rgba(37, 226, 255, 0.20) !important;
}

.profile-identity,
.profile-settings-card,
.profile-stat,
.profile-current {
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(37, 226, 255, 0.08) !important;
}

.profile-action-card {
    border: 2px solid rgba(72, 226, 255, 0.34) !important;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 21%),
        linear-gradient(145deg, rgba(117, 44, 210, 0.90), rgba(18, 151, 180, 0.74), rgba(39, 126, 82, 0.60)) !important;
    box-shadow: 0 0 18px rgba(37, 226, 255, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.18) !important;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

.profile-action-card:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 221, 92, 0.72) !important;
    box-shadow: 0 0 26px rgba(255, 221, 92, 0.24), 0 0 18px rgba(37, 226, 255, 0.20) !important;
}

.profile-settings-card .daily-title {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-edit-form {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 221, 92, 0.22);
    background: rgba(2, 5, 18, 0.34);
}

.free-roam-radio {
    position: fixed;
    left: 26px;
    top: 88px;
    z-index: 9000;
    width: min(220px, calc(100vw - 60px));
    pointer-events: none;
    transition: width 0.24s ease;
}

.free-roam-radio.open {
    width: min(300px, calc(100vw - 60px));
}

.free-roam-radio.hidden {
    display: none !important;
}

.radio-glass {
    position: relative;
    overflow: hidden;
    padding: 8px 10px;
    border: 1px solid rgba(191, 247, 255, 0.26);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012)),
        rgba(3, 6, 18, 0.10);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.12),
        0 0 10px rgba(37, 226, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(2.5px) saturate(106%);
    text-align: left;
    pointer-events: auto;
    transform-origin: top left;
    transition: padding 0.24s ease, background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.free-roam-radio.open .radio-glass {
    padding: 10px;
    transform: translateY(2px);
    border-color: rgba(191, 247, 255, 0.30);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.016)),
        rgba(3, 6, 18, 0.14);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.16),
        0 0 14px rgba(37, 226, 255, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.radio-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 26%, rgba(255, 255, 255, 0.20) 27%, transparent 42%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 8px);
    opacity: 0.20;
    pointer-events: none;
}

.free-roam-radio.loop-active .radio-glass::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 8px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 1px solid rgba(210, 255, 228, 0.72);
    background: radial-gradient(circle at 34% 28%, #ffffff, #35ff95 42%, #069b56 100%);
    box-shadow: 0 0 12px rgba(53, 255, 149, 0.78), 0 0 24px rgba(53, 255, 149, 0.34);
    z-index: 2;
}

.radio-kicker,
.radio-line,
.radio-track-title,
.radio-track-sub,
.radio-actions,
.radio-volume,
.radio-track-list {
    position: relative;
    z-index: 1;
}

.radio-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #7ef4ff;
    font-weight: 1000;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-shadow: 0 0 14px rgba(126, 244, 255, 0.55);
}

.radio-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.radio-now {
    color: rgba(223, 250, 255, 0.82);
    font-size: 0.56rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.radio-symbol {
    display: inline-grid;
    place-items: center;
    position: relative;
    width: 20px;
    height: 18px;
    border-radius: 7px;
    border: 1px solid rgba(191, 247, 255, 0.28);
    background: linear-gradient(145deg, rgba(126, 244, 255, 0.12), rgba(255, 255, 255, 0.035));
    filter: drop-shadow(0 0 8px rgba(126, 244, 255, 0.22));
}

.radio-symbol::before {
    content: "";
    width: 13px;
    height: 8px;
    border: 1px solid rgba(126, 244, 255, 0.88);
    border-radius: 2px;
    background:
        linear-gradient(90deg, rgba(126, 244, 255, 0.72) 0 2px, transparent 2px 4px, rgba(255, 96, 218, 0.9) 4px 6px, transparent 6px),
        rgba(126, 244, 255, 0.10);
    box-shadow: inset 0 -2px 0 rgba(126, 244, 255, 0.18);
}

.radio-symbol::after {
    content: "";
    position: absolute;
    right: 3px;
    top: 1px;
    width: 8px;
    height: 1px;
    border-radius: 999px;
    background: rgba(191, 247, 255, 0.86);
    transform: rotate(-28deg);
    transform-origin: right center;
}

.radio-track-title {
    color: #ffffff;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-size: 1.03rem;
    font-weight: 1000;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 rgba(28, 6, 93, 0.75),
        0 0 14px color-mix(in srgb, var(--radio-color, #37f7ff) 76%, transparent),
        0 0 28px color-mix(in srgb, var(--radio-color, #37f7ff) 44%, transparent);
}

.radio-style-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--radio-color, #37f7ff) 70%, white 10%);
    background: color-mix(in srgb, var(--radio-color, #37f7ff) 18%, transparent);
    color: #f8fbff;
    box-shadow: 0 0 12px color-mix(in srgb, var(--radio-color, #37f7ff) 34%, transparent);
    font-size: 0.68rem;
    font-weight: 1000;
    white-space: nowrap;
}

.radio-track-sub {
    margin-top: -1px;
    color: rgba(177, 206, 218, 0.48);
    font-size: 0.48rem;
    font-weight: 800;
    text-align: right;
}

.radio-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}

.free-roam-radio:not(.open) .radio-actions,
.free-roam-radio:not(.open) .radio-volume,
.free-roam-radio:not(.open) .radio-track-list {
    display: none !important;
}

.radio-actions button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(72, 226, 255, 0.45);
    border-radius: 999px;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.26), transparent 22%),
        linear-gradient(145deg, rgba(117, 44, 210, 0.92), rgba(22, 176, 219, 0.70));
    color: #f8fbff;
    box-shadow: 0 0 14px rgba(37, 226, 255, 0.20), inset 0 2px 0 rgba(255, 255, 255, 0.18);
    font-weight: 1000;
    font-size: 1rem;
    cursor: pointer;
}

#radio-loop-toggle.active {
    border-color: rgba(53, 255, 149, 0.74);
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
        linear-gradient(145deg, rgba(20, 150, 96, 0.95), rgba(53, 255, 149, 0.62));
    color: #eafff3;
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.18);
}

.radio-actions button:hover {
    transform: translateY(-1px) scale(1.03);
    border-color: rgba(255, 96, 218, 0.62);
    box-shadow: 0 0 22px rgba(255, 96, 218, 0.25), 0 0 18px rgba(37, 226, 255, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.24);
}

.radio-volume {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: rgba(223, 250, 255, 0.72);
    font-size: 0.56rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.radio-volume input {
    width: 100%;
    accent-color: #37f7ff;
}

.radio-track-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    max-height: none;
    overflow: visible;
}

.radio-track-list.hidden {
    display: none !important;
}

.radio-track-option {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    padding: 4px 6px;
    border: 1px solid rgba(94, 234, 255, 0.30);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    color: #f8fbff;
    text-align: left;
    cursor: pointer;
}

.radio-track-option.active {
    border-color: rgba(53, 255, 149, 0.62);
    box-shadow: 0 0 18px rgba(53, 255, 149, 0.22), inset 0 0 18px rgba(53, 255, 149, 0.08);
}

.radio-track-option.locked {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.35);
}

.radio-track-option .radio-style-badge {
    grid-column: auto;
    justify-self: end;
}

.radio-track-icon {
    width: 30px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.34), transparent 22%),
        linear-gradient(145deg, var(--radio-color, #37f7ff), rgba(117, 44, 210, 0.70));
    font-weight: 1000;
    font-size: 0.52rem;
    box-shadow: 0 0 14px color-mix(in srgb, var(--radio-color, #37f7ff) 38%, transparent);
}

.radio-track-name {
    font-weight: 1000;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.shop-card-new>div:first-child {
    width: 66px !important;
    height: 66px !important;
    margin: 0 auto 8px !important;
}

body.game-running .hud-top-row {
    position: absolute !important;
    top: 24px !important;
    left: 30px !important;
    right: 292px !important;
    width: auto !important;
    display: grid !important;
    grid-template-columns: minmax(200px, 250px) 22px minmax(280px, max-content) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
}

body.game-running #health-display {
    min-width: 0 !important;
    max-width: 250px !important;
    width: 250px !important;
    padding: 9px 13px 11px !important;
}

body.game-running .hud-center {
    grid-column: 3;
    justify-self: start;
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

body.game-running #wave-display,
body.game-running #score-display,
body.game-running #time-display {
    min-width: 160px;
    white-space: nowrap;
}

body.game-running #time-display {
    min-width: 210px;
    color: var(--success) !important;
}

body.game-running .free-roam-radar {
    top: 24px !important;
    right: 30px !important;
}

body.game-running #announcement-layer {
    top: 132px !important;
}

.difficulty-card.hard {
    border-color: rgba(255, 62, 86, 0.70) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.028)),
        radial-gradient(circle at 50% -10%, rgba(255, 62, 86, 0.32), transparent 42%),
        linear-gradient(145deg, rgba(112, 10, 26, 0.84), rgba(38, 9, 25, 0.92)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 20px 44px rgba(0, 0, 0, 0.34),
        0 0 28px rgba(255, 62, 86, 0.20) !important;
}

.difficulty-card.hard:hover {
    border-color: rgba(255, 126, 142, 0.92) !important;
    box-shadow:
        0 22px 52px rgba(0, 0, 0, 0.42),
        0 0 34px rgba(255, 62, 86, 0.38) !important;
}

.difficulty-card.hard .difficulty-tag {
    background: linear-gradient(135deg, #ffedf0, #ff3e56, #b90f2a) !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(255, 62, 86, 0.52) !important;
}

@media (max-width: 720px) {
    body.game-running .hud-top-row {
        top: 12px !important;
        left: 10px !important;
        right: 150px !important;
        grid-template-columns: minmax(112px, 138px) minmax(96px, 1fr) !important;
        gap: 6px !important;
    }

    body.game-running .hud-center {
        grid-column: 2;
        grid-area: auto;
        flex-direction: column;
        gap: 6px;
    }

    body.game-running #health-display {
        grid-column: 1;
        grid-area: auto;
    }

    body.game-running #wave-display,
    body.game-running #score-display,
    body.game-running #time-display {
        min-width: 0;
        width: 100%;
        text-align: right;
    }

    body.game-running .free-roam-radar {
        top: 12px !important;
        right: 10px !important;
        transform: scale(0.58);
        transform-origin: top right;
    }

    body.game-running #announcement-layer {
        top: 118px !important;
        width: min(420px, calc(100vw - 150px)) !important;
        font-size: clamp(0.9rem, 3vw, 1.35rem) !important;
    }
}

.disabled-card {
    position: relative;
    opacity: 0.65;
    cursor: not-allowed;
    overflow: hidden;
}

.disabled-card:hover {
    transform: none !important;
    box-shadow: inherit !important;
}

.disabled-card * {
    pointer-events: none;
}

.coming-soon-badge {
    position: absolute;
    top: 12px;
    right: -40px;
    width: 150px;
    text-align: center;
    padding: 4px 0;
    background: #ff9800;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    transform: rotate(35deg);
    z-index: 3;
}

.disabled-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.2rem;
    font-weight: 700;
    color: white;

    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);

    z-index: 2;
}

/* Empty lobby rebuild */
#main-menu.screen.lobby-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(3, 6, 18, 0.18), rgba(4, 7, 22, 0.28)),
        url("../lobby_achtergrond.png") center center / cover no-repeat !important;
    backdrop-filter: none !important;
}

#main-menu.screen.lobby-empty::before,
#main-menu.screen.lobby-empty::after {
    display: none !important;
    content: none !important;
}

#main-menu.screen.lobby-empty .lobby-bg-video {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    background: #02020a;
}

body.lobby-bg-image-mode #main-menu.screen.lobby-empty .lobby-bg-video {
    display: none !important;
}

body:has(#main-menu.lobby-empty:not(.hidden))::before,
body:has(#main-menu.lobby-empty:not(.hidden))::after {
    display: none !important;
}

body:has(#main-menu.lobby-empty:not(.hidden)) .menu-nav-btn,
body:has(#main-menu.lobby-empty:not(.hidden)) .cinematic-bar {
    display: none !important;
}

#main-menu.screen.lobby-empty .lobby-data-hooks {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

#main-menu.screen.lobby-empty .lobby-ship-stage {
    position: relative;
    z-index: 2;
    width: clamp(260px, 36vw, 560px);
    aspect-ratio: 1.35;
    display: grid;
    place-items: center;
    animation: lobbyShipHover 4.8s ease-in-out infinite;
}

#main-menu.screen.lobby-empty .lobby-ship-trail {
    position: absolute;
    left: 54%;
    top: 22%;
    width: 74%;
    height: 38%;
    transform: rotate(-22deg);
    transform-origin: left center;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0%, rgba(68, 218, 255, 0.62) 12%, rgba(111, 84, 255, 0.46) 42%, rgba(185, 63, 255, 0.18) 72%, transparent 100%);
    filter: blur(12px);
    opacity: 0.86;
    mix-blend-mode: screen;
    animation: lobbyTrailPulse 2.8s ease-in-out infinite;
}

#main-menu.screen.lobby-empty .lobby-ship-trail::before,
#main-menu.screen.lobby-empty .lobby-ship-trail::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(50, 221, 255, 0.72) 18%, rgba(93, 95, 255, 0.48) 54%, transparent 100%);
    filter: blur(3px);
}

#main-menu.screen.lobby-empty .lobby-ship-trail::before {
    top: 12%;
    height: 22%;
    transform: translateY(-8px) rotate(-6deg);
}

#main-menu.screen.lobby-empty .lobby-ship-trail::after {
    top: 58%;
    height: 18%;
    transform: translateY(6px) rotate(5deg);
    opacity: 0.92;
}

#main-menu.screen.lobby-empty .lobby-center-ship {
    position: relative;
    z-index: 2;
    width: min(100%, 520px);
    height: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 18px 22px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 20px rgba(96, 151, 255, 0.52))
        drop-shadow(0 0 38px rgba(158, 74, 255, 0.42));
    transform: translateZ(0);
}

@keyframes lobbyShipHover {
    0%,
    100% {
        transform: translate3d(0, -10px, 0) rotate(-1deg);
    }

    50% {
        transform: translate3d(0, 14px, 0) rotate(1.1deg);
    }
}

@keyframes lobbyTrailPulse {
    0%,
    100% {
        opacity: 0.56;
        transform: rotate(-22deg) scaleX(0.88) scaleY(0.76);
    }

    50% {
        opacity: 0.95;
        transform: rotate(-22deg) scaleX(1.08) scaleY(1);
    }
}

@media (max-width: 720px) {
    #main-menu.screen.lobby-empty {
        background-position: center center !important;
    }

    #main-menu.screen.lobby-empty .lobby-ship-stage {
        width: min(76vw, 360px);
    }

}

/* Cosmic Survivor lobby overlay */
#main-menu.screen.lobby-empty {
    --lobby-cyan: #20d9ff;
    --lobby-blue: #1685ff;
    --lobby-purple: #9b35ff;
    --lobby-pink: #ff45d8;
    --lobby-green: #74ff9d;
    --lobby-gold: #ffd23e;
    --lobby-ink: rgba(3, 4, 22, 0.86);
    --lobby-panel: rgba(13, 8, 43, 0.78);
    color: #f8fbff;
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

#main-menu.screen.lobby-empty button {
    font: inherit;
}

#main-menu.screen.lobby-empty .lobby-player-card,
#main-menu.screen.lobby-empty .lobby-top-stats,
#main-menu.screen.lobby-empty .lobby-system-actions,
#main-menu.screen.lobby-empty .lobby-logo,
#main-menu.screen.lobby-empty .lobby-ship-arrow,
#main-menu.screen.lobby-empty .lobby-left-stack,
#main-menu.screen.lobby-empty .lobby-right-stack,
#main-menu.screen.lobby-empty .lobby-play-button {
    position: absolute !important;
    z-index: 5 !important;
}

#main-menu.screen.lobby-empty .lobby-player-card,
#main-menu.screen.lobby-empty .lobby-stat-card,
#main-menu.screen.lobby-empty .lobby-square-btn,
#main-menu.screen.lobby-empty .lobby-side-card,
#main-menu.screen.lobby-empty .lobby-shop-card,
#main-menu.screen.lobby-empty .lobby-battle-pass,
#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ship-arrow {
    appearance: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
}

#main-menu.screen.lobby-empty .lobby-player-card,
#main-menu.screen.lobby-empty .lobby-stat-card,
#main-menu.screen.lobby-empty .lobby-side-card,
#main-menu.screen.lobby-empty .lobby-shop-card,
#main-menu.screen.lobby-empty .lobby-battle-pass {
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 38%),
        radial-gradient(circle at 8% 14%, rgba(118, 255, 221, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(21, 10, 66, 0.92), rgba(4, 5, 28, 0.88));
    box-shadow:
        0 0 0 1px rgba(195, 74, 255, 0.68),
        0 0 20px rgba(176, 61, 255, 0.22),
        inset 0 0 24px rgba(118, 46, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    clip-path: polygon(5% 0, 74% 0, 77% 4%, 92% 4%, 100% 20%, 100% 84%, 92% 100%, 6% 100%, 0 86%, 0 12%);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

#main-menu.screen.lobby-empty .lobby-player-card::before,
#main-menu.screen.lobby-empty .lobby-stat-card::before,
#main-menu.screen.lobby-empty .lobby-side-card::before,
#main-menu.screen.lobby-empty .lobby-shop-card::before,
#main-menu.screen.lobby-empty .lobby-battle-pass::before,
#main-menu.screen.lobby-empty .lobby-play-button::before {
    content: "";
    position: absolute;
    inset: 7px;
    z-index: -1;
    clip-path: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.10), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.08)),
        rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

#main-menu.screen.lobby-empty .lobby-player-card:hover,
#main-menu.screen.lobby-empty .lobby-stat-card:hover,
#main-menu.screen.lobby-empty .lobby-side-card:hover,
#main-menu.screen.lobby-empty .lobby-shop-card:hover,
#main-menu.screen.lobby-empty .lobby-battle-pass:hover {
    transform: translateY(-3px);
    filter: brightness(1.12) saturate(1.08);
    box-shadow:
        0 0 0 1px rgba(255, 122, 245, 0.86),
        0 0 26px rgba(255, 69, 216, 0.30),
        inset 0 0 28px rgba(32, 217, 255, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#main-menu.screen.lobby-empty .lobby-player-card {
    left: clamp(18px, 1.9vw, 34px);
    top: clamp(18px, 4.1vh, 40px);
    width: clamp(350px, 25.5vw, 430px);
    height: clamp(250px, 28.8vh, 274px);
    display: grid;
    grid-template-columns: 128px 1fr 36px;
    grid-template-rows: 94px 70px 38px;
    gap: 10px 14px;
    padding: 18px 18px 16px;
    text-align: left;
}

#main-menu.screen.lobby-empty .lobby-avatar-frame {
    grid-row: 1 / 3;
    width: 124px;
    height: 146px;
    align-self: start;
    display: grid;
    place-items: center;
    overflow: hidden;
    clip-path: polygon(16% 0, 88% 0, 100% 16%, 100% 82%, 86% 100%, 0 100%, 0 13%);
    background:
        radial-gradient(circle at 65% 20%, rgba(255, 255, 255, 0.34), transparent 20%),
        linear-gradient(145deg, rgba(24, 168, 255, 0.34), rgba(141, 42, 255, 0.26));
    box-shadow:
        0 0 0 2px rgba(32, 217, 255, 0.74),
        inset 0 0 26px rgba(32, 217, 255, 0.16);
}

#main-menu.screen.lobby-empty .lobby-avatar-img {
    width: 132%;
    height: 132%;
    object-fit: cover;
    object-position: center 42%;
    filter: drop-shadow(0 0 18px rgba(116, 76, 255, 0.70));
}

#main-menu.screen.lobby-empty .lobby-player-meta {
    display: grid;
    align-content: center;
    min-width: 0;
}

#main-menu.screen.lobby-empty .lobby-username {
    color: #ffffff;
    font-size: clamp(1.45rem, 1.75vw, 2rem);
    font-weight: 1000;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.28);
}

#main-menu.screen.lobby-empty .lobby-rank-label {
    margin-top: 8px;
    color: #ff61ff;
    font-size: clamp(0.86rem, 1vw, 1.05rem);
    font-style: italic;
    font-weight: 1000;
    line-height: 1.15;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 69, 216, 0.58);
}

#main-menu.screen.lobby-empty .lobby-auth-state {
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

#main-menu.screen.lobby-empty .lobby-edit-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    justify-self: end;
    color: #ffffff;
    border: 1px solid rgba(255, 117, 255, 0.78);
    clip-path: polygon(18% 0, 100% 0, 100% 74%, 76% 100%, 0 100%, 0 18%);
    background: rgba(28, 7, 70, 0.72);
    box-shadow: inset 0 0 16px rgba(255, 69, 216, 0.20);
}

#main-menu.screen.lobby-empty .lobby-rank-row {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 9px;
    transform: translateX(-8px);
}

#main-menu.screen.lobby-empty .lobby-rank-emblem {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    filter:
        drop-shadow(0 0 12px var(--rank-glow, rgba(255, 209, 102, 0.62)))
        drop-shadow(0 0 22px rgba(134, 68, 255, 0.56));
}

#main-menu.screen.lobby-empty .lobby-rank-emblem img {
    width: 112%;
    height: 112%;
    object-fit: contain;
}

#main-menu.screen.lobby-empty .lobby-level-track,
#main-menu.screen.lobby-empty .lobby-xp-progress,
#main-menu.screen.lobby-empty .lobby-battle-progress {
    position: relative;
    overflow: hidden;
    height: 24px;
    border: 1px solid rgba(170, 78, 255, 0.74);
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
    background: rgba(6, 8, 28, 0.82);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55);
}

#main-menu.screen.lobby-empty .lobby-level-fill {
    display: block;
    width: 76%;
    height: 100%;
    background: linear-gradient(90deg, #ff2ee8 0 24%, #ffb300 45%, #1bdcff 100%);
    box-shadow: 0 0 16px rgba(255, 62, 220, 0.54);
}

#main-menu.screen.lobby-empty .lobby-level-badge {
    height: 40px;
    min-width: 48px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 1000;
    font-style: italic;
    border: 1px solid rgba(209, 94, 255, 0.92);
    clip-path: polygon(18% 0, 100% 0, 88% 100%, 0 100%);
    background: rgba(42, 12, 78, 0.88);
}

#main-menu.screen.lobby-empty .lobby-trophy-line {
    grid-column: 1 / 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--lobby-gold);
    font-size: 1.42rem;
    font-weight: 1000;
}

#main-menu.screen.lobby-empty .lobby-mini-trophy {
    font-size: 1.55rem;
    filter: drop-shadow(0 0 10px rgba(255, 210, 62, 0.74));
}

#main-menu.screen.lobby-empty .lobby-xp-progress {
    grid-column: 2 / 4;
    align-self: center;
    height: 28px;
    display: grid;
    grid-template-columns: 48% 1fr;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 900;
}

#main-menu.screen.lobby-empty .lobby-xp-fill {
    display: grid;
    place-items: center;
    background: linear-gradient(90deg, #a827ff, #7424ff);
    text-shadow: 0 0 9px rgba(255, 255, 255, 0.42);
}

#main-menu.screen.lobby-empty .lobby-xp-max {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.90);
}

#main-menu.screen.lobby-empty .lobby-top-stats {
    top: clamp(22px, 4.8vh, 46px);
    left: clamp(430px, 29.4vw, 492px);
    right: clamp(300px, 19vw, 330px);
    display: grid;
    grid-template-columns: repeat(4, minmax(118px, 1fr));
    gap: clamp(10px, 1vw, 16px);
    align-items: start;
}

#main-menu.screen.lobby-empty .lobby-stat-card {
    min-width: 0;
    height: 72px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-align: left;
    clip-path: polygon(10% 0, 94% 0, 100% 18%, 100% 82%, 92% 100%, 8% 100%, 0 82%, 0 18%);
}

#main-menu.screen.lobby-empty .lobby-stat-card.coins {
    box-shadow: 0 0 0 1px rgba(32, 217, 255, 0.75), 0 0 18px rgba(32, 217, 255, 0.18), inset 0 0 22px rgba(32, 217, 255, 0.10);
}

#main-menu.screen.lobby-empty .lobby-stat-card.score {
    box-shadow: 0 0 0 1px rgba(32, 217, 255, 0.75), 0 0 18px rgba(32, 217, 255, 0.18), inset 0 0 22px rgba(32, 217, 255, 0.10);
}

#main-menu.screen.lobby-empty .lobby-stat-card.xp {
    box-shadow: 0 0 0 1px rgba(255, 69, 216, 0.74), 0 0 18px rgba(255, 69, 216, 0.18), inset 0 0 22px rgba(255, 69, 216, 0.10);
}

#main-menu.screen.lobby-empty .lobby-stat-card.virus {
    box-shadow: 0 0 0 1px rgba(116, 255, 157, 0.68), 0 0 18px rgba(116, 255, 157, 0.14), inset 0 0 22px rgba(116, 255, 157, 0.09);
}

#main-menu.screen.lobby-empty .lobby-stat-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

#main-menu.screen.lobby-empty .lobby-stat-icon.image-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 210, 62, 0.62));
}

#main-menu.screen.lobby-empty .lobby-stat-card.score .image-icon img {
    filter: drop-shadow(0 0 10px rgba(255, 210, 62, 0.70));
}

#main-menu.screen.lobby-empty .lobby-stat-label {
    display: block;
    margin-bottom: 1px;
    color: #21efff;
    font-size: 0.72rem;
    font-style: italic;
    font-weight: 1000;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(32, 217, 255, 0.52);
}

#main-menu.screen.lobby-empty .lobby-stat-card.xp .lobby-stat-label {
    color: #ff5ce5;
    text-shadow: 0 0 10px rgba(255, 69, 216, 0.54);
}

#main-menu.screen.lobby-empty .lobby-stat-card.virus .lobby-stat-label {
    color: var(--lobby-green);
    text-shadow: 0 0 10px rgba(116, 255, 157, 0.44);
}

#main-menu.screen.lobby-empty .lobby-stat-card strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.05rem, 1.35vw, 1.55rem);
    font-weight: 900;
    line-height: 1.05;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.22);
}

#main-menu.screen.lobby-empty .hex-icon {
    color: #e4c4ff;
    font-size: 1rem;
    font-weight: 1000;
    clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%);
    border: 3px solid #bd5cff;
    background: rgba(60, 18, 108, 0.72);
    box-shadow: 0 0 14px rgba(189, 92, 255, 0.62), inset 0 0 14px rgba(255, 255, 255, 0.08);
}

#main-menu.screen.lobby-empty .virus-icon {
    position: relative;
    width: 48px;
    height: 48px;
    border: 3px solid rgba(116, 255, 157, 0.82);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(116, 255, 157, 0.45), inset 0 0 14px rgba(116, 255, 157, 0.16);
}

#main-menu.screen.lobby-empty .virus-icon::before,
#main-menu.screen.lobby-empty .virus-icon::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px dotted rgba(116, 255, 157, 0.82);
    border-radius: 50%;
}

#main-menu.screen.lobby-empty .virus-icon::after {
    inset: -8px;
    border-style: dashed;
    opacity: 0.72;
}

#main-menu.screen.lobby-empty .lobby-system-actions {
    top: clamp(20px, 4.7vh, 44px);
    right: clamp(20px, 2.4vw, 40px);
    display: flex;
    gap: clamp(10px, 1.4vw, 20px);
}

#main-menu.screen.lobby-empty .lobby-square-btn {
    position: relative;
    width: clamp(62px, 4.95vw, 82px);
    height: clamp(62px, 4.95vw, 82px);
    display: grid;
    place-items: center;
    color: #8dc6ff;
    font-size: clamp(1.72rem, 2.4vw, 2.6rem);
    font-weight: 1000;
    clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(2, 8, 34, 0.76);
    box-shadow:
        0 0 0 1px rgba(32, 217, 255, 0.76),
        0 0 16px rgba(32, 217, 255, 0.20),
        inset 0 0 18px rgba(32, 217, 255, 0.10);
    text-shadow: 0 0 16px rgba(58, 151, 255, 0.72);
    transition: transform 0.18s ease, filter 0.18s ease;
}

#main-menu.screen.lobby-empty .lobby-square-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}

#main-menu.screen.lobby-empty .lobby-square-btn.mail {
    color: #90bfff;
}

#main-menu.screen.lobby-empty .lobby-notification {
    position: absolute;
    right: -9px;
    top: -10px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 1000;
    border-radius: 50%;
    background: #ff3c88;
    box-shadow: 0 0 12px rgba(255, 60, 136, 0.72);
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

#main-menu.screen.lobby-empty .lobby-notification:hover {
    transform: translateY(-2px) scale(1.06);
    filter: brightness(1.12);
}

#main-menu.screen.lobby-empty .lobby-notification[hidden] {
    display: none;
}

#main-menu.screen.lobby-empty .lobby-logo {
    top: clamp(118px, 16.4vh, 162px);
    left: 50%;
    width: min(560px, 39vw);
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    text-align: center;
    pointer-events: none;
    text-transform: uppercase;
}

#main-menu.screen.lobby-empty .lobby-logo::before,
#main-menu.screen.lobby-empty .lobby-logo::after {
    content: "";
    position: absolute;
    top: 34%;
    width: 76px;
    height: 54px;
    background:
        linear-gradient(19deg, transparent 0 36%, #1c8cff 37% 58%, transparent 59%),
        linear-gradient(0deg, transparent 0 54%, #21e1ff 55% 72%, transparent 73%),
        linear-gradient(-19deg, transparent 0 38%, #1e63ff 39% 60%, transparent 61%);
    filter: drop-shadow(0 0 13px rgba(32, 217, 255, 0.62));
}

#main-menu.screen.lobby-empty .lobby-logo::before {
    left: -72px;
    transform: scaleX(-1);
}

#main-menu.screen.lobby-empty .lobby-logo::after {
    right: -72px;
}

#main-menu.screen.lobby-empty .lobby-logo span,
#main-menu.screen.lobby-empty .lobby-logo strong {
    display: block;
    width: 100%;
    font-family: Impact, "Arial Black", "Trebuchet MS", sans-serif;
    font-style: italic;
    font-weight: 1000;
    line-height: 0.88;
    letter-spacing: 0;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.78);
    filter:
        drop-shadow(0 5px 0 rgba(21, 19, 84, 0.96))
        drop-shadow(0 0 17px rgba(32, 217, 255, 0.55));
}

#main-menu.screen.lobby-empty .lobby-logo span {
    color: #eff8ff;
    font-size: clamp(3.1rem, 5vw, 5.15rem);
    background: linear-gradient(180deg, #ffffff 0%, #d4e7ff 42%, #83b7ff 74%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#main-menu.screen.lobby-empty .lobby-logo strong {
    color: #ff5be8;
    font-size: clamp(3.35rem, 5.6vw, 5.75rem);
    background: linear-gradient(180deg, #ffc7ff 0%, #ff58ef 48%, #a62eff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#main-menu.screen.lobby-empty .lobby-ship-arrow {
    top: 53.8%;
    width: 70px;
    height: 88px;
    display: grid;
    place-items: center;
    color: #5bdcff;
    font-size: clamp(4rem, 5vw, 5.7rem);
    line-height: 1;
    background: transparent;
    text-shadow: 0 0 16px rgba(32, 217, 255, 0.92), 0 0 30px rgba(55, 84, 255, 0.55);
    transform: translateY(-50%);
    transition: transform 0.18s ease, filter 0.18s ease;
}

#main-menu.screen.lobby-empty .lobby-ship-arrow.left {
    left: clamp(390px, 26.4vw, 452px);
}

#main-menu.screen.lobby-empty .lobby-ship-arrow.right {
    right: clamp(390px, 26.4vw, 452px);
}

#main-menu.screen.lobby-empty .lobby-ship-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    filter: brightness(1.2);
}

#main-menu.screen.lobby-empty .lobby-left-stack {
    left: clamp(20px, 2vw, 34px);
    bottom: clamp(42px, 7.6vh, 72px);
    width: clamp(330px, 26.2vw, 440px);
    display: grid;
    gap: clamp(24px, 3.4vh, 34px);
}

#main-menu.screen.lobby-empty .lobby-right-stack {
    right: clamp(22px, 2vw, 36px);
    bottom: clamp(42px, 7.6vh, 72px);
    width: clamp(340px, 25.7vw, 430px);
    display: grid;
    gap: 14px;
}

#main-menu.screen.lobby-empty .lobby-side-card {
    min-height: 104px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    text-align: left;
}

#main-menu.screen.lobby-empty .lobby-side-card strong,
#main-menu.screen.lobby-empty .lobby-shop-card strong,
#main-menu.screen.lobby-empty .lobby-battle-pass strong {
    display: block;
    color: #ffdfff;
    font-size: clamp(1.55rem, 1.9vw, 2.1rem);
    font-style: italic;
    font-weight: 1000;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 13px rgba(255, 190, 255, 0.38);
}

#main-menu.screen.lobby-empty .lobby-side-card small {
    display: block;
    margin-top: 8px;
    color: rgba(226, 243, 255, 0.78);
    font-size: 0.94rem;
    line-height: 1.1;
}

#main-menu.screen.lobby-empty .lobby-card-arrow {
    color: #d57bff;
    font-size: 2.2rem;
    font-weight: 1000;
    text-shadow: 0 0 12px rgba(213, 123, 255, 0.68);
}

#main-menu.screen.lobby-empty .lobby-side-icon {
    display: grid;
    place-items: center;
    font-size: 2.25rem;
}

#main-menu.screen.lobby-empty .lobby-side-icon.trophy {
    color: var(--lobby-gold);
    filter: drop-shadow(0 0 12px rgba(255, 210, 62, 0.76));
}

#main-menu.screen.lobby-empty .lobby-side-icon.clipboard {
    color: #7ddfff;
    filter: drop-shadow(0 0 12px rgba(32, 217, 255, 0.62));
}

#main-menu.screen.lobby-empty .lobby-side-card.quests {
    box-shadow: 0 0 0 1px rgba(32, 156, 255, 0.74), 0 0 18px rgba(32, 156, 255, 0.18), inset 0 0 22px rgba(32, 156, 255, 0.10);
}

#main-menu.screen.lobby-empty .lobby-side-card.quests strong {
    color: #8ee7ff;
}

#main-menu.screen.lobby-empty .lobby-shop-card {
    min-height: clamp(168px, 22.5vh, 212px);
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
    text-align: left;
    clip-path: polygon(9% 0, 97% 0, 100% 11%, 82% 88%, 75% 100%, 6% 100%, 0 84%, 0 22%);
    box-shadow: 0 0 0 2px rgba(22, 135, 255, 0.92), 0 0 24px rgba(22, 135, 255, 0.28), inset 0 0 28px rgba(22, 135, 255, 0.12);
}

#main-menu.screen.lobby-empty .lobby-cart-icon {
    color: #92ccff;
    font-size: clamp(4.2rem, 6vw, 6.1rem);
    line-height: 1;
    filter: drop-shadow(0 0 16px rgba(84, 165, 255, 0.70));
}

#main-menu.screen.lobby-empty .lobby-shop-card strong {
    color: #d7efff;
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    letter-spacing: 0.05em;
}

#main-menu.screen.lobby-empty .lobby-free-ribbon,
#main-menu.screen.lobby-empty .lobby-new-ribbon {
    position: absolute;
    right: -2px;
    top: 0;
    min-width: 94px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.08rem;
    font-style: italic;
    font-weight: 1000;
    text-transform: uppercase;
    clip-path: polygon(14% 0, 100% 0, 82% 100%, 0 100%);
    background: linear-gradient(135deg, #0d88ff, #3e62ff);
    box-shadow: 0 0 14px rgba(22, 135, 255, 0.58);
}

#main-menu.screen.lobby-empty .lobby-new-ribbon {
    background: linear-gradient(135deg, #ff61e8, #bc168f);
    box-shadow: 0 0 14px rgba(255, 69, 216, 0.58);
}

#main-menu.screen.lobby-empty .lobby-battle-pass {
    min-height: 160px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 18px 26px;
    text-align: left;
    box-shadow: 0 0 0 1px rgba(255, 69, 216, 0.80), 0 0 22px rgba(255, 69, 216, 0.24), inset 0 0 26px rgba(160, 42, 255, 0.12);
}

#main-menu.screen.lobby-empty .lobby-battle-emblem {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 0 16px rgba(255, 210, 62, 0.56));
}

#main-menu.screen.lobby-empty .lobby-battle-emblem img {
    width: 116%;
    height: 116%;
    object-fit: contain;
}

#main-menu.screen.lobby-empty .lobby-battle-copy {
    min-width: 0;
}

#main-menu.screen.lobby-empty .lobby-battle-copy strong {
    font-size: clamp(1.75rem, 2.35vw, 2.5rem);
}

#main-menu.screen.lobby-empty .lobby-battle-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    align-items: center;
    height: 26px;
    margin-top: 14px;
}

#main-menu.screen.lobby-empty .lobby-battle-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #8e25ff, #d739ff);
    box-shadow: 0 0 14px rgba(215, 57, 255, 0.55);
}

#main-menu.screen.lobby-empty .lobby-battle-progress em {
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.98rem;
    font-style: normal;
    font-weight: 900;
}

#main-menu.screen.lobby-empty .lobby-play-button {
    left: 50%;
    bottom: clamp(22px, 4.7vh, 44px);
    width: clamp(460px, 35vw, 600px);
    height: clamp(112px, 15vh, 148px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    color: #221447;
    clip-path: polygon(8% 0, 92% 0, 100% 28%, 100% 72%, 92% 100%, 8% 100%, 0 72%, 0 28%);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 34%),
        linear-gradient(135deg, #ffec4d 0%, #ffb325 24%, #ff850f 58%, #ffb126 100%);
    box-shadow:
        0 0 0 4px rgba(255, 70, 226, 0.75),
        0 0 0 9px rgba(71, 18, 111, 0.78),
        0 0 30px rgba(255, 146, 18, 0.62),
        0 0 42px rgba(255, 70, 226, 0.32),
        inset 0 5px 0 rgba(255, 255, 255, 0.42),
        inset 0 -12px 28px rgba(255, 104, 7, 0.34);
    transform: translateX(-50%);
    transition: transform 0.18s ease, filter 0.18s ease;
}

#main-menu.screen.lobby-empty .lobby-play-button::before {
    inset: 10px 14px;
    border-color: rgba(255, 255, 255, 0.24);
    background: transparent;
}

#main-menu.screen.lobby-empty .lobby-play-button span {
    font-size: clamp(2.6rem, 4.3vw, 4.35rem);
    line-height: 1;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.18));
}

#main-menu.screen.lobby-empty .lobby-play-button strong {
    color: #1c0c45;
    font-family: Impact, "Arial Black", "Trebuchet MS", sans-serif;
    font-size: clamp(4rem, 7vw, 7rem);
    font-style: italic;
    font-weight: 1000;
    line-height: 0.9;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 4px 0 rgba(255, 255, 255, 0.16);
}

#main-menu.screen.lobby-empty .lobby-play-button:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.015);
    filter: brightness(1.08) saturate(1.08);
}

@media (max-width: 1500px) {
    #main-menu.screen.lobby-empty .lobby-logo::before,
    #main-menu.screen.lobby-empty .lobby-logo::after {
        display: none;
    }
}

@media (max-width: 1320px) {
    #main-menu.screen.lobby-empty .lobby-top-stats {
        grid-template-columns: repeat(2, minmax(135px, 1fr));
        right: clamp(180px, 17vw, 228px);
    }

    #main-menu.screen.lobby-empty .lobby-stat-card {
        height: 58px;
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 8px 12px;
    }

    #main-menu.screen.lobby-empty .lobby-stat-icon,
    #main-menu.screen.lobby-empty .lobby-stat-icon.image-icon img {
        width: 36px;
        height: 36px;
    }

    #main-menu.screen.lobby-empty .lobby-stat-card strong {
        font-size: 1.05rem;
    }

    #main-menu.screen.lobby-empty .lobby-logo {
        top: 18.8vh;
        width: min(480px, 38vw);
    }

    #main-menu.screen.lobby-empty .lobby-left-stack {
        width: 330px;
    }

    #main-menu.screen.lobby-empty .lobby-right-stack {
        width: 340px;
    }

    #main-menu.screen.lobby-empty .lobby-play-button {
        width: 430px;
        height: 110px;
    }

    #main-menu.screen.lobby-empty .lobby-ship-arrow.left {
        left: 30vw;
    }

    #main-menu.screen.lobby-empty .lobby-ship-arrow.right {
        right: 30vw;
    }
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty {
        display: block;
        overflow-y: auto;
        padding: 12px;
    }

    #main-menu.screen.lobby-empty .lobby-player-card,
    #main-menu.screen.lobby-empty .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-system-actions,
    #main-menu.screen.lobby-empty .lobby-logo,
    #main-menu.screen.lobby-empty .lobby-left-stack,
    #main-menu.screen.lobby-empty .lobby-right-stack,
    #main-menu.screen.lobby-empty .lobby-play-button {
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: min(100%, 540px) !important;
        margin: 12px auto !important;
        transform: none !important;
    }

    #main-menu.screen.lobby-empty .lobby-system-actions {
        width: min(100%, 360px) !important;
        justify-content: center;
    }

    #main-menu.screen.lobby-empty .lobby-top-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #main-menu.screen.lobby-empty .lobby-player-card {
        height: auto;
        min-height: 210px;
    }

    #main-menu.screen.lobby-empty .lobby-logo::before,
    #main-menu.screen.lobby-empty .lobby-logo::after,
    #main-menu.screen.lobby-empty .lobby-ship-arrow {
        display: none;
    }

    #main-menu.screen.lobby-empty .lobby-ship-stage {
        margin: 10px auto 0;
    }

    #main-menu.screen.lobby-empty .lobby-left-stack,
    #main-menu.screen.lobby-empty .lobby-right-stack {
        display: grid;
        gap: 12px;
    }

    #main-menu.screen.lobby-empty .lobby-play-button:hover {
        transform: none;
    }
}

@media (max-width: 560px) {
    #main-menu.screen.lobby-empty .lobby-player-card {
        grid-template-columns: 92px minmax(0, 1fr) 28px;
        grid-template-rows: auto auto auto;
        gap: 8px;
        padding: 14px;
        clip-path: polygon(6% 0, 92% 0, 100% 12%, 100% 88%, 94% 100%, 6% 100%, 0 88%, 0 12%);
    }

    #main-menu.screen.lobby-empty .lobby-avatar-frame {
        width: 88px;
        height: 106px;
    }

    #main-menu.screen.lobby-empty .lobby-rank-row {
        grid-column: 1 / 4;
        grid-template-columns: 62px minmax(0, 1fr) 42px;
        transform: none;
    }

    #main-menu.screen.lobby-empty .lobby-rank-emblem {
        width: 62px;
        height: 62px;
    }

    #main-menu.screen.lobby-empty .lobby-trophy-line {
        grid-column: 1 / 2;
        font-size: 1rem;
    }

    #main-menu.screen.lobby-empty .lobby-xp-progress {
        grid-column: 2 / 4;
        font-size: 0.78rem;
    }

    #main-menu.screen.lobby-empty .lobby-top-stats {
        grid-template-columns: 1fr;
    }

    #main-menu.screen.lobby-empty .lobby-side-card,
    #main-menu.screen.lobby-empty .lobby-battle-pass {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    #main-menu.screen.lobby-empty .lobby-card-arrow {
        display: none;
    }

    #main-menu.screen.lobby-empty .lobby-shop-card {
        grid-template-columns: 80px 1fr;
        min-height: 122px;
    }

    #main-menu.screen.lobby-empty .lobby-cart-icon {
        font-size: 3.3rem;
    }

    #main-menu.screen.lobby-empty .lobby-battle-emblem {
        width: 64px;
        height: 64px;
    }

    #main-menu.screen.lobby-empty .lobby-play-button {
        height: 92px !important;
        gap: 14px;
    }
}

/* Fixed design canvas keeps the lobby controls in the same spots as the reference image. */
#main-menu.screen.lobby-empty .lobby-ui-canvas {
    position: absolute !important;
    left: 50%;
    top: 50%;
    z-index: 5 !important;
    width: 1672px;
    height: 941px;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(var(--lobby-ui-scale, 1));
    transform-origin: center center;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas > * {
    pointer-events: auto;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card {
    left: 32px !important;
    top: 40px !important;
    width: 424px !important;
    height: 272px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
    left: 492px !important;
    right: auto !important;
    top: 46px !important;
    width: auto !important;
    grid-template-columns: 172px 206px 218px 164px !important;
    gap: 14px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card {
    height: 72px !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    padding: 10px 16px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-system-actions {
    top: 44px !important;
    right: 36px !important;
    gap: 20px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-square-btn {
    width: 82px !important;
    height: 82px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo {
    left: 50% !important;
    top: 150px !important;
    width: 560px !important;
    transform: translateX(-50%) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo::before,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo::after {
    display: block;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-ship-arrow {
    top: 512px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-ship-arrow.left {
    left: 452px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-ship-arrow.right {
    left: 1176px !important;
    right: auto !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-left-stack {
    left: 34px !important;
    top: 511px !important;
    bottom: auto !important;
    width: 440px !important;
    gap: 34px !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-right-stack {
    right: 36px !important;
    top: 467px !important;
    bottom: auto !important;
    width: 430px !important;
    gap: 14px !important;
    z-index: 14 !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass {
    position: relative !important;
    z-index: 16 !important;
    pointer-events: auto !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    left: 50% !important;
    bottom: 44px !important;
    width: 600px !important;
    height: 148px !important;
    transform: translateX(-50%) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.015) !important;
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-ui-canvas {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: calc(100% - 48px) !important;
        max-width: 540px;
        margin: 0 auto;
        height: auto !important;
        transform: none !important;
        pointer-events: auto;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-system-actions,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-left-stack,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-right-stack,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        width: 100% !important;
        margin: 12px 0 !important;
        transform: none !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card {
        grid-template-columns: 76px minmax(0, 1fr) 26px !important;
        grid-template-rows: auto auto auto !important;
        gap: 8px !important;
        padding: 12px !important;
        height: auto !important;
        min-height: 210px;
        overflow: hidden;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-avatar-frame {
        width: 76px !important;
        height: 90px !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-rank-row {
        grid-column: 1 / 4 !important;
        grid-template-columns: 52px minmax(0, 1fr) !important;
        gap: 6px !important;
        transform: none !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-rank-emblem {
        width: 52px !important;
        height: 52px !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-level-badge {
        display: none;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-trophy-line {
        font-size: 0.94rem;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-xp-progress {
        grid-template-columns: minmax(0, 1fr) 68px;
        font-size: 0.68rem;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card {
        height: 58px !important;
        grid-template-columns: 40px minmax(0, 1fr) !important;
        padding: 8px 12px !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-icon,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-icon.image-icon img {
        width: 36px;
        height: 36px;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-system-actions {
        width: min(100%, 360px) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-square-btn {
        width: clamp(62px, 20vw, 82px) !important;
        height: clamp(62px, 20vw, 82px) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo::before,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-logo::after {
        display: none;
    }
}

@media (min-width: 761px) {
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card {
        display: block !important;
        left: calc(-14px - var(--lobby-left-edge-offset, 0px)) !important;
        top: 0 !important;
        width: 502px !important;
        height: 206px !important;
        overflow: hidden;
        padding: 0 !important;
        clip-path: polygon(0 0, 100% 0, 100% 72%, 88% 100%, 0 100%);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 38%),
            radial-gradient(circle at 15% 26%, rgba(164, 47, 255, 0.20), transparent 34%),
            linear-gradient(135deg, rgba(22, 11, 66, 0.94), rgba(5, 6, 31, 0.88));
        box-shadow:
            0 0 0 2px rgba(196, 57, 255, 0.82),
            0 0 22px rgba(196, 57, 255, 0.26),
            inset 0 0 32px rgba(112, 54, 255, 0.20),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card::before {
        inset: 8px;
        clip-path: polygon(0 0, 100% 0, 100% 72%, 88% 100%, 0 100%);
        border-color: rgba(204, 84, 255, 0.22);
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.08)),
            rgba(5, 2, 24, 0.12);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card::after {
        content: none;
        display: none;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-card > span {
        position: absolute;
        z-index: 4;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-avatar-frame {
        left: 26px;
        top: 20px;
        width: 132px;
        height: 132px;
        clip-path: polygon(0 0, 88% 0, 100% 14%, 100% 86%, 88% 100%, 0 100%);
        box-shadow:
            0 0 0 2px rgba(43, 202, 255, 0.78),
            0 0 16px rgba(171, 51, 255, 0.28),
            inset 0 0 28px rgba(43, 202, 255, 0.18);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-player-meta {
        left: 178px;
        top: 34px;
        width: 240px;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-username {
        font-size: 1.7rem;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-rank-label {
        margin-top: 8px;
        font-size: 1.03rem;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-edit-icon {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        clip-path: polygon(0 0, 100% 0, 100% 76%, 72% 100%, 0 100%);
        border-color: rgba(255, 81, 238, 0.94);
        background: rgba(43, 8, 79, 0.88);
        box-shadow:
            0 0 13px rgba(255, 81, 238, 0.30),
            inset 0 0 16px rgba(255, 81, 238, 0.22);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-rank-row {
        left: 178px;
        top: 96px;
        width: 286px;
        height: 60px;
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr) 48px;
        align-items: center;
        gap: 10px;
        transform: none;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-rank-emblem {
        width: 58px;
        height: 58px;
        z-index: 5;
        border-radius: 50%;
        background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), rgba(36, 8, 73, 0.12));
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-level-track {
        height: 22px;
        clip-path: polygon(9% 0, 100% 0, 90% 100%, 0 100%);
        border-color: rgba(211, 79, 255, 0.78);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-level-badge {
        height: 38px;
        min-width: 46px;
        font-size: 1.22rem;
        clip-path: polygon(18% 0, 100% 0, 88% 100%, 0 100%);
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-trophy-line {
        left: 34px;
        top: 166px;
        gap: 12px;
        font-size: 1.25rem;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-xp-progress {
        left: 178px;
        top: 170px;
        width: 262px;
        height: 28px;
        grid-template-columns: 48% 1fr;
        font-size: 0.82rem;
    }
}

/* Keep the custom sci-fi lobby PLAY button above older lobby overrides. */
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    left: 50% !important;
    bottom: 20px !important;
    width: 760px !important;
    height: 190px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: visible !important;
    isolation: isolate !important;
    border: 0 !important;
    border-radius: 0 !important;
    clip-path: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateX(-50%) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateX(-50%) translateY(-5px) scale(1.015) !important;
    filter: brightness(1.12) saturate(1.16) !important;
}

#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateX(-50%) translateY(-1px) scale(0.992) !important;
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        width: min(100%, 540px) !important;
        height: auto !important;
        aspect-ratio: 4 / 1 !important;
        margin: 18px auto 20px !important;
        transform: none !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
        transform: translateY(-2px) scale(1.01) !important;
    }

    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
        transform: translateY(1px) scale(0.992) !important;
    }
}

/* Final Virus Universe overrides: keep these below older perk styles. */
.perk-universe-topbar {
    top: 22px !important;
    left: 124px !important;
    right: 28px !important;
    min-height: 86px !important;
    border-color: rgba(255, 47, 82, 0.48) !important;
    background: rgba(4, 8, 24, 0.78) !important;
    box-shadow: none !important;
}

.perk-universe-topbar .btn,
.perk-detail-actions .btn {
    box-shadow: none !important;
}

.perk-info-blob,
.perk-preview-panel,
.perk-current-panel {
    box-shadow: none !important;
}

.perk-info-blob,
.perk-preview-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
        rgba(3, 6, 19, 0.94) !important;
}

.perk-info-blob h2,
.perk-universe-title strong {
    text-shadow: none !important;
}

.perk-universe-title .virus-icon,
.perk-blob-icon {
    box-shadow: none !important;
}

.perk-current-panel {
    inset: 0 !important;
    width: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 76px 34px 28px !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.perk-current-panel.hidden,
.perk-preview-panel.hidden {
    display: none !important;
}

.mini-level-bar span.filled,
.current-perk-row.bender-active {
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .perk-universe-topbar {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        min-height: 0 !important;
    }

    .perk-current-panel {
        padding: 62px 12px 12px !important;
    }
}

/* Chest polish + trophy stat refresh */
#main-menu.screen.lobby-empty .lobby-top-stats,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
    grid-template-columns: repeat(3, minmax(132px, 1fr)) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card.trophies {
    box-shadow: 0 0 0 1px rgba(255, 210, 62, 0.78), 0 0 18px rgba(255, 210, 62, 0.18), inset 0 0 22px rgba(255, 210, 62, 0.10);
}

#main-menu.screen.lobby-empty .lobby-stat-card.trophies .lobby-stat-label {
    color: var(--lobby-gold);
    text-shadow: 0 0 10px rgba(255, 210, 62, 0.54);
}

#main-menu.screen.lobby-empty .lobby-xp-progress.hidden {
    display: none !important;
}

#main-menu.screen.lobby-empty .lobby-stat-icon.trophy-icon {
    color: var(--lobby-gold);
    font-size: 2rem;
    filter: drop-shadow(0 0 12px rgba(255, 210, 62, 0.74));
}

#main-menu.screen.lobby-empty .lobby-side-icon.image-side-icon img,
.perk-universe-virus-img img,
.shop-offer-icon img,
#quest-side-panel .quest-reward-badge img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(169, 92, 255, 0.54));
}

.perk-universe-virus-img {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
}

#quest-side-panel .quest-reward-badge img {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    vertical-align: -4px;
}

.battlepass-chest-modal {
    background:
        radial-gradient(circle at 50% 46%, rgba(147, 62, 255, 0.42) 0%, rgba(54, 40, 174, 0.44) 31%, rgba(7, 19, 83, 0.94) 68%, rgba(2, 5, 28, 0.99) 100%),
        linear-gradient(135deg, #050b36 0%, #12106d 48%, #2b0f5d 100%) !important;
}

.battlepass-chest-modal.legendary-ready {
    animation: battlepassGoldScene 1.6s ease-in-out infinite alternate;
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 216, 92, 0.56) 0%, rgba(177, 87, 255, 0.38) 34%, rgba(28, 18, 91, 0.94) 68%, rgba(4, 6, 31, 0.99) 100%),
        linear-gradient(135deg, #120a35 0%, #4d248c 46%, #926214 100%) !important;
}

.battlepass-chest-panel {
    background:
        radial-gradient(circle at 50% 45%, rgba(180, 96, 255, 0.38), rgba(62, 55, 205, 0.24) 31%, transparent 58%),
        radial-gradient(circle at 50% 51%, rgba(115, 228, 255, 0.10), transparent 45%),
        linear-gradient(180deg, rgba(7, 13, 64, 0.16), rgba(2, 4, 28, 0.34)) !important;
}

.battlepass-chest-modal.legendary-ready .battlepass-chest-panel {
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 230, 122, 0.48), rgba(188, 96, 255, 0.26) 35%, transparent 62%),
        linear-gradient(180deg, rgba(68, 34, 92, 0.16), rgba(29, 14, 48, 0.34)) !important;
}

.battlepass-bg-pattern {
    inset: -16% !important;
    opacity: 0.52 !important;
    mix-blend-mode: screen;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(192, 220, 255, 0.52) 0 1px, transparent 1.8px),
        radial-gradient(circle, rgba(210, 148, 255, 0.42) 0 1px, transparent 1.6px) !important;
    background-position: 0 0, 36px 28px, 80px 60px !important;
    background-size: 132px 132px, 188px 188px, 248px 248px !important;
    transform: none !important;
    animation: battlepassStarDrift 44s linear infinite !important;
}

.battlepass-chest-title {
    top: clamp(22px, 4.2vh, 46px) !important;
    font-size: clamp(1.2rem, 2.7vw, 2.45rem) !important;
}

.battlepass-chest-stage.reward-lit .chest-open {
    filter:
        blur(1.2px)
        drop-shadow(0 36px 22px rgba(0, 8, 80, 0.22))
        drop-shadow(0 0 34px rgba(174, 82, 255, 0.36)) !important;
}

.battlepass-chest-item-pop::before {
    width: 148% !important;
    height: 148% !important;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.80), rgba(218, 118, 255, 0.64) 25%, rgba(156, 90, 255, 0.34) 54%, transparent 78%) !important;
    filter: blur(10px) !important;
}

.battlepass-chest-item-pop img {
    filter:
        drop-shadow(0 18px 14px rgba(0, 0, 0, 0.20))
        drop-shadow(0 0 24px rgba(218, 118, 255, 0.72)) !important;
}

.battlepass-chest-counter.legendary-ready {
    border-color: rgba(255, 235, 145, 0.92) !important;
    background:
        radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.42), transparent 23%),
        linear-gradient(180deg, rgba(255, 71, 95, 0.98), rgba(196, 24, 46, 0.98) 52%, rgba(108, 9, 28, 0.98)) !important;
    box-shadow:
        0 0 34px rgba(255, 70, 82, 0.72),
        0 0 52px rgba(255, 217, 92, 0.38),
        inset 0 4px 0 rgba(255, 255, 255, 0.24),
        inset 0 -7px 0 rgba(85, 0, 18, 0.28) !important;
    animation: battlepassRareButtonFlash 0.72s ease-in-out infinite !important;
}

.battlepass-reward-row {
    left: 50% !important;
    bottom: clamp(18px, 4vw, 48px) !important;
    width: min(720px, calc(100vw - 420px)) !important;
    min-height: 78px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 10px !important;
    overflow: hidden !important;
    transform: translateX(-50%) !important;
    pointer-events: none;
}

.battlepass-summary-card {
    width: auto !important;
    min-width: 0 !important;
    min-height: 76px;
    border-radius: 8px !important;
}

.battlepass-chest-modal.summary-mode .battlepass-chest-stage {
    animation: battlepassChestOut 0.48s ease both !important;
    pointer-events: none;
}

.battlepass-chest-modal.summary-mode .battlepass-chest-item-pop {
    animation: battlepassItemOut 0.28s ease both !important;
}

.battlepass-chest-modal.summary-mode .battlepass-reward-row {
    top: 50% !important;
    bottom: auto !important;
    width: min(760px, calc(100vw - 36px)) !important;
    min-height: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)) !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: auto;
}

.battlepass-chest-modal.summary-mode .battlepass-summary-card {
    min-height: 88px;
    padding: 12px 14px;
    grid-template-columns: 54px minmax(0, 1fr);
}

.battlepass-chest-modal.summary-mode .battlepass-summary-card img {
    width: 54px;
    height: 54px;
}

.battlepass-stat-counting {
    color: #63ff9d !important;
    text-shadow: 0 0 12px rgba(99, 255, 157, 0.76) !important;
}

.battlepass-stat-plus {
    position: fixed;
    z-index: 23000;
    transform: translateX(-50%);
    color: #63ff9d;
    font-size: 1.1rem;
    font-weight: 1000;
    line-height: 1;
    text-shadow: 0 0 12px rgba(99, 255, 157, 0.82), 0 2px 0 rgba(0, 50, 28, 0.32);
    pointer-events: none;
    animation: battlepassStatPlusFloat 1.25s ease-out forwards;
}

.battlepass-fly-item {
    z-index: 23000;
    filter:
        drop-shadow(0 0 14px rgba(215, 125, 255, 0.78))
        drop-shadow(0 8px 8px rgba(0, 0, 0, 0.24)) !important;
}

@keyframes battlepassStarDrift {
    from { background-position: 0 0, 36px 28px, 80px 60px; }
    to { background-position: 132px 132px, 224px 216px, 328px 308px; }
}

@keyframes battlepassGoldScene {
    from { filter: saturate(1) brightness(1); }
    to { filter: saturate(1.18) brightness(1.08); }
}

@keyframes battlepassRareButtonFlash {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1) saturate(1.05); }
    50% { transform: translateY(-3px) scale(1.045); filter: brightness(1.25) saturate(1.32); }
}

@keyframes battlepassChestOut {
    from { opacity: 1; transform: translateY(-2px) scale(1.01); }
    to { opacity: 0; transform: translateY(28px) scale(0.88); }
}

@keyframes battlepassItemOut {
    from { opacity: 1; transform: translate(-50%, -86%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -96%) scale(0.84); }
}

@keyframes battlepassFlyToStat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.62);
    }
    14% {
        opacity: 1;
        transform: translate(calc(-50% + var(--arc-x, 0px)), calc(-50% - 58px)) scale(1.08);
    }
    74% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        left: var(--to-x);
        top: var(--to-y);
        transform: translate(-50%, -50%) scale(0.28);
    }
}

@keyframes battlepassStatPlusFloat {
    0% { opacity: 0; transform: translate(-50%, 8px) scale(0.92); }
    18% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
    76% { opacity: 1; transform: translate(-50%, -6px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -18px) scale(0.96); }
}

@media (max-width: 760px) {
    .battlepass-reward-row {
        bottom: 78px !important;
        width: calc(100vw - 28px) !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .battlepass-summary-card {
        width: auto !important;
        min-width: 0 !important;
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 7px 8px;
    }

    .battlepass-summary-card img {
        width: 34px;
        height: 34px;
    }

    .battlepass-summary-copy strong {
        font-size: 0.68rem;
    }

    .battlepass-summary-copy span {
        font-size: 0.76rem;
    }

    .battlepass-chest-modal.summary-mode .battlepass-reward-row {
        width: calc(100vw - 24px) !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Trophy road + requested battlepass refinements */
#main-menu.screen.lobby-empty .lobby-top-stats,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
    left: 50% !important;
    right: auto !important;
    top: clamp(18px, 3.8vh, 38px) !important;
    width: min(780px, calc(100vw - 600px)) !important;
    min-width: 610px;
    grid-template-columns: minmax(138px, 0.82fr) minmax(250px, 1.36fr) minmax(138px, 0.82fr) !important;
    transform: translateX(-50%);
}

#main-menu.screen.lobby-empty .lobby-stat-card.trophies,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card.trophies {
    min-width: 230px;
    transform-origin: 50% 0;
}

#main-menu.screen.lobby-empty .lobby-left-stack {
    gap: clamp(12px, 1.7vh, 18px) !important;
}

#main-menu.screen.lobby-empty .lobby-side-card.trophy-road-card {
    min-height: 96px;
    box-shadow: 0 0 0 1px rgba(255, 210, 62, 0.80), 0 0 20px rgba(255, 210, 62, 0.20), inset 0 0 22px rgba(255, 210, 62, 0.10);
}

#main-menu.screen.lobby-empty .lobby-side-card.trophy-road-card strong {
    color: #ffe47a;
}

.battlepass-chest-modal.summary-mode {
    cursor: pointer;
}

.battlepass-chest-modal.summary-mode .battlepass-chest-title {
    top: calc(50% - 190px) !important;
    font-size: clamp(1.28rem, 3vw, 2.65rem) !important;
}

.battlepass-chest-modal.legendary-ready .battlepass-chest-title {
    color: #fff3a8;
    text-shadow: 0 0 26px rgba(255, 210, 92, 0.62), 0 5px 0 rgba(72, 36, 0, 0.18);
}

.battlepass-reward-row,
.battlepass-reward-row .battlepass-summary-card {
    pointer-events: auto;
}

.battlepass-summary-card {
    position: relative;
    overflow: visible !important;
    align-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, min-height 0.2s ease, filter 0.2s ease;
}

.battlepass-summary-card::after {
    content: attr(data-desc);
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 8px);
    z-index: 4;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(244, 250, 255, 0.94);
    background: rgba(4, 7, 31, 0.92);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.30), 0 0 18px var(--loot-glow, rgba(203, 84, 255, 0.28));
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.18;
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.battlepass-summary-card:hover,
.battlepass-summary-card:focus-within {
    z-index: 20;
    min-height: 112px;
    transform: translateY(-12px) scale(1.07);
    filter: brightness(1.08) saturate(1.08);
}

.battlepass-summary-card:hover::after,
.battlepass-summary-card:focus-within::after {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.battlepass-summary-copy strong,
.battlepass-summary-copy span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
}

.battlepass-summary-copy strong {
    font-size: 0.74rem !important;
    line-height: 1.08 !important;
}

.battlepass-summary-copy span {
    font-size: 0.84rem !important;
    line-height: 1.04 !important;
}

.battlepass-summary-card.theme-virus {
    border-color: rgba(80, 255, 142, 0.70) !important;
    background:
        radial-gradient(circle at 20% 18%, rgba(106, 255, 156, 0.26), transparent 28%),
        linear-gradient(145deg, rgba(7, 70, 36, 0.94), rgba(8, 19, 49, 0.92)) !important;
    box-shadow: 0 0 24px rgba(80, 255, 142, 0.30), inset 0 2px 0 rgba(255, 255, 255, 0.12) !important;
}

.battlepass-summary-card.theme-coins {
    border-color: rgba(255, 220, 92, 0.78) !important;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 242, 174, 0.34), transparent 24%),
        radial-gradient(circle at 88% 12%, rgba(162, 93, 255, 0.22), transparent 30%),
        linear-gradient(145deg, rgba(95, 62, 10, 0.96), rgba(19, 19, 74, 0.92)) !important;
    box-shadow: 0 0 26px rgba(255, 210, 92, 0.34), 0 0 18px rgba(159, 93, 255, 0.20), inset 0 2px 0 rgba(255, 255, 255, 0.16) !important;
}

.battlepass-summary-card.theme-ship {
    border-color: rgba(90, 216, 255, 0.78) !important;
    background:
        radial-gradient(circle at 24% 16%, rgba(80, 225, 255, 0.32), transparent 24%),
        linear-gradient(145deg, rgba(18, 55, 126, 0.96), rgba(45, 19, 105, 0.92)) !important;
    box-shadow: 0 0 28px rgba(80, 225, 255, 0.36), inset 0 2px 0 rgba(255, 255, 255, 0.16) !important;
}

.battlepass-summary-card.theme-other {
    border-color: rgba(190, 113, 255, 0.72) !important;
    background:
        radial-gradient(circle at 20% 18%, rgba(237, 164, 255, 0.28), transparent 26%),
        linear-gradient(145deg, rgba(75, 34, 142, 0.94), rgba(17, 29, 90, 0.92)) !important;
}

.battlepass-summary-card.rare {
    border-color: rgba(255, 238, 166, 0.92) !important;
    box-shadow: 0 0 34px rgba(255, 210, 92, 0.42), 0 0 30px rgba(187, 90, 255, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.18) !important;
}

.rank-overview-modal:not(.hidden) {
    background: rgba(0, 0, 0, 0.36);
}

.rank-overview-panel {
    width: min(1500px, calc(100vw - 44px)) !important;
    min-height: min(820px, calc(100vh - 44px));
    background:
        radial-gradient(circle at 12% 38%, rgba(55, 117, 255, 0.26), transparent 25%),
        radial-gradient(circle at 80% 20%, rgba(178, 82, 255, 0.20), transparent 30%),
        rgba(5, 8, 28, 0.72) !important;
    backdrop-filter: blur(8px) saturate(130%);
}

.rank-overview-title {
    color: #f8fbff !important;
    font-size: clamp(2.4rem, 5vw, 4.8rem) !important;
    font-style: italic;
    text-shadow: 0 0 20px rgba(55, 247, 255, 0.58), 0 8px 0 rgba(0, 18, 70, 0.22) !important;
}

.trophy-road-shell {
    display: grid;
    gap: 18px;
}

.trophy-road-shell .rank-progress-card {
    width: min(850px, 86vw);
    justify-self: center;
    border-color: rgba(142, 108, 255, 0.55);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.035)),
        rgba(18, 18, 68, 0.70);
    box-shadow: 0 0 28px rgba(142, 108, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.trophy-road-track-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding: 14px 8px 26px;
    scrollbar-width: none;
}

.trophy-road-track-wrap::-webkit-scrollbar {
    display: none;
}

.rank-path.trophy-road-path {
    display: grid;
    grid-template-columns: repeat(8, minmax(170px, 1fr));
    min-width: 1380px;
    gap: 26px;
    overflow: visible;
    padding: 42px 28px 112px;
}

.rank-path.trophy-road-path::before {
    top: 164px;
    left: 90px;
    right: 90px;
    height: 7px;
    background: linear-gradient(90deg, #6aa7ff, #35ff95, #a95cff, #ff5bd8, #ffd45c);
    box-shadow: 0 0 24px rgba(105, 180, 255, 0.66);
}

.trophy-road-path .rank-node {
    min-width: 170px;
    min-height: 240px;
    align-content: start;
    border-radius: 12px;
}

.trophy-road-path .rank-node.current {
    transform: translateY(-18px);
    background: linear-gradient(180deg, rgba(154, 78, 255, 0.26), rgba(62, 20, 110, 0.36));
}

.trophy-road-path .rank-node-icon {
    width: 98px;
    height: 98px;
}

.trophy-road-reward {
    position: absolute;
    left: 50%;
    bottom: -86px;
    width: 104px;
    min-height: 86px;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 9px;
    border-radius: 8px;
    border: 2px solid rgba(55, 247, 255, 0.52);
    background: linear-gradient(180deg, rgba(10, 40, 96, 0.92), rgba(5, 13, 38, 0.94));
    box-shadow: 0 0 20px rgba(55, 247, 255, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.14);
    transform: translateX(-50%);
}

.trophy-road-reward img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.trophy-road-reward b {
    color: #f8fbff;
    font-size: 0.72rem;
    line-height: 1.05;
}

.trophy-road-reward.claimed::after {
    content: "✓";
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #35ff95;
    color: #062012;
    font-weight: 1000;
}

.trophy-road-footer {
    width: min(1120px, 92vw);
    justify-self: center;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 24px;
    border-radius: 16px;
    border: 1px solid rgba(153, 206, 255, 0.24);
    background: rgba(7, 11, 36, 0.68);
}

.trophy-road-footer span {
    display: grid;
    gap: 4px;
    color: #eaf2ff;
    font-weight: 1000;
}

.trophy-road-footer strong {
    color: rgba(221, 232, 255, 0.72);
    font-size: 0.8rem;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    #main-menu.screen.lobby-empty .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
        width: min(680px, calc(100vw - 34px)) !important;
        min-width: 0;
    }
}

/* Current request pass: stable lobby stats, chest hover polish, and full Trophy Road page */
#main-menu.screen.lobby-empty .lobby-top-stats,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
    width: min(940px, calc(100vw - 520px)) !important;
    min-width: 720px !important;
    grid-template-columns: minmax(178px, 0.86fr) minmax(320px, 1.38fr) minmax(178px, 0.86fr) !important;
    gap: clamp(14px, 1.2vw, 20px) !important;
    align-items: stretch !important;
    transform: translate3d(-50%, 0, 0) !important;
    contain: layout style;
}

#main-menu.screen.lobby-empty .lobby-stat-card,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card {
    height: clamp(76px, 8.4vh, 92px) !important;
    min-width: 0 !important;
    grid-template-columns: clamp(48px, 4.2vw, 60px) minmax(0, 1fr) !important;
    gap: clamp(10px, 1vw, 15px) !important;
    padding: clamp(10px, 1vw, 14px) clamp(14px, 1.35vw, 20px) !important;
    transform: translate3d(0, 0, 0);
    transform-origin: 50% 50%;
}

#main-menu.screen.lobby-empty .lobby-stat-card > span:last-child,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card > span:last-child {
    min-width: 0;
}

#main-menu.screen.lobby-empty .lobby-stat-icon,
#main-menu.screen.lobby-empty .lobby-stat-icon.image-icon img,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-icon,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-icon.image-icon img {
    width: clamp(46px, 4vw, 58px) !important;
    height: clamp(46px, 4vw, 58px) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card strong,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card strong {
    min-width: 8ch;
    font-size: clamp(1.38rem, 1.95vw, 2.08rem) !important;
    font-variant-numeric: tabular-nums;
    line-height: 0.96 !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card .lobby-stat-label,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card .lobby-stat-label {
    font-size: clamp(0.72rem, 0.92vw, 0.92rem) !important;
}

.battlepass-stat-bump {
    animation: battlepassStatBump 0.52s ease-out both !important;
}

@keyframes battlepassStatBump {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        filter: brightness(1);
    }
    42% {
        transform: translate3d(0, 0, 0);
        filter: brightness(1.24) drop-shadow(0 0 16px rgba(53, 255, 149, 0.48));
    }
    72% {
        transform: translate3d(0, 0, 0);
        filter: brightness(1.08);
    }
}

.battlepass-chest-counter.legendary-ready {
    border-color: rgba(255, 238, 166, 0.92) !important;
    color: #fff8d2 !important;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 235, 160, 0.34), transparent 28%),
        linear-gradient(180deg, #ff263b 0%, #be061b 48%, #6a0015 100%) !important;
    box-shadow:
        0 0 0 3px rgba(255, 238, 166, 0.34),
        0 0 34px rgba(255, 38, 59, 0.76),
        0 0 72px rgba(255, 209, 102, 0.38),
        inset 0 2px 0 rgba(255, 255, 255, 0.32) !important;
    animation: battlepassRareButtonFlash 0.68s ease-in-out infinite !important;
}

.battlepass-reward-row {
    align-items: end !important;
    overflow: visible !important;
}

.battlepass-summary-card,
.battlepass-chest-modal.summary-mode .battlepass-summary-card {
    height: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
    transform-origin: 50% 100%;
    will-change: transform, filter;
}

.battlepass-summary-card:hover,
.battlepass-summary-card:focus-within {
    min-height: 88px !important;
    max-height: 88px !important;
    transform: translate3d(0, -16px, 0) scale(1.08) !important;
}

.battlepass-summary-card::after {
    min-height: 58px;
    top: calc(100% + 10px);
    font-size: 0.76rem;
}

.battlepass-chest-modal.summary-mode .battlepass-summary-card::after {
    top: auto;
    bottom: calc(100% + 10px);
}

#main-menu.screen.lobby-empty .lobby-side-card.trophy-road-card {
    position: relative;
    overflow: visible !important;
}

#main-menu.screen.lobby-empty .lobby-side-card.trophy-road-card.claim-ready {
    border-color: rgba(255, 229, 124, 0.96) !important;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 249, 196, 0.30), transparent 26%),
        linear-gradient(145deg, rgba(111, 74, 10, 0.94), rgba(38, 30, 88, 0.92)) !important;
    box-shadow:
        0 0 0 2px rgba(255, 229, 124, 0.28),
        0 0 34px rgba(255, 209, 102, 0.42),
        inset 0 2px 0 rgba(255, 255, 255, 0.20) !important;
}

.trophy-road-new-flag {
    position: absolute;
    top: -12px;
    right: -14px;
    z-index: 6;
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    color: #391600;
    background: linear-gradient(180deg, #fff490, #ffbe25 58%, #ff7a20);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.62), 0 8px 14px rgba(0, 0, 0, 0.28);
    font: 1000 0.72rem "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
    transform: rotate(8deg);
    pointer-events: none;
}

.trophy-road-new-flag[hidden] {
    display: none !important;
}

.trophy-road-page {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9000;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    padding: clamp(16px, 2vw, 30px) clamp(18px, 2.4vw, 40px) !important;
    color: #f8fbff;
    background:
        radial-gradient(circle at 12% 52%, rgba(69, 102, 255, 0.26), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(154, 61, 255, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(2, 5, 20, 0.72), rgba(8, 13, 48, 0.72)) !important;
}

.trophy-road-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 9% 47%, rgba(67, 105, 224, 0.44), transparent 0 10%, transparent 22%),
        radial-gradient(circle at 88% 26%, rgba(110, 77, 210, 0.30), transparent 0 8%, transparent 20%),
        radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(78, 232, 255, 0.48) 0 1px, transparent 1.6px);
    background-size: auto, auto, 112px 112px, 170px 170px;
    background-position: center, center, 0 0, 42px 32px;
    pointer-events: none;
}

.trophy-road-page > * {
    position: relative;
    z-index: 1;
}

.trophy-road-page-head {
    height: clamp(86px, 12vh, 118px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.trophy-road-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.trophy-road-brand-icon {
    width: clamp(50px, 4.8vw, 78px);
    height: clamp(50px, 4.8vw, 78px);
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #dff5ff;
    background: linear-gradient(145deg, rgba(69, 154, 255, 0.24), rgba(12, 23, 72, 0.62));
    box-shadow: 0 0 26px rgba(78, 232, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-size: clamp(1.6rem, 3.4vw, 2.8rem);
}

.trophy-road-brand h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.6rem, 5.6vw, 5.8rem);
    line-height: 0.88;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0;
    text-shadow:
        0 0 22px rgba(115, 187, 255, 0.66),
        0 7px 0 rgba(11, 37, 92, 0.62),
        0 20px 38px rgba(0, 0, 0, 0.42);
}

.trophy-road-brand p {
    margin: 9px 0 0;
    color: rgba(236, 242, 255, 0.90);
    font-weight: 1000;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.trophy-road-brand p strong {
    color: #ffd45c;
}

.trophy-road-close {
    width: clamp(58px, 5.4vw, 78px);
    height: clamp(58px, 5.4vw, 78px);
    border-radius: 18px;
    border: 3px solid rgba(180, 112, 255, 0.80);
    color: #ffffff;
    background: rgba(18, 12, 44, 0.76);
    box-shadow: 0 0 24px rgba(180, 112, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font: 1000 clamp(1.5rem, 3vw, 2.2rem) "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

.trophy-road-rank-card {
    width: min(870px, 55vw);
    min-height: 132px;
    margin: -6px auto 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto);
    gap: 18px;
    align-items: center;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid rgba(150, 119, 255, 0.58);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(10, 12, 48, 0.66);
    box-shadow: 0 0 36px rgba(142, 108, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.trophy-road-current-emblem img,
.trophy-road-next-rank img {
    width: clamp(78px, 7vw, 118px);
    height: clamp(78px, 7vw, 118px);
    object-fit: contain;
    filter: drop-shadow(0 0 18px var(--rank-glow, rgba(142, 108, 255, 0.45)));
}

.trophy-road-rank-info {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.trophy-road-rank-info strong {
    color: var(--rank-a);
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    text-transform: uppercase;
    font-style: italic;
    text-shadow: 0 0 18px var(--rank-glow);
}

.trophy-road-rank-info span,
.trophy-road-rank-info small {
    color: rgba(231, 238, 255, 0.90);
    font-weight: 900;
}

.trophy-road-rank-progress {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.34);
}

.trophy-road-rank-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #873fff, #d565ff, #fff2a8);
    box-shadow: 0 0 18px rgba(213, 101, 255, 0.62);
}

.trophy-road-next-rank {
    display: grid;
    justify-items: center;
    gap: 3px;
    color: #47bdff;
    font-weight: 1000;
    text-align: center;
    text-transform: uppercase;
}

.trophy-road-next-rank span {
    color: rgba(232, 241, 255, 0.70);
    font-size: 0.78rem;
}

.trophy-road-main {
    height: calc(100vh - clamp(86px, 12vh, 118px) - 162px - 104px);
    min-height: 390px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.trophy-road-viewport {
    position: relative;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    padding: 0 20px;
}

.trophy-road-viewport::-webkit-scrollbar {
    display: none;
}

.trophy-road-track {
    position: relative;
    min-width: 6400px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 46px;
    padding: 26px 60px 34px;
}

.trophy-road-track::before {
    content: "";
    position: absolute;
    left: 70px;
    right: 70px;
    top: 50%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #72c6ff, #32ffad 22%, #a55cff 48%, #ff5bd8 72%, #ffd45c);
    box-shadow: 0 0 24px rgba(106, 180, 255, 0.72), 0 0 60px rgba(169, 92, 255, 0.28);
}

.trophy-road-track::after {
    content: "";
    position: absolute;
    left: 70px;
    right: 70px;
    top: calc(50% - 2px);
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    opacity: 0.42;
}

.trophy-road-node {
    position: relative;
    z-index: 1;
    flex: 0 0 150px;
    display: grid;
    justify-items: center;
    text-align: center;
    color: #f8fbff;
}

.trophy-road-node::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.08));
    transform: translateX(-50%);
}

.trophy-road-node::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 4px solid currentColor;
    background: #10234e;
    box-shadow: 0 0 20px currentColor;
    transform: translate(-50%, -50%);
}

.trophy-road-node.reward-high {
    align-self: start;
    margin-top: 18px;
}

.trophy-road-node.reward-low {
    align-self: end;
    margin-bottom: 18px;
}

.trophy-road-node.reward-high::before {
    top: calc(50% + 14px);
    height: 74px;
}

.trophy-road-node.reward-low::before {
    bottom: calc(50% + 14px);
    height: 74px;
}

.trophy-road-node.rank-node {
    flex-basis: 188px;
    min-height: 258px;
    align-self: center;
    margin-top: -22px;
    padding: 16px 12px;
    border-radius: 14px;
    border: 2px solid color-mix(in srgb, var(--rank-a) 70%, #ffffff 10%);
    background:
        radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--rank-a) 28%, transparent), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(10, 12, 42, 0.72));
    box-shadow: 0 0 28px var(--rank-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.trophy-road-node.rank-node::before {
    display: none;
}

.trophy-road-node.rank-node::after {
    width: 34px;
    height: 34px;
    color: var(--rank-a);
    background: #0c1f56;
}

.trophy-road-node.rank-node.current {
    transform: translateY(-12px);
    border-color: #d565ff;
    box-shadow: 0 0 0 2px rgba(213, 101, 255, 0.44), 0 0 44px rgba(213, 101, 255, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.trophy-road-rank-node-icon img {
    width: 94px;
    height: 94px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px var(--rank-glow));
}

.trophy-road-node.rank-node strong {
    margin-top: 8px;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 0 12px var(--rank-glow);
}

.trophy-road-node.rank-node small {
    margin-top: 7px;
    color: rgba(244, 248, 255, 0.86);
    font-weight: 900;
}

.trophy-road-you {
    position: absolute;
    left: 50%;
    bottom: -64px;
    min-width: 140px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #fff8d2;
    background: linear-gradient(180deg, rgba(117, 55, 255, 0.92), rgba(54, 19, 104, 0.94));
    box-shadow: 0 0 28px rgba(180, 92, 255, 0.66);
    font-weight: 1000;
    transform: translateX(-50%);
}

.trophy-road-node.reward-node {
    width: 150px;
    min-height: 162px;
    padding: 10px 10px 12px;
    border-radius: 10px;
    border: 2px solid rgba(78, 232, 255, 0.52);
    background: linear-gradient(180deg, rgba(16, 50, 108, 0.92), rgba(6, 12, 36, 0.96));
    box-shadow: 0 0 20px rgba(78, 232, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.trophy-road-node.reward-node.locked {
    opacity: 0.46;
    filter: grayscale(0.25);
}

.trophy-road-node.reward-node.claimable {
    border-color: rgba(255, 229, 124, 0.92);
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 241, 160, 0.34), transparent 30%),
        linear-gradient(180deg, rgba(98, 68, 14, 0.96), rgba(18, 18, 62, 0.96));
    box-shadow: 0 0 34px rgba(255, 209, 102, 0.44), 0 0 58px rgba(180, 92, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    animation: trophyRoadClaimPulse 1.7s ease-in-out infinite;
}

.trophy-road-node.reward-node.claimed {
    border-color: rgba(53, 255, 149, 0.70);
}

.trophy-road-node.theme-virus {
    border-color: rgba(80, 255, 142, 0.64);
    background: linear-gradient(180deg, rgba(7, 70, 36, 0.95), rgba(5, 17, 38, 0.96));
}

.trophy-road-node.theme-coins,
.trophy-road-node.theme-galaxy {
    border-color: rgba(255, 210, 92, 0.70);
}

.trophy-road-node.theme-chest {
    border-color: rgba(93, 201, 255, 0.78);
}

.trophy-road-mile {
    color: #dbe7ff;
    font-size: 0.75rem;
    font-weight: 1000;
}

.trophy-road-reward-icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.24));
}

.trophy-road-node.reward-node strong {
    margin-top: 3px;
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1.05;
}

.trophy-road-node.reward-node small {
    color: #fff37b;
    font-weight: 1000;
    line-height: 1.08;
}

.trophy-road-node.reward-node p {
    display: none;
}

.trophy-road-node.reward-node button,
.trophy-road-claimed {
    margin-top: 7px;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.40);
    color: #271600;
    background: linear-gradient(180deg, #fff58f, #ffbe25);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.42);
    font-weight: 1000;
    text-transform: uppercase;
    cursor: pointer;
}

.trophy-road-claimed {
    color: #042113;
    background: linear-gradient(180deg, #79ffb6, #35ff95);
}

.trophy-road-arrow {
    width: clamp(48px, 4vw, 64px);
    height: clamp(78px, 10vh, 120px);
    border-radius: 18px;
    border: 2px solid rgba(78, 232, 255, 0.42);
    color: #ffffff;
    background: rgba(8, 18, 56, 0.70);
    box-shadow: 0 0 22px rgba(78, 232, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    font-weight: 1000;
    cursor: pointer;
}

.trophy-road-arrow:hover {
    filter: brightness(1.18);
    border-color: rgba(255, 255, 255, 0.62);
}

.trophy-road-page-footer {
    height: 86px;
    width: min(1120px, 78vw);
    margin: 8px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    align-items: center;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid rgba(153, 206, 255, 0.24);
    background: rgba(8, 11, 38, 0.74);
    box-shadow: 0 0 30px rgba(78, 232, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.trophy-road-page-footer span {
    display: grid;
    gap: 5px;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 1000;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.trophy-road-page-footer span:first-child {
    border-left: 0;
}

.trophy-road-page-footer strong {
    color: rgba(218, 230, 255, 0.72);
    font-size: 0.75rem;
    text-transform: uppercase;
}

@keyframes trophyRoadClaimPulse {
    0%, 100% {
        transform: translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-4px);
        filter: brightness(1.14);
    }
}

body.game-running #main-menu,
body.game-running #main-menu .lobby-ui-canvas,
body.game-running #main-menu .lobby-ui-canvas *,
body.game-running .rank-overview-modal,
body.game-running .battlepass-chest-modal {
    pointer-events: none !important;
}

@media (max-width: 1180px) {
    #main-menu.screen.lobby-empty .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
        width: min(760px, calc(100vw - 32px)) !important;
        min-width: 0 !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr) minmax(0, 1fr) !important;
    }

    .trophy-road-rank-card {
        width: min(900px, 86vw);
    }
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
        grid-template-columns: 1fr !important;
    }

    .trophy-road-page {
        padding: 12px !important;
    }

    .trophy-road-rank-card {
        grid-template-columns: auto minmax(0, 1fr);
        min-height: 118px;
    }

    .trophy-road-next-rank {
        display: none;
    }

    .trophy-road-page-footer {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: 92px;
    }
}

/* Current polish pass: chest count fidelity, lobby stats, ship hangar and boot device choice. */
#boot-intro-overlay .boot-intro-gate {
    pointer-events: auto;
    transition: transform 180ms ease, filter 180ms ease, opacity 220ms ease;
}

#boot-intro-overlay .boot-intro-gate-image.hover {
    display: none !important;
}

#boot-intro-overlay .boot-intro-gate:hover .boot-intro-gate-image.idle,
#boot-intro-overlay .boot-intro-gate:focus-visible .boot-intro-gate-image.idle {
    opacity: 1 !important;
    transform: translateY(-5px) scale(1.055) !important;
    filter: drop-shadow(0 0 28px rgba(78, 232, 255, 0.62)) drop-shadow(0 0 48px rgba(180, 92, 255, 0.38)) brightness(1.12) !important;
}

#boot-intro-overlay .boot-intro-gate:active .boot-intro-gate-image.idle {
    transform: translateY(1px) scale(0.985) !important;
    filter: drop-shadow(0 0 16px rgba(255, 209, 102, 0.58)) brightness(1.18) !important;
}

body.intro-device-selecting #boot-intro-overlay .boot-intro-gate {
    opacity: 0;
    pointer-events: none;
    transform: translateY(22px) scale(0.96);
}

#boot-intro-overlay .boot-device-choice.hidden {
    display: none !important;
}

#boot-intro-overlay .boot-device-choice {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 280px));
    place-content: center;
    align-items: center;
    gap: clamp(18px, 4vw, 48px);
    padding: 28px;
    background:
        radial-gradient(circle at 50% 45%, rgba(78, 232, 255, 0.18), transparent 34%),
        radial-gradient(circle at 50% 56%, rgba(180, 92, 255, 0.28), transparent 52%),
        rgba(3, 7, 27, 0.56);
}

#boot-intro-overlay .boot-device-card {
    width: min(280px, 38vw);
    aspect-ratio: 1.12;
    padding: 0;
    border: 2px solid rgba(122, 232, 255, 0.52);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(24, 54, 118, 0.88), rgba(8, 13, 48, 0.94));
    box-shadow: 0 0 26px rgba(78, 232, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    cursor: pointer;
    overflow: hidden;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

#boot-intro-overlay .boot-device-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    transition: transform 180ms ease;
}

#boot-intro-overlay .boot-device-card:hover,
#boot-intro-overlay .boot-device-card:focus-visible {
    transform: translateY(-7px) scale(1.035);
    border-color: rgba(255, 241, 160, 0.88);
    box-shadow: 0 0 34px rgba(255, 209, 102, 0.34), 0 0 54px rgba(180, 92, 255, 0.28);
    outline: none;
}

#boot-intro-overlay .boot-device-card:hover img,
#boot-intro-overlay .boot-device-card:focus-visible img {
    transform: scale(1.045);
}

#boot-intro-overlay .boot-device-card:active {
    transform: translateY(1px) scale(0.985);
}

#boot-intro-overlay .boot-device-warning {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 640px;
    margin: 0;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 241, 160, 0.62);
    color: #fff7c7;
    background: rgba(39, 20, 0, 0.72);
    box-shadow: 0 0 28px rgba(255, 209, 102, 0.22);
    font-weight: 1000;
    text-align: center;
}

#boot-intro-overlay .boot-orientation-toast {
    position: fixed;
    left: 50%;
    bottom: clamp(22px, 6vh, 58px);
    z-index: 14;
    max-width: min(620px, calc(100vw - 34px));
    padding: 13px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 241, 160, 0.72);
    color: #fff8cc;
    background: linear-gradient(180deg, rgba(70, 38, 0, 0.88), rgba(21, 12, 0, 0.90));
    box-shadow: 0 0 28px rgba(255, 209, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-weight: 1000;
    text-align: center;
    transform: translateX(-50%);
    animation: bootOrientationToast 2.6s ease forwards;
}

@keyframes bootOrientationToast {
    0% {
        opacity: 0;
        transform: translate(-50%, 14px) scale(0.96);
    }
    12%, 78% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 10px) scale(0.98);
    }
}

.battlepass-chest-modal.legendary-ready {
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 250, 190, 0.78), transparent 22%),
        radial-gradient(circle at 50% 58%, rgba(255, 186, 49, 0.70), transparent 46%),
        linear-gradient(135deg, #2a1200 0%, #7f3b00 34%, #ffbd2e 68%, #fff0a8 100%) !important;
}

.battlepass-chest-modal.legendary-ready::before {
    opacity: 0.50 !important;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 244, 168, 0.32), transparent 14%),
        radial-gradient(circle at 84% 20%, rgba(255, 210, 70, 0.22), transparent 16%),
        radial-gradient(circle at 54% 82%, rgba(255, 244, 168, 0.18), transparent 18%) !important;
}

.battlepass-chest-modal.legendary-ready .battlepass-chest-panel {
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 250, 190, 0.36), transparent 28%),
        linear-gradient(180deg, rgba(74, 33, 0, 0.62), rgba(22, 9, 0, 0.84)) !important;
    box-shadow: inset 0 0 80px rgba(255, 209, 102, 0.18), 0 0 70px rgba(255, 209, 102, 0.34);
}

.battlepass-chest-modal.legendary-ready .battlepass-chest-title {
    color: #fff8cf !important;
    text-shadow: 0 0 18px rgba(255, 244, 168, 0.78), 0 3px 0 rgba(78, 34, 0, 0.44) !important;
}

.battlepass-chest-counter.legendary-ready {
    color: #fff6c1 !important;
    background: linear-gradient(180deg, #ff433f, #aa0808 58%, #5d0202) !important;
    border-color: rgba(255, 244, 168, 0.96) !important;
    box-shadow: 0 0 28px rgba(255, 51, 51, 0.74), 0 0 46px rgba(255, 209, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
    animation: battlepassRareButtonFill 0.72s ease-in-out infinite !important;
}

@keyframes battlepassRareButtonFill {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.28) saturate(1.22);
    }
}

.battlepass-reward-row {
    align-items: end !important;
    overflow: visible !important;
    z-index: 12;
}

.battlepass-summary-card,
.battlepass-chest-modal.summary-mode .battlepass-summary-card {
    align-self: end;
    min-height: 96px;
    height: auto !important;
    max-height: 112px;
    overflow: hidden !important;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-auto-rows: min-content;
    align-content: center;
    transform-origin: bottom center;
    transition: transform 180ms ease, max-height 210ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.battlepass-summary-card::after,
.battlepass-summary-card:hover::after,
.battlepass-summary-card:focus-within::after,
.battlepass-chest-modal.summary-mode .battlepass-summary-card::after {
    content: none !important;
    display: none !important;
}

.battlepass-summary-copy {
    min-width: 0;
}

.battlepass-summary-copy strong,
.battlepass-summary-copy span {
    display: block;
    max-width: 100%;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    line-height: 1.08;
}

.battlepass-summary-desc {
    grid-column: 1 / -1;
    max-height: 0;
    opacity: 0;
    margin: 0;
    color: rgba(239, 248, 255, 0.88);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1.18;
    transition: max-height 210ms ease, opacity 160ms ease, margin-top 180ms ease;
}

.battlepass-summary-card:hover,
.battlepass-summary-card:focus-within,
.battlepass-chest-modal.summary-mode .battlepass-summary-card:hover,
.battlepass-chest-modal.summary-mode .battlepass-summary-card:focus-within {
    z-index: 40;
    max-height: 186px;
    transform: translateY(-14px) scale(1.045) !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 0 32px var(--loot-glow), 0 18px 46px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

.battlepass-summary-card:hover .battlepass-summary-desc,
.battlepass-summary-card:focus-within .battlepass-summary-desc {
    max-height: 82px;
    opacity: 1;
    margin-top: 8px;
}

#main-menu.screen.lobby-empty .lobby-top-stats,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
    width: min(860px, calc(100vw - 48px)) !important;
    min-width: 760px !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.36fr) minmax(0, 1fr) !important;
    gap: 13px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card {
    min-height: 72px !important;
    padding: 12px 17px !important;
    border-width: 2px !important;
    border-radius: 13px !important;
    font-variant-numeric: tabular-nums;
    transform-origin: center center;
    contain: paint;
}

#main-menu.screen.lobby-empty .lobby-stat-card .lobby-stat-icon,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card .lobby-stat-icon {
    width: 46px !important;
    height: 46px !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card strong,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card strong {
    font-size: clamp(1.24rem, 1.55vw, 1.62rem) !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card .lobby-stat-label,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card .lobby-stat-label {
    font-size: 0.76rem !important;
    letter-spacing: 0 !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card.coins,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card.coins {
    border-color: rgba(255, 218, 92, 0.86) !important;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 247, 178, 0.32), transparent 28%),
        linear-gradient(180deg, rgba(105, 68, 0, 0.94), rgba(37, 22, 0, 0.95)) !important;
    box-shadow: 0 0 24px rgba(255, 209, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card.trophies,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card.trophies {
    border-color: rgba(255, 244, 168, 0.94) !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 245, 164, 0.34), transparent 36%),
        linear-gradient(180deg, rgba(128, 75, 4, 0.98), rgba(40, 20, 2, 0.96)) !important;
    box-shadow: 0 0 32px rgba(255, 209, 102, 0.35), 0 0 42px rgba(180, 92, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card.virus,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card.virus {
    border-color: rgba(82, 255, 137, 0.80) !important;
    background:
        radial-gradient(circle at 18% 22%, rgba(107, 255, 163, 0.28), transparent 28%),
        linear-gradient(180deg, rgba(8, 91, 45, 0.94), rgba(4, 20, 20, 0.96)) !important;
    box-shadow: 0 0 24px rgba(53, 255, 149, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#main-menu.screen.lobby-empty .lobby-stat-card.virus .lobby-stat-icon,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-stat-card.virus .lobby-stat-icon {
    position: relative;
    border-radius: 34% 48% 32% 56%;
    background: radial-gradient(circle, rgba(91, 255, 142, 0.22), rgba(4, 45, 26, 0.72));
    clip-path: polygon(50% 0, 59% 22%, 83% 9%, 75% 35%, 100% 50%, 75% 65%, 83% 91%, 59% 78%, 50% 100%, 41% 78%, 17% 91%, 25% 65%, 0 50%, 25% 35%, 17% 9%, 41% 22%);
}

#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    pointer-events: auto !important;
    isolation: isolate;
    width: clamp(245px, 19vw, 330px) !important;
    min-height: 118px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    clip-path: polygon(8% 0, 92% 0, 100% 30%, 100% 70%, 92% 100%, 8% 100%, 0 70%, 0 30%);
    background:
        linear-gradient(90deg, rgba(255, 241, 160, 0.72), transparent 15%, transparent 85%, rgba(255, 241, 160, 0.72)),
        linear-gradient(180deg, #54d9ff 0%, #1477ff 45%, #3b1e92 100%) !important;
    box-shadow: 0 14px 0 rgba(5, 18, 64, 0.88), 0 0 34px rgba(78, 232, 255, 0.34), inset 0 4px 0 rgba(255, 255, 255, 0.30) !important;
    cursor: pointer;
    overflow: visible !important;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

#main-menu.screen.lobby-empty .lobby-play-button *,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button * {
    pointer-events: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-button::before,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::before {
    content: "";
    position: absolute;
    inset: 7px 11px;
    z-index: 0;
    clip-path: polygon(8% 0, 92% 0, 100% 31%, 100% 69%, 92% 100%, 8% 100%, 0 69%, 0 31%);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.20), transparent 35%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(12, 30, 98, 0.42), rgba(255, 255, 255, 0.06));
    border: 2px solid rgba(224, 248, 255, 0.58);
    box-shadow: inset 0 0 24px rgba(9, 47, 120, 0.54);
    pointer-events: none;
}

#main-menu.screen.lobby-empty .lobby-play-button::after,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::after {
    content: "";
    position: absolute;
    inset: 18px 34px;
    z-index: 1;
    border-top: 2px solid rgba(255, 255, 255, 0.54);
    border-bottom: 2px solid rgba(20, 245, 255, 0.42);
    opacity: 0.82;
    pointer-events: none;
}

#main-menu.screen.lobby-empty .lobby-play-button strong,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button strong {
    position: relative;
    z-index: 3;
    color: #ffffff !important;
    font-size: clamp(2.3rem, 3.1vw, 3.2rem) !important;
    letter-spacing: 0 !important;
    text-shadow: 0 4px 0 rgba(6, 20, 76, 0.56), 0 0 18px rgba(255, 255, 255, 0.44) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button .play-blue-core,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button .play-blue-core {
    inset: 18px 28px !important;
    border-radius: 6px !important;
    clip-path: polygon(8% 0, 92% 0, 100% 34%, 100% 66%, 92% 100%, 8% 100%, 0 66%, 0 34%);
    background: linear-gradient(180deg, rgba(65, 225, 255, 0.42), rgba(7, 29, 103, 0.72)) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateY(-5px) scale(1.025) !important;
    filter: brightness(1.12) saturate(1.1);
    box-shadow: 0 18px 0 rgba(5, 18, 64, 0.88), 0 0 42px rgba(78, 232, 255, 0.46), 0 0 58px rgba(255, 209, 102, 0.20), inset 0 4px 0 rgba(255, 255, 255, 0.34) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:active,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateY(5px) scale(0.982) !important;
    box-shadow: 0 7px 0 rgba(5, 18, 64, 0.92), 0 0 28px rgba(78, 232, 255, 0.30), inset 0 3px 0 rgba(255, 255, 255, 0.22) !important;
}

#main-menu.screen.lobby-empty .lobby-ship-stage,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-ship-stage {
    --ship-color: #37f7ff;
    --ship-glow-soft: rgba(55, 247, 255, 0.28);
    --ship-glow: rgba(55, 247, 255, 0.58);
    --ship-glow-strong: rgba(55, 247, 255, 0.82);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    pointer-events: auto !important;
}

#main-menu.screen.lobby-empty .lobby-ship-stage:focus-visible {
    outline: 3px solid var(--ship-color);
    outline-offset: 14px;
}

#main-menu.screen.lobby-empty .lobby-center-ship,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-center-ship {
    filter: drop-shadow(0 0 18px var(--ship-glow)) drop-shadow(0 0 34px var(--ship-glow-soft)) !important;
}

#main-menu.screen.lobby-empty .lobby-ship-trail,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-ship-trail {
    background: radial-gradient(ellipse at 50% 50%, var(--ship-glow-soft), transparent 66%) !important;
    box-shadow: 0 0 40px var(--ship-glow-soft) !important;
}

.lobby-ship-ghost {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(410px, 34vw);
    max-height: 320px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 18px var(--ship-glow));
    transform: translate(-50%, -50%);
    z-index: 4;
}

.lobby-ship-ghost.out-left {
    animation: lobbyShipOutLeft 620ms cubic-bezier(.18, .76, .25, 1) forwards;
}

.lobby-ship-ghost.out-right {
    animation: lobbyShipOutRight 620ms cubic-bezier(.18, .76, .25, 1) forwards;
}

.lobby-center-ship.ship-slide-from-right {
    animation: lobbyShipInFromRight 620ms cubic-bezier(.18, .76, .25, 1);
}

.lobby-center-ship.ship-slide-from-left {
    animation: lobbyShipInFromLeft 620ms cubic-bezier(.18, .76, .25, 1);
}

@keyframes lobbyShipOutLeft {
    to {
        opacity: 0;
        transform: translate(-145%, -50%) scale(0.72) rotate(-8deg);
    }
}

@keyframes lobbyShipOutRight {
    to {
        opacity: 0;
        transform: translate(45%, -50%) scale(0.72) rotate(8deg);
    }
}

@keyframes lobbyShipInFromRight {
    from {
        opacity: 0;
        transform: translateX(54%) scale(0.82) rotate(7deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

@keyframes lobbyShipInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-54%) scale(0.82) rotate(-7deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

.ship-hangar-screen {
    position: fixed !important;
    inset: 0;
    z-index: 35;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    height: 100vh;
    padding: clamp(18px, 3vw, 34px);
    overflow: hidden !important;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 42%, rgba(78, 232, 255, 0.16), transparent 30%),
        radial-gradient(circle at 50% 60%, rgba(180, 92, 255, 0.24), transparent 48%),
        linear-gradient(180deg, #05091d 0%, #0a1240 58%, #060819 100%);
}

.ship-hangar-screen.hidden {
    display: none !important;
}

.ship-hangar-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.64;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.90) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(122, 232, 255, 0.70) 0 1px, transparent 1.6px);
    background-size: 96px 96px, 142px 142px;
    animation: shipHangarStars 18s linear infinite;
}

@keyframes shipHangarStars {
    to {
        background-position: 96px 48px, -142px 72px;
    }
}

.ship-hangar-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ship-hangar-back {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    border: 2px solid rgba(122, 232, 255, 0.50);
    color: #ffffff;
    background: linear-gradient(180deg, rgba(31, 64, 142, 0.86), rgba(9, 13, 50, 0.92));
    box-shadow: 0 0 20px rgba(78, 232, 255, 0.24);
    font-size: 1.8rem;
    font-weight: 1000;
    cursor: pointer;
}

.ship-hangar-head h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.7rem);
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 0 28px rgba(78, 232, 255, 0.44);
}

.ship-hangar-head p {
    margin: 2px 0 0;
    color: rgba(231, 240, 255, 0.72);
    font-weight: 900;
}

.ship-hangar-hero {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
}

.ship-hangar-main {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 44vw) minmax(260px, 1fr);
    align-items: center;
    gap: clamp(18px, 4vw, 56px);
    min-height: min(520px, 58vh);
    padding: clamp(18px, 3vw, 36px);
    border: 2px solid color-mix(in srgb, var(--ship-color) 62%, white 8%);
    border-radius: 18px;
    background:
        radial-gradient(circle at 32% 46%, var(--ship-glow-soft), transparent 28%),
        linear-gradient(180deg, rgba(12, 20, 60, 0.78), rgba(5, 8, 28, 0.82));
    box-shadow: 0 0 46px var(--ship-glow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.ship-hangar-flight {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 330px;
}

.ship-hangar-light-trail {
    position: absolute;
    width: min(430px, 34vw);
    height: min(220px, 24vh);
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 50%, var(--ship-glow-soft), transparent 68%);
    filter: blur(2px);
    animation: shipHangarTrail 4.2s ease-in-out infinite;
}

.ship-hangar-flight img {
    position: relative;
    z-index: 2;
    width: min(390px, 34vw);
    max-height: 340px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--ship-glow)) drop-shadow(0 0 42px var(--ship-glow-soft));
    animation: shipHangarFloat 4.8s ease-in-out infinite;
}

@keyframes shipHangarTrail {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.76;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

@keyframes shipHangarFloat {
    0%, 100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.ship-hangar-copy {
    display: grid;
    gap: 10px;
    align-content: center;
}

.ship-hangar-copy span {
    color: var(--ship-color);
    font-weight: 1000;
    text-transform: uppercase;
}

.ship-hangar-copy strong {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 0.98;
    text-transform: uppercase;
    text-shadow: 0 0 22px var(--ship-glow);
}

.ship-hangar-copy p {
    max-width: 520px;
    margin: 0;
    color: rgba(235, 243, 255, 0.78);
    font-weight: 850;
    line-height: 1.35;
}

.ship-hangar-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.ship-hangar-stat-grid div {
    min-height: 74px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--ship-color) 42%, transparent);
    background: rgba(255, 255, 255, 0.07);
}

.ship-hangar-stat-grid span {
    display: block;
    color: rgba(216, 229, 255, 0.68);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
}

.ship-hangar-stat-grid strong {
    display: block;
    margin-top: 5px;
    color: #ffffff;
    font-size: clamp(0.9rem, 1.4vw, 1.25rem);
    line-height: 1.08;
}

.ship-hangar-nav {
    position: relative;
    z-index: 3;
    width: clamp(52px, 5vw, 76px);
    height: clamp(86px, 12vh, 132px);
    border-radius: 18px;
    border: 2px solid rgba(122, 232, 255, 0.52);
    color: #ffffff;
    background: linear-gradient(180deg, rgba(31, 64, 142, 0.82), rgba(9, 13, 50, 0.92));
    box-shadow: 0 0 24px rgba(78, 232, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 1000;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.ship-hangar-nav:hover,
.ship-hangar-nav:focus-visible {
    transform: translateY(-4px) scale(1.04);
    filter: brightness(1.18);
    outline: none;
}

.ship-hangar-strip {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    min-height: 138px;
    padding: 12px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.ship-hangar-thumb {
    flex: 0 0 168px;
    display: grid;
    grid-template-rows: 70px auto auto;
    gap: 4px;
    align-items: center;
    justify-items: center;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid color-mix(in srgb, var(--ship-color) 46%, rgba(255, 255, 255, 0.14));
    color: #ffffff;
    background: linear-gradient(180deg, rgba(18, 35, 82, 0.86), rgba(7, 11, 38, 0.92));
    box-shadow: 0 0 18px color-mix(in srgb, var(--ship-color) 26%, transparent);
    cursor: pointer;
    scroll-snap-align: center;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ship-hangar-thumb img {
    width: 92px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--ship-glow));
}

.ship-hangar-thumb strong,
.ship-hangar-thumb span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ship-hangar-thumb strong {
    font-size: 0.84rem;
    text-transform: uppercase;
}

.ship-hangar-thumb span {
    color: rgba(226, 238, 255, 0.70);
    font-size: 0.72rem;
    font-weight: 850;
}

.ship-hangar-thumb:hover,
.ship-hangar-thumb:focus-visible,
.ship-hangar-thumb.selected {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--ship-color) 76%, white 18%);
    box-shadow: 0 0 28px color-mix(in srgb, var(--ship-color) 42%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    outline: none;
}

.ship-hangar-thumb.selected {
    background:
        radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--ship-color) 32%, transparent), transparent 34%),
        linear-gradient(180deg, rgba(37, 58, 118, 0.94), rgba(10, 13, 44, 0.96));
}

@media (max-width: 980px) {
    #boot-intro-overlay .boot-device-choice {
        grid-template-columns: minmax(180px, 280px);
    }

    .ship-hangar-main {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .ship-hangar-flight {
        min-height: 240px;
    }

    .ship-hangar-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-top-stats,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-top-stats {
        width: min(420px, calc(100vw - 24px)) !important;
        min-width: 0 !important;
        grid-template-columns: 1fr !important;
    }

    .battlepass-summary-card:hover,
    .battlepass-summary-card:focus-within {
        transform: translateY(-8px) scale(1.02) !important;
    }

    .ship-hangar-screen {
        padding: 14px;
        gap: 8px;
    }

    .ship-hangar-hero {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
    }

    .ship-hangar-nav {
        width: 44px;
        min-width: 44px;
        height: 72px;
        font-size: 2rem;
    }

    .ship-hangar-main {
        padding: 12px;
    }

    .ship-hangar-copy strong {
        font-size: 1.55rem;
    }

    .ship-hangar-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Final interaction/layout fixes for chest cards, edition choice and lobby controls. */
.battlepass-chest-modal.summary-mode,
.battlepass-chest-modal.summary-mode .battlepass-chest-panel {
    cursor: pointer;
}

.battlepass-reward-row,
.battlepass-chest-modal.summary-mode .battlepass-reward-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: flex-end !important;
    gap: 12px !important;
    overflow: visible !important;
    pointer-events: none !important;
}

.battlepass-reward-row {
    width: min(1080px, calc(100vw - 360px)) !important;
    min-height: 118px !important;
    bottom: clamp(88px, 11vh, 130px) !important;
    z-index: 18 !important;
}

.battlepass-chest-modal.summary-mode .battlepass-reward-row {
    width: min(1180px, calc(100vw - 80px)) !important;
    min-height: 220px !important;
    bottom: clamp(58px, 8vh, 92px) !important;
}

.battlepass-summary-card,
.battlepass-chest-modal.summary-mode .battlepass-summary-card {
    position: relative !important;
    flex: 0 1 clamp(172px, 18vw, 228px) !important;
    width: clamp(172px, 18vw, 228px) !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 96px !important;
    max-height: 112px !important;
    padding: 12px 14px !important;
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    grid-auto-rows: min-content !important;
    align-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    transform-origin: bottom center !important;
    transition:
        flex-basis 220ms ease,
        width 220ms ease,
        max-height 220ms ease,
        min-height 220ms ease,
        transform 180ms ease,
        filter 180ms ease,
        box-shadow 180ms ease !important;
}

.battlepass-summary-card::after,
.battlepass-summary-card:hover::after,
.battlepass-summary-card:focus-within::after,
.battlepass-chest-modal.summary-mode .battlepass-summary-card::after {
    content: none !important;
    display: none !important;
}

.battlepass-summary-card img,
.battlepass-chest-modal.summary-mode .battlepass-summary-card img {
    width: 54px !important;
    height: 54px !important;
    align-self: start !important;
    object-fit: contain !important;
}

.battlepass-summary-copy {
    min-width: 0 !important;
    align-self: center !important;
}

.battlepass-summary-copy strong,
.battlepass-summary-copy span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.05 !important;
}

.battlepass-summary-copy strong {
    font-size: clamp(0.82rem, 1.08vw, 1rem) !important;
}

.battlepass-summary-copy span {
    font-size: clamp(1rem, 1.38vw, 1.34rem) !important;
}

.battlepass-summary-desc {
    grid-column: 1 / -1 !important;
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    color: rgba(237, 248, 255, 0.92) !important;
    font-size: clamp(0.78rem, 0.9vw, 0.92rem) !important;
    font-style: normal !important;
    font-weight: 900 !important;
    line-height: 1.18 !important;
    overflow: hidden !important;
    transition: max-height 220ms ease, opacity 150ms ease, margin-top 180ms ease !important;
}

.battlepass-summary-card:hover,
.battlepass-summary-card:focus-within,
.battlepass-chest-modal.summary-mode .battlepass-summary-card:hover,
.battlepass-chest-modal.summary-mode .battlepass-summary-card:focus-within {
    flex-basis: clamp(270px, 27vw, 380px) !important;
    width: clamp(270px, 27vw, 380px) !important;
    min-height: 172px !important;
    max-height: 230px !important;
    align-content: start !important;
    transform: translateY(-22px) scale(1.035) !important;
    z-index: 80 !important;
    filter: brightness(1.08) saturate(1.06);
    box-shadow:
        0 0 36px var(--loot-glow),
        0 20px 48px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.battlepass-summary-card:hover .battlepass-summary-desc,
.battlepass-summary-card:focus-within .battlepass-summary-desc {
    max-height: 104px !important;
    opacity: 1 !important;
    margin-top: 10px !important;
}

#boot-intro-overlay .boot-intro-gate::after {
    left: 3% !important;
    right: 3% !important;
    bottom: -12% !important;
    height: 82% !important;
    opacity: 0.72 !important;
    background:
        radial-gradient(ellipse at center, rgba(255, 24, 48, 0.88), rgba(255, 24, 48, 0.34) 42%, transparent 72%),
        radial-gradient(ellipse at center, rgba(255, 134, 42, 0.34), transparent 68%) !important;
    filter: blur(34px) !important;
    transform: translateY(14px) scaleX(0.92) !important;
}

#boot-intro-overlay .boot-intro-gate:hover::after,
#boot-intro-overlay .boot-intro-gate:focus-visible::after {
    opacity: 1 !important;
    transform: translateY(8px) scaleX(1.08) !important;
}

#boot-intro-overlay .boot-device-choice {
    grid-template-columns: repeat(2, minmax(280px, min(36vw, 560px))) !important;
    gap: clamp(28px, 5vw, 90px) !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(18px, 4vw, 56px) !important;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 32, 58, 0.20), transparent 34%),
        rgba(0, 0, 0, 0.24) !important;
}

#boot-intro-overlay .boot-device-card {
    width: min(36vw, 560px) !important;
    height: min(78vh, 780px) !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    filter:
        drop-shadow(0 22px 26px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 28px rgba(190, 78, 255, 0.50)) !important;
}

#boot-intro-overlay .boot-device-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

#boot-intro-overlay .boot-device-card:hover,
#boot-intro-overlay .boot-device-card:focus-visible {
    transform: translateY(-12px) scale(1.055) !important;
    filter:
        drop-shadow(0 26px 32px rgba(0, 0, 0, 0.56))
        drop-shadow(0 0 36px rgba(255, 36, 68, 0.62))
        drop-shadow(0 0 38px rgba(200, 92, 255, 0.58)) !important;
}

#boot-intro-overlay .boot-device-card:active {
    transform: translateY(4px) scale(0.97) !important;
}

#main-menu.screen.lobby-empty .lobby-left-stack,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-left-stack,
#main-menu.screen.lobby-empty .lobby-right-stack,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-right-stack {
    position: absolute !important;
    top: clamp(310px, 36vh, 390px) !important;
    bottom: clamp(24px, 3.2vh, 46px) !important;
    width: clamp(330px, 25vw, 470px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: clamp(24px, 4.6vh, 48px) !important;
    z-index: 7 !important;
}

#main-menu.screen.lobby-empty .lobby-left-stack,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-left-stack {
    left: clamp(48px, 6.2vw, 120px) !important;
    right: auto !important;
}

#main-menu.screen.lobby-empty .lobby-right-stack,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-right-stack {
    right: clamp(48px, 6.2vw, 120px) !important;
    left: auto !important;
}

#main-menu.screen.lobby-empty .lobby-side-card,
#main-menu.screen.lobby-empty .lobby-shop-card,
#main-menu.screen.lobby-empty .lobby-battle-pass,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-side-card,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-shop-card,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass {
    width: 100% !important;
    min-height: clamp(84px, 10vh, 112px) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    left: 50% !important;
    bottom: clamp(10px, 2.1vh, 24px) !important;
    width: clamp(250px, 22vw, 380px) !important;
    min-height: 0 !important;
    aspect-ratio: 2172 / 724 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    clip-path: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: translateX(-50%) !important;
    filter:
        drop-shadow(0 18px 24px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 30px rgba(255, 28, 52, 0.46)) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button::before,
#main-menu.screen.lobby-empty .lobby-play-button::after,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::before,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::after,
#main-menu.screen.lobby-empty .lobby-play-button > span,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button > span {
    display: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-button strong,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button strong {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateX(-50%) translateY(-6px) scale(1.045) !important;
    filter:
        drop-shadow(0 22px 28px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 38px rgba(255, 28, 52, 0.68))
        brightness(1.08) saturate(1.08) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:active,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateX(-50%) translateY(4px) scale(0.965) !important;
    filter:
        drop-shadow(0 10px 16px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 24px rgba(255, 28, 52, 0.52))
        brightness(1.16) !important;
}

@media (max-width: 980px) {
    #boot-intro-overlay .boot-device-choice {
        grid-template-columns: repeat(2, minmax(150px, 42vw)) !important;
    }

    #boot-intro-overlay .boot-device-card {
        width: min(42vw, 360px) !important;
        height: min(66vh, 540px) !important;
    }

    .battlepass-reward-row {
        width: min(720px, calc(100vw - 32px)) !important;
    }
}

@media (max-width: 760px) {
    #main-menu.screen.lobby-empty .lobby-left-stack,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-left-stack,
    #main-menu.screen.lobby-empty .lobby-right-stack,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-right-stack {
        position: static !important;
        width: 100% !important;
        gap: 14px !important;
    }

    #main-menu.screen.lobby-empty .lobby-play-button,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        width: min(310px, 72vw) !important;
    }

    .battlepass-reward-row,
    .battlepass-chest-modal.summary-mode .battlepass-reward-row {
        width: calc(100vw - 28px) !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding-bottom: 18px !important;
    }

    .battlepass-summary-card:hover,
    .battlepass-summary-card:focus-within {
        flex-basis: min(330px, 86vw) !important;
        width: min(330px, 86vw) !important;
        transform: translateY(-12px) scale(1.02) !important;
    }
}

/* Loading screen polish: red hover-only play glow and calmer edition picker. */
#boot-intro-overlay .boot-intro-gate::after {
    opacity: 0 !important;
    background:
        radial-gradient(ellipse at center, rgba(255, 20, 44, 0.86), rgba(255, 20, 44, 0.34) 42%, transparent 74%),
        radial-gradient(ellipse at center, rgba(255, 88, 42, 0.28), transparent 70%) !important;
    filter: blur(34px) !important;
}

#boot-intro-overlay .boot-intro-gate-image.idle {
    filter: none !important;
}

#boot-intro-overlay .boot-intro-gate:hover::after,
#boot-intro-overlay .boot-intro-gate:focus-visible::after {
    opacity: 1 !important;
    transform: translateY(8px) scaleX(1.08) !important;
}

#boot-intro-overlay .boot-intro-gate:hover .boot-intro-gate-image.idle,
#boot-intro-overlay .boot-intro-gate:focus-visible .boot-intro-gate-image.idle {
    opacity: 1 !important;
    transform: translateY(-5px) scale(1.055) !important;
    filter: drop-shadow(0 0 24px rgba(255, 20, 44, 0.82)) drop-shadow(0 0 44px rgba(255, 48, 66, 0.46)) brightness(1.12) !important;
}

#boot-intro-overlay .boot-intro-gate:active .boot-intro-gate-image.idle {
    filter: drop-shadow(0 0 18px rgba(255, 20, 44, 0.70)) brightness(1.16) !important;
}

#boot-intro-overlay .boot-device-choice {
    grid-template-columns: repeat(2, minmax(260px, min(30vw, 470px))) !important;
    gap: clamp(6px, 1.6vw, 28px) !important;
    background: rgba(0, 0, 0, 0.58) !important;
    backdrop-filter: blur(9px) brightness(0.68) saturate(0.92);
    -webkit-backdrop-filter: blur(9px) brightness(0.68) saturate(0.92);
}

#boot-intro-overlay .boot-device-card {
    filter: none !important;
    transition: none !important;
}

#boot-intro-overlay .boot-device-card:hover,
#boot-intro-overlay .boot-device-card:focus-visible,
#boot-intro-overlay .boot-device-card:active {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

#boot-intro-overlay .boot-device-card:hover img,
#boot-intro-overlay .boot-device-card:focus-visible img,
#boot-intro-overlay .boot-device-card:active img {
    transform: none !important;
}

@media (max-width: 980px) {
    #boot-intro-overlay .boot-device-choice {
        grid-template-columns: repeat(2, minmax(140px, 40vw)) !important;
        gap: clamp(4px, 1.4vw, 16px) !important;
    }
}

/* Lobby play button placement: larger, flush bottom, above ship, color-pop hover only. */
#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    z-index: 20 !important;
    left: 50% !important;
    bottom: 0 !important;
    width: clamp(360px, 31vw, 560px) !important;
    aspect-ratio: 2172 / 724 !important;
    transform: translateX(-50%) !important;
    filter: none !important;
    transition:
        transform 260ms cubic-bezier(0.18, 0.84, 0.22, 1),
        filter 260ms ease !important;
}

#main-menu.screen.lobby-empty .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-image {
    filter: saturate(1) contrast(1) brightness(1) !important;
    transition: filter 320ms ease, transform 320ms cubic-bezier(0.18, 0.84, 0.22, 1) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateX(-50%) translateY(-4px) scale(1.035) !important;
    filter: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible .lobby-play-image {
    filter: saturate(1.34) contrast(1.18) brightness(1.12) !important;
    transform: scale(1.012) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:active,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateX(-50%) translateY(2px) scale(0.975) !important;
    filter: none !important;
}

/* Final lobby play hitbox: bigger, above the ship, no glow; image-only color pop. */
#main-menu.screen.lobby-empty .lobby-ui-canvas {
    z-index: 60 !important;
}

#main-menu.screen.lobby-empty .lobby-ship-stage {
    z-index: 4 !important;
}

#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    position: absolute !important;
    z-index: 999 !important;
    left: 50% !important;
    bottom: -8px !important;
    width: clamp(460px, 39vw, 760px) !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2172 / 724 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    clip-path: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
    isolation: isolate !important;
    cursor: pointer !important;
    transform: translateX(-50%) !important;
    filter: none !important;
    transition: transform 320ms cubic-bezier(0.18, 0.84, 0.22, 1) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button *,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button * {
    pointer-events: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-button::before,
#main-menu.screen.lobby-empty .lobby-play-button::after,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::before,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button::after,
#main-menu.screen.lobby-empty .lobby-play-button > span,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button > span {
    display: none !important;
    box-shadow: none !important;
    filter: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    filter: saturate(0.58) brightness(0.72) contrast(1.28) !important;
    transform: scale(1) !important;
    transition:
        filter 340ms ease,
        transform 340ms cubic-bezier(0.18, 0.84, 0.22, 1) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible {
    transform: translateX(-50%) translateY(-8px) scale(1.065) !important;
    filter: none !important;
    box-shadow: none !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:hover .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-play-button:focus-visible .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:hover .lobby-play-image,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:focus-visible .lobby-play-image {
    filter: saturate(1.48) brightness(1.18) contrast(1.18) !important;
    transform: scale(1.025) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button:active,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button:active {
    transform: translateX(-50%) translateY(2px) scale(1.015) !important;
    filter: none !important;
    box-shadow: none !important;
}

body.lobby-launch-active {
    overflow: hidden;
}

body.lobby-launch-active #quest-side-panel,
body.lobby-launch-active #daily-quest-drawer {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(18px) scale(0.98) !important;
    transition: opacity 180ms ease, transform 180ms ease !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-ui-canvas {
    pointer-events: none !important;
    animation: lobbyLaunchUiExit 440ms cubic-bezier(0.2, 0.72, 0.18, 1) forwards;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-stage {
    pointer-events: none !important;
    opacity: 0 !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-bg-video {
    filter: brightness(0.72) saturate(1.16) contrast(1.08);
    transition: filter 420ms ease;
}

.lobby-launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    pointer-events: none;
    overflow: hidden;
    background: transparent;
    perspective: 900px;
}

.lobby-launch-vignette {
    position: absolute;
    inset: -4%;
    background:
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--launch-color) 18%, transparent), transparent 32%),
        radial-gradient(circle at 50% 54%, rgba(255, 255, 255, 0.12), transparent 22%),
        rgba(0, 0, 0, 0.10);
    opacity: 0;
    animation: lobbyLaunchVignette 1180ms cubic-bezier(0.18, 0.84, 0.22, 1) forwards;
}

.lobby-launch-ship {
    position: fixed;
    left: var(--launch-start-left);
    top: var(--launch-start-top);
    width: var(--launch-start-width);
    height: auto;
    object-fit: contain;
    transform: translate(-50%, -50%) translateZ(0) scale(1);
    transform-origin: center center;
    filter:
        drop-shadow(0 20px 28px rgba(0, 0, 0, 0.48))
        drop-shadow(0 0 22px var(--launch-glow));
    will-change: left, top, transform, filter;
    animation: lobbyShipLaunchFly 1280ms cubic-bezier(0.15, 0.86, 0.18, 1) forwards;
}

.lobby-launch-fill {
    position: absolute;
    inset: -12%;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), transparent 18%),
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--launch-color) 82%, #ffffff 12%), var(--launch-color) 44%, color-mix(in srgb, var(--launch-color) 72%, #050019 28%) 100%);
    animation: lobbyLaunchColorFill 1280ms cubic-bezier(0.18, 0.84, 0.22, 1) forwards;
}

@keyframes lobbyLaunchUiExit {
    0% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 0;
        filter: blur(10px);
    }
}

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

    38% {
        opacity: 0.58;
    }

    100% {
        opacity: 0.92;
        transform: scale(1.04);
    }
}

@keyframes lobbyShipLaunchFly {
    0% {
        left: var(--launch-start-left);
        top: var(--launch-start-top);
        transform: translate(-50%, -50%) translateZ(0) scale(1) rotate(-1.5deg);
        filter:
            drop-shadow(0 20px 28px rgba(0, 0, 0, 0.48))
            drop-shadow(0 0 20px var(--launch-glow))
            saturate(1.02) brightness(1);
    }

    24% {
        left: 50vw;
        top: 52vh;
        transform: translate(-50%, -50%) translateZ(120px) scale(1.18) rotate(0.8deg);
        filter:
            drop-shadow(0 28px 36px rgba(0, 0, 0, 0.42))
            drop-shadow(0 0 32px var(--launch-glow))
            saturate(1.1) brightness(1.06);
    }

    58% {
        left: 50vw;
        top: 50vh;
        transform: translate(-50%, -50%) translateZ(360px) scale(3.2) rotate(0deg);
        filter:
            drop-shadow(0 0 44px var(--launch-glow))
            saturate(1.22) brightness(1.14) contrast(1.08);
    }

    100% {
        left: 50vw;
        top: 50vh;
        transform: translate(-50%, -50%) translateZ(760px) scale(var(--launch-final-scale)) rotate(0deg);
        filter:
            blur(3px)
            saturate(1.34) brightness(1.42) contrast(1.14);
    }
}

@keyframes lobbyLaunchColorFill {
    0%,
    54% {
        opacity: 0;
        transform: scale(0.82);
    }

    76% {
        opacity: 0.48;
    }

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

@media (max-width: 980px) {
    #main-menu.screen.lobby-empty .lobby-play-button,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        bottom: -4px !important;
        width: min(82vw, 560px) !important;
    }
}

/* Final launch polish: reliable play hitbox spacing and slower cinematic launch. */
#main-menu.screen.lobby-empty .lobby-ship-stage {
    z-index: 3 !important;
    animation: lobbyShipHoverRaised 5.8s ease-in-out infinite !important;
}

#main-menu.screen.lobby-empty .lobby-center-ship,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-center-ship {
    max-height: min(46vh, 520px) !important;
}

#main-menu.screen.lobby-empty .lobby-play-button,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
    z-index: 4000 !important;
    bottom: -12px !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-ui-canvas {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-left-stack {
    animation: lobbyLaunchLeftOut 720ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-right-stack {
    animation: lobbyLaunchRightOut 720ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-top-stats,
#main-menu.screen.lobby-empty.lobby-launching .lobby-system-actions,
#main-menu.screen.lobby-empty.lobby-launching .lobby-player-card,
#main-menu.screen.lobby-empty.lobby-launching .lobby-logo {
    animation: lobbyLaunchTopFade 620ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.left {
    animation: lobbyLaunchLeftOut 620ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.right {
    animation: lobbyLaunchRightOut 620ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-play-button {
    animation: lobbyLaunchPlayOut 520ms cubic-bezier(0.2, 0.72, 0.18, 1) forwards !important;
}

.lobby-launch-overlay {
    background: transparent !important;
}

.lobby-launch-overlay.reveal-play-screen {
    animation: lobbyLaunchOverlayReveal 720ms ease forwards;
}

.lobby-launch-vignette {
    background:
        radial-gradient(circle at 50% 50%, var(--launch-soft), transparent 28%),
        radial-gradient(circle at 50% 54%, rgba(255, 255, 255, 0.08), transparent 20%),
        rgba(0, 0, 0, 0.08) !important;
    animation: lobbyLaunchVignetteSlow 3800ms cubic-bezier(0.18, 0.84, 0.22, 1) forwards !important;
}

.lobby-launch-ship-glow {
    position: fixed;
    left: var(--launch-start-left);
    top: var(--launch-start-top);
    width: var(--launch-glow-width);
    aspect-ratio: 1.55;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    background:
        radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--launch-color) 46%, rgba(255,255,255,0.22)), transparent 62%);
    opacity: 0;
    filter: blur(18px);
    mix-blend-mode: screen;
    animation: lobbyLaunchShipGlow 2700ms 820ms cubic-bezier(0.2, 0.78, 0.18, 1) forwards !important;
}

.lobby-launch-ship {
    animation: lobbyShipLaunchFlySlow 2700ms 920ms cubic-bezier(0.2, 0.02, 0.18, 1) forwards !important;
}

.lobby-launch-fill {
    background:
        radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--launch-color) 20%, transparent), transparent 30%),
        rgba(0, 0, 0, 0.96) !important;
    animation: lobbyLaunchDarkFade 3900ms cubic-bezier(0.18, 0.84, 0.22, 1) forwards !important;
}

@keyframes lobbyShipHoverRaised {
    0%,
    100% {
        transform: translate3d(0, -94px, 0) rotate(-0.8deg);
    }

    50% {
        transform: translate3d(0, -72px, 0) rotate(0.8deg);
    }
}

@keyframes lobbyLaunchLeftOut {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(-160px, 0, 0);
        filter: blur(7px);
    }
}

@keyframes lobbyLaunchRightOut {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(160px, 0, 0);
        filter: blur(7px);
    }
}

@keyframes lobbyLaunchTopFade {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -62px, 0) scale(0.98);
        filter: blur(8px);
    }
}

@keyframes lobbyLaunchPlayOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: none;
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(80px) scale(0.92);
        filter: blur(8px);
    }
}

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

    22% {
        opacity: 0.24;
    }

    58% {
        opacity: 0.54;
    }

    82% {
        opacity: 0.86;
    }

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

@keyframes lobbyLaunchShipGlow {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.86);
    }

    24% {
        opacity: 0.34;
        transform: translate(-50%, -50%) scale(1.02);
    }

    68% {
        opacity: 0.56;
        transform: translate(-50%, -50%) scale(1.42);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3.1);
    }
}

@keyframes lobbyShipLaunchFlySlow {
    0% {
        left: var(--launch-start-left);
        top: var(--launch-start-top);
        transform: translate(-50%, -50%) translateZ(0) scale(1) rotate(-0.8deg);
        filter:
            drop-shadow(0 20px 28px rgba(0, 0, 0, 0.48))
            drop-shadow(0 0 22px var(--launch-glow))
            saturate(1.02) brightness(1);
    }

    20% {
        left: 50vw;
        top: 49vh;
        transform: translate(-50%, -50%) translateZ(90px) scale(1.16) rotate(0.5deg);
        filter:
            drop-shadow(0 24px 30px rgba(0, 0, 0, 0.44))
            drop-shadow(0 0 32px var(--launch-glow))
            saturate(1.08) brightness(1.04);
    }

    46% {
        left: 50vw;
        top: 50vh;
        transform: translate(-50%, -50%) translateZ(210px) scale(1.72) rotate(0deg);
        filter:
            drop-shadow(0 0 38px var(--launch-glow))
            saturate(1.14) brightness(1.08);
    }

    72% {
        left: 50vw;
        top: 50vh;
        transform: translate(-50%, -50%) translateZ(520px) scale(4.6) rotate(0deg);
        filter:
            drop-shadow(0 0 54px var(--launch-glow))
            saturate(1.22) brightness(1.16) contrast(1.08);
    }

    100% {
        left: 50vw;
        top: 50vh;
        transform: translate(-50%, -50%) translateZ(920px) scale(var(--launch-final-scale)) rotate(0deg);
        filter:
            blur(4px)
            saturate(1.1) brightness(0.58) contrast(1.24);
    }
}

@keyframes lobbyLaunchDarkFade {
    0%,
    68% {
        opacity: 0;
    }

    82% {
        opacity: 0.42;
    }

    100% {
        opacity: 1;
    }
}

@keyframes lobbyLaunchOverlayReveal {
    0% {
        opacity: 1;
        background: #000;
    }

    100% {
        opacity: 0;
        background: #000;
    }
}

@media (max-width: 980px) {
    #main-menu.screen.lobby-empty .lobby-ship-stage {
        animation: lobbyShipHoverRaisedMobile 5.8s ease-in-out infinite !important;
    }

    #main-menu.screen.lobby-empty .lobby-play-button,
    #main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-play-button {
        bottom: -6px !important;
        width: min(88vw, 620px) !important;
    }
}

@keyframes lobbyShipHoverRaisedMobile {
    0%,
    100% {
        transform: translate3d(0, -48px, 0) rotate(-0.6deg);
    }

    50% {
        transform: translate3d(0, -34px, 0) rotate(0.6deg);
    }
}

/* Smoother launch revision: slow build, fast fly-through, full black hold, calm reveal. */
#main-menu.screen.lobby-empty.lobby-launching .lobby-left-stack,
#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.left {
    animation: lobbyLaunchLeftOffscreen 980ms cubic-bezier(0.16, 0.78, 0.16, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-right-stack,
#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.right {
    animation: lobbyLaunchRightOffscreen 980ms cubic-bezier(0.16, 0.78, 0.16, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-top-stats {
    animation: lobbyLaunchStatsOffscreen 860ms cubic-bezier(0.16, 0.78, 0.16, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-system-actions {
    animation: lobbyLaunchActionsOffscreen 860ms cubic-bezier(0.16, 0.78, 0.16, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-player-card {
    animation: lobbyLaunchPlayerOffscreen 860ms cubic-bezier(0.16, 0.78, 0.16, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-logo {
    animation: lobbyLaunchLogoOut 760ms cubic-bezier(0.2, 0.72, 0.18, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-play-button {
    animation: lobbyLaunchPlayDropOut 700ms cubic-bezier(0.18, 0.78, 0.18, 1) forwards !important;
}

.lobby-launch-overlay {
    perspective: 1200px !important;
}

.lobby-launch-overlay.reveal-play-screen {
    animation: lobbyLaunchBlackReveal 1120ms cubic-bezier(0.22, 0.72, 0.18, 1) forwards !important;
}

.lobby-launch-vignette {
    animation: lobbyLaunchVignetteCinematic 5000ms cubic-bezier(0.2, 0.78, 0.18, 1) forwards !important;
}

.lobby-launch-ship-glow {
    left: var(--launch-start-left) !important;
    top: var(--launch-start-top) !important;
    animation: lobbyLaunchGlowSmooth 3300ms 1180ms cubic-bezier(0.2, 0.78, 0.16, 1) forwards !important;
}

.lobby-launch-ship {
    left: var(--launch-start-left) !important;
    top: var(--launch-start-top) !important;
    animation: lobbyShipLaunchThroughScreen 3600ms 1180ms cubic-bezier(0.12, 0.02, 0.08, 1) forwards !important;
    backface-visibility: hidden;
}

.lobby-launch-fill {
    background: #000 !important;
    animation: lobbyLaunchFullBlack 5000ms cubic-bezier(0.2, 0.78, 0.16, 1) forwards !important;
}

@keyframes lobbyLaunchLeftOffscreen {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }

    42% {
        opacity: 0.92;
        transform: translate3d(-6vw, 0, 0) scale(0.99);
        filter: blur(1px);
    }

    100% {
        opacity: 0;
        transform: translate3d(-105vw, 0, 0) scale(0.96);
        filter: blur(9px);
    }
}

@keyframes lobbyLaunchRightOffscreen {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }

    42% {
        opacity: 0.92;
        transform: translate3d(6vw, 0, 0) scale(0.99);
        filter: blur(1px);
    }

    100% {
        opacity: 0;
        transform: translate3d(105vw, 0, 0) scale(0.96);
        filter: blur(9px);
    }
}

@keyframes lobbyLaunchStatsOffscreen {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -32vh, 0) scale(0.97);
        filter: blur(8px);
    }
}

@keyframes lobbyLaunchActionsOffscreen {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(34vw, -20vh, 0) scale(0.96);
        filter: blur(8px);
    }
}

@keyframes lobbyLaunchPlayerOffscreen {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translate3d(-42vw, -22vh, 0) scale(0.96);
        filter: blur(8px);
    }
}

@keyframes lobbyLaunchLogoOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-88px) scale(0.92);
        filter: blur(10px);
    }
}

@keyframes lobbyLaunchPlayDropOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: none;
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(34vh) scale(0.9);
        filter: blur(9px);
    }
}

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

    24% {
        opacity: 0.16;
    }

    46% {
        opacity: 0.34;
    }

    74% {
        opacity: 0.78;
    }

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

@keyframes lobbyLaunchGlowSmooth {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.72);
        filter: blur(24px);
    }

    28% {
        opacity: 0.46;
        transform: translate(calc(-50% + var(--launch-x-32)), calc(-50% + var(--launch-y-32))) scale(1.08);
        filter: blur(20px);
    }

    58% {
        opacity: 0.62;
        transform: translate(calc(-50% + var(--launch-x-78)), calc(-50% + var(--launch-y-78))) scale(1.82);
        filter: blur(26px);
    }

    86% {
        opacity: 0.18;
        transform: translate(calc(-50% + var(--launch-to-center-x)), calc(-50% + var(--launch-to-center-y))) scale(4.4);
        filter: blur(34px);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--launch-to-center-x)), calc(-50% + var(--launch-to-center-y))) scale(6.8);
        filter: blur(42px);
    }
}

@keyframes lobbyShipLaunchThroughScreen {
    0% {
        transform:
            translate(-50%, -50%)
            translate3d(0, 0, 0)
            scale(1)
            rotate(-0.6deg);
        opacity: 1;
        filter:
            drop-shadow(0 20px 28px rgba(0, 0, 0, 0.46))
            drop-shadow(0 0 18px var(--launch-glow))
            saturate(1.02) brightness(1);
    }

    18% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-x-24), var(--launch-y-24), 80px)
            scale(1.08)
            rotate(0.35deg);
        opacity: 1;
        filter:
            drop-shadow(0 22px 30px rgba(0, 0, 0, 0.46))
            drop-shadow(0 0 24px var(--launch-glow))
            saturate(1.05) brightness(1.03);
    }

    38% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-x-62), var(--launch-y-62), 170px)
            scale(1.34)
            rotate(0deg);
        opacity: 1;
        filter:
            drop-shadow(0 24px 34px rgba(0, 0, 0, 0.42))
            drop-shadow(0 0 34px var(--launch-glow))
            saturate(1.1) brightness(1.08);
    }

    58% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 310px)
            scale(2.12)
            rotate(0deg);
        opacity: 1;
        filter:
            drop-shadow(0 0 46px var(--launch-glow))
            saturate(1.18) brightness(1.12) contrast(1.05);
    }

    78% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 760px)
            scale(6.6)
            rotate(0deg);
        opacity: 0.92;
        filter:
            blur(0.8px)
            drop-shadow(0 0 58px var(--launch-glow))
            saturate(1.2) brightness(1.08) contrast(1.12);
    }

    100% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 1250px)
            scale(var(--launch-final-scale))
            rotate(0deg);
        opacity: 0;
        filter:
            blur(6px)
            saturate(0.72) brightness(0.22) contrast(1.32);
    }
}

@keyframes lobbyLaunchFullBlack {
    0%,
    70% {
        opacity: 0;
    }

    82% {
        opacity: 0.36;
    }

    92% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

@keyframes lobbyLaunchBlackReveal {
    0%,
    18% {
        opacity: 1;
        background: #000;
    }

    100% {
        opacity: 0;
        background: #000;
    }
}

/* Low-lag launch pass: transform/opacity only during flight, one smooth acceleration. */
#main-menu.screen.lobby-empty.lobby-launching .lobby-left-stack,
#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.left {
    animation: lobbyLaunchLeftOffscreenLite 820ms cubic-bezier(0.22, 0.72, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-right-stack,
#main-menu.screen.lobby-empty.lobby-launching .lobby-ship-arrow.right {
    animation: lobbyLaunchRightOffscreenLite 820ms cubic-bezier(0.22, 0.72, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-top-stats,
#main-menu.screen.lobby-empty.lobby-launching .lobby-system-actions,
#main-menu.screen.lobby-empty.lobby-launching .lobby-player-card,
#main-menu.screen.lobby-empty.lobby-launching .lobby-logo {
    animation: lobbyLaunchFadeOutLite 720ms cubic-bezier(0.22, 0.72, 0.2, 1) forwards !important;
}

#main-menu.screen.lobby-empty.lobby-launching .lobby-play-button {
    animation: lobbyLaunchPlayOutLite 620ms cubic-bezier(0.22, 0.72, 0.2, 1) forwards !important;
}

.lobby-launch-vignette {
    background: rgba(0, 0, 0, 0.12) !important;
    animation: lobbyLaunchVignetteLite 4300ms linear forwards !important;
}

.lobby-launch-ship-glow {
    left: var(--launch-start-left) !important;
    top: var(--launch-start-top) !important;
    background: color-mix(in srgb, var(--launch-color) 34%, transparent) !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    animation: lobbyLaunchStartGlowLite 780ms 820ms ease-out forwards !important;
}

.lobby-launch-ship {
    left: var(--launch-start-left) !important;
    top: var(--launch-start-top) !important;
    filter: none !important;
    will-change: transform, opacity !important;
    animation: lobbyShipLaunchOneMove 3000ms 960ms cubic-bezier(0.68, 0.02, 1, 0.88) forwards !important;
}

.lobby-launch-fill {
    background: #000 !important;
    will-change: opacity !important;
    animation: lobbyLaunchBlackEarlier 4300ms linear forwards !important;
}

.lobby-launch-overlay.reveal-play-screen {
    animation: lobbyLaunchBlackRevealSlow 1280ms ease forwards !important;
}

@keyframes lobbyLaunchLeftOffscreenLite {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    100% {
        opacity: 0;
        transform: translate3d(-112vw, 0, 0);
    }
}

@keyframes lobbyLaunchRightOffscreenLite {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    100% {
        opacity: 0;
        transform: translate3d(112vw, 0, 0);
    }
}

@keyframes lobbyLaunchFadeOutLite {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -18vh, 0) scale(0.98);
    }
}

@keyframes lobbyLaunchPlayOutLite {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(28vh) scale(0.94);
    }
}

@keyframes lobbyLaunchVignetteLite {
    0%,
    42% {
        opacity: 0;
    }

    70% {
        opacity: 0.32;
    }

    100% {
        opacity: 0.72;
    }
}

@keyframes lobbyLaunchStartGlowLite {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.86);
    }

    35% {
        opacity: 0.32;
        transform: translate(-50%, -50%) scale(1.06);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.42);
    }
}

@keyframes lobbyShipLaunchOneMove {
    0% {
        transform:
            translate(-50%, -50%)
            translate3d(0, 0, 0)
            scale(1)
            rotate(-0.4deg);
        opacity: 1;
    }

    100% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 0)
            scale(var(--launch-final-scale))
            rotate(0deg);
        opacity: 0;
    }
}

@keyframes lobbyLaunchBlackEarlier {
    0%,
    48% {
        opacity: 0;
    }

    72% {
        opacity: 0.86;
    }

    82%,
    100% {
        opacity: 1;
    }
}

@keyframes lobbyLaunchBlackRevealSlow {
    0%,
    26% {
        opacity: 1;
        background: #000;
    }

    100% {
        opacity: 0;
        background: #000;
    }
}

/* Launch final tuning: no ring, stronger slow-to-fast contrast, ship stays opaque. */
.lobby-launch-ship-glow {
    background:
        radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--launch-color) 18%, transparent), transparent 64%) !important;
    border-radius: 50% !important;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    animation: lobbyLaunchStartAuraNoRing 2100ms 120ms ease-out forwards !important;
}

.lobby-launch-ship {
    opacity: 1 !important;
    animation: lobbyShipLaunchSlowFastOpaque 3300ms 1080ms cubic-bezier(0.82, 0, 1, 0.74) forwards !important;
}

.lobby-launch-fill {
    animation: lobbyLaunchBlackEarlierLonger 4380ms linear forwards !important;
}

@keyframes lobbyLaunchStartAuraNoRing {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }

    18% {
        opacity: 0.22;
        transform: translate(-50%, -50%) scale(1.04);
    }

    58% {
        opacity: 0.20;
        transform: translate(-50%, -50%) scale(1.10);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.22);
    }
}

@keyframes lobbyShipLaunchSlowFastOpaque {
    0% {
        transform:
            translate(-50%, -50%)
            translate3d(0, 0, 0)
            scale(1)
            rotate(-0.35deg);
        opacity: 1;
    }

    44% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-x-12), var(--launch-y-12), 0)
            scale(1.08)
            rotate(-0.12deg);
        opacity: 1;
    }

    68% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-x-46), var(--launch-y-46), 0)
            scale(1.9)
            rotate(0deg);
        opacity: 1;
    }

    86% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-x-82), var(--launch-y-82), 0)
            scale(5.8)
            rotate(0deg);
        opacity: 1;
    }

    100% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 0)
            scale(var(--launch-final-scale))
            rotate(0deg);
        opacity: 1;
    }
}

@keyframes lobbyLaunchBlackEarlierLonger {
    0%,
    42% {
        opacity: 0;
    }

    62% {
        opacity: 0.54;
    }

    74% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

/* Launch timing tweak: single smooth move, earlier start, faster final push, fixed lobby aura. */
.lobby-launch-ship-glow {
    background:
        radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--launch-color) 42%, rgba(255, 255, 255, 0.18)), transparent 64%) !important;
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(1) !important;
    animation: lobbyLaunchFixedLobbyAura 3600ms 0ms linear forwards !important;
    will-change: opacity;
}

.lobby-launch-ship {
    opacity: 1 !important;
    animation: lobbyShipLaunchSingleSmoothPush 2460ms 120ms cubic-bezier(0.28, 0, 1, 0.10) forwards !important;
    will-change: transform;
}

.lobby-launch-fill {
    animation: lobbyLaunchBlackAtFullPage 3400ms linear forwards !important;
}

@keyframes lobbyLaunchFixedLobbyAura {
    0% {
        opacity: 0.28;
    }

    78% {
        opacity: 0.28;
    }

    100% {
        opacity: 0;
    }
}

@keyframes lobbyShipLaunchSingleSmoothPush {
    0% {
        transform:
            translate(-50%, -50%)
            translate3d(0, 0, 0)
            scale(1)
            rotate(-0.25deg);
        opacity: 1;
    }

    78% {
        opacity: 1;
    }

    100% {
        transform:
            translate(-50%, -50%)
            translate3d(var(--launch-to-center-x), var(--launch-to-center-y), 0)
            scale(var(--launch-final-scale))
            rotate(0deg);
        opacity: 0;
    }
}

@keyframes lobbyLaunchBlackAtFullPage {
    0%,
    42% {
        opacity: 0;
    }

    58% {
        opacity: 0.36;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

.battlepass-skip-button.collect-mode {
    border-color: rgba(255, 240, 150, 0.92) !important;
    background:
        radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.46), transparent 24%),
        linear-gradient(180deg, rgba(255, 219, 84, 0.98), rgba(255, 134, 37, 0.98) 52%, rgba(122, 47, 8, 0.98)) !important;
    box-shadow:
        0 14px 30px rgba(4, 12, 76, 0.34),
        0 0 28px rgba(255, 209, 102, 0.36),
        inset 0 4px 0 rgba(255, 255, 255, 0.24),
        inset 0 -7px 0 rgba(85, 28, 0, 0.24) !important;
}

.battlepass-skip-button.collect-mode strong {
    color: #ffffff;
}

.battlepass-skip-button.collect-mode:not(:disabled):hover {
    transform: translateY(-3px) scale(1.04);
    filter: brightness(1.1) saturate(1.12);
}

/* Earned chest lobby button: battlepass is replaced by level/boss chest unlocks. */
#main-menu.screen.lobby-empty .lobby-battle-pass,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass {
    position: relative !important;
    min-height: clamp(104px, 12vh, 136px) !important;
    grid-template-columns: clamp(82px, 6.3vw, 116px) minmax(0, 1fr) !important;
    gap: clamp(14px, 1.6vw, 24px) !important;
    padding: clamp(14px, 1.6vw, 22px) clamp(18px, 2vw, 30px) !important;
    border: 2px solid rgba(143, 222, 255, 0.46) !important;
    background:
        linear-gradient(90deg, rgba(30, 24, 88, 0.94), rgba(17, 13, 54, 0.90) 56%, rgba(37, 19, 78, 0.96)),
        radial-gradient(circle at 18% 48%, rgba(80, 197, 255, 0.18), transparent 44%) !important;
    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -16px 26px rgba(3, 5, 28, 0.30) !important;
    transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

#main-menu.screen.lobby-empty .lobby-battle-pass.chest-ready,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass.chest-ready {
    border-color: rgba(255, 219, 94, 0.84) !important;
    background:
        radial-gradient(circle at 18% 42%, rgba(255, 230, 120, 0.30), transparent 38%),
        linear-gradient(90deg, rgba(87, 54, 11, 0.98), rgba(48, 29, 88, 0.94) 52%, rgba(113, 57, 9, 0.96)) !important;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.36),
        0 0 26px rgba(255, 202, 70, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -16px 28px rgba(78, 29, 0, 0.32) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-pass.chest-empty,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass.chest-empty {
    filter: saturate(0.82) brightness(0.88) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-pass:hover,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass:hover {
    transform: translateX(0) scale(1.018) !important;
    filter: brightness(1.08) saturate(1.15) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-emblem,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-emblem {
    width: clamp(82px, 6.3vw, 112px) !important;
    height: clamp(82px, 6.3vw, 112px) !important;
    filter:
        drop-shadow(0 10px 14px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 16px rgba(255, 210, 85, 0.32)) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-pass.chest-ready .lobby-battle-emblem,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass.chest-ready .lobby-battle-emblem {
    filter:
        drop-shadow(0 10px 14px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 24px rgba(255, 222, 90, 0.62)) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-copy,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-copy {
    display: grid !important;
    gap: 8px !important;
}

#main-menu.screen.lobby-empty .lobby-battle-copy strong,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-copy strong {
    color: #fff4b4 !important;
    font-size: clamp(1.62rem, 2vw, 2.38rem) !important;
    line-height: 1 !important;
    text-shadow: 0 2px 0 rgba(64, 19, 0, 0.58), 0 0 16px rgba(255, 213, 81, 0.28) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-progress,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-progress {
    width: 100% !important;
    height: 24px !important;
    grid-template-columns: minmax(0, 1fr) minmax(78px, auto) !important;
    overflow: hidden !important;
    border: 1px solid rgba(136, 225, 255, 0.34) !important;
    border-radius: 999px !important;
    background: rgba(5, 8, 35, 0.62) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.38) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-fill,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-fill {
    width: 0%;
    border-radius: inherit !important;
    background: linear-gradient(90deg, #ffd75d, #ff7a35, #f32dff) !important;
    box-shadow: 0 0 18px rgba(255, 204, 82, 0.42) !important;
    transition: width 0.28s ease !important;
}

#main-menu.screen.lobby-empty .lobby-battle-progress em,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-progress em {
    padding: 0 10px !important;
    color: #ffffff !important;
    font-size: 0.88rem !important;
    white-space: nowrap !important;
}

#main-menu.screen.lobby-empty .lobby-chest-requirement,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-chest-requirement {
    display: block !important;
    color: rgba(223, 239, 255, 0.78) !important;
    font-size: clamp(0.74rem, 0.88vw, 0.96rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

#main-menu.screen.lobby-empty .lobby-chest-ribbon,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-chest-ribbon {
    min-width: 88px !important;
    background: linear-gradient(135deg, #506178, #23253f) !important;
    box-shadow: 0 0 14px rgba(87, 120, 168, 0.26) !important;
}

#main-menu.screen.lobby-empty .lobby-battle-pass.chest-ready .lobby-chest-ribbon,
#main-menu.screen.lobby-empty .lobby-ui-canvas .lobby-battle-pass.chest-ready .lobby-chest-ribbon {
    background: linear-gradient(135deg, #fff15a, #ff8a28 50%, #d725ff) !important;
    box-shadow: 0 0 18px rgba(255, 208, 76, 0.62) !important;
}

/* Virus Universe galaxy pass */
.perk-universe-topbar {
    top: 8px !important;
    left: 76px !important;
    right: 76px !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    border-color: rgba(117, 255, 157, 0.30) !important;
    background:
        linear-gradient(90deg, rgba(3, 8, 24, 0.92), rgba(11, 14, 46, 0.84), rgba(3, 20, 19, 0.88)) !important;
    backdrop-filter: blur(10px) !important;
}

.perk-universe-title {
    flex: 0 1 250px !important;
}

.perk-universe-title strong {
    font-size: 1.02rem !important;
}

.perk-universe-title small {
    font-size: 0.68rem !important;
}

.perk-universe-ship-pill {
    flex: 0 0 176px !important;
}

.perk-universe-xp-panel {
    flex: 1 1 320px !important;
    min-width: 230px !important;
}

.perk-bender-switcher {
    flex: 0 0 292px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 8px;
    padding: 8px 10px;
    border: 1px solid rgba(180, 92, 255, 0.30);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 12%, rgba(180, 92, 255, 0.22), transparent 44%),
        rgba(255, 255, 255, 0.045);
}

.perk-bender-switcher span {
    grid-column: 1 / -1;
    color: #b9c6ef;
    font-size: 0.66rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.perk-bender-switcher select {
    min-width: 0;
    height: 32px;
    border: 1px solid rgba(117, 255, 157, 0.22);
    border-radius: 7px;
    color: #ffffff;
    background: rgba(3, 7, 22, 0.88);
    font-weight: 900;
    padding: 0 8px;
    outline: none;
}

.perk-bender-switcher .btn {
    height: 32px;
    min-width: 76px !important;
    padding: 0 12px !important;
    font-size: 0.78rem !important;
}

.perk-universe-zoom-controls {
    flex: 0 0 auto !important;
}

.perk-current-open {
    min-width: 84px !important;
}

.perk-universe-topbar > .btn:not(.perk-current-open) {
    min-width: 74px !important;
}

@media (max-width: 1180px) {
    .perk-universe-topbar {
        left: 64px !important;
        right: 64px !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
    }

    .perk-universe-title,
    .perk-universe-ship-pill,
    .perk-universe-xp-panel,
    .perk-bender-switcher {
        flex: 1 1 240px !important;
    }
}

@media (max-width: 720px) {
    .perk-universe-topbar {
        top: 56px !important;
        left: 10px !important;
        right: 10px !important;
    }

    .perk-bender-switcher {
        grid-template-columns: minmax(0, 1fr);
    }

    .perk-bender-switcher .btn {
        width: 100% !important;
    }
}

/* Virus Universe header outside the star map. */
#perk-universe-screen {
    position: relative !important;
    overflow: hidden !important;
    backdrop-filter: none !important;
    isolation: isolate !important;
    background-color: #020406 !important;
    background-image: url("../virus_achtergrond.png?v=20260619-bg3") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#perk-universe-screen::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    display: block !important;
    background:
        radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.10) 68%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.08)) !important;
    filter: none !important;
    transform: none !important;
}

#perk-universe-screen .perk-universe-topbar {
    position: absolute !important;
    top: 6px !important;
    left: 174px !important;
    right: 28px !important;
    min-height: 56px !important;
    max-height: 62px !important;
    z-index: 10 !important;
    flex-wrap: nowrap !important;
    align-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 5px 8px !important;
    border-radius: 0 0 10px 10px !important;
    border: 1px solid rgba(117, 255, 157, 0.24) !important;
    border-top: 0 !important;
    background:
        linear-gradient(180deg, rgba(1, 9, 8, 0.97), rgba(4, 13, 18, 0.92)),
        radial-gradient(circle at 82% 42%, rgba(117, 255, 157, 0.16), transparent 42%),
        linear-gradient(90deg, rgba(255, 47, 143, 0.06), transparent 36%, rgba(55, 247, 255, 0.04)) !important;
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.32),
        inset 0 -1px 0 rgba(117, 255, 157, 0.18) !important;
}

#perk-universe-screen .perk-universe-stage {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 76px !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    z-index: 1 !important;
    contain: paint !important;
    background-color: transparent !important;
    background-image: none !important;
}

#perk-universe-screen .perk-universe-stage::before {
    content: none !important;
    display: none !important;
}

#perk-universe-screen .perk-universe-stage::after {
    content: none !important;
    display: none !important;
}

#perk-universe-screen #perk-universe-canvas {
    z-index: 2 !important;
    background: transparent !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
}

#perk-universe-screen .perk-universe-title {
    flex: 0 0 196px !important;
}

#perk-universe-screen .perk-universe-title strong {
    font-size: 0.88rem !important;
    line-height: 1 !important;
}

#perk-universe-screen .perk-universe-title small {
    font-size: 0.6rem !important;
}

#perk-universe-screen .perk-universe-virus-img,
#perk-universe-screen .perk-universe-virus-img img {
    width: 42px !important;
    height: 42px !important;
}

#perk-universe-screen .perk-universe-ship-pill {
    position: relative !important;
    flex: 0 0 252px !important;
    min-height: 40px !important;
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 10px 4px 5px !important;
    border: 1px solid rgba(111, 255, 158, 0.28) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    background:
        radial-gradient(circle at 20% 50%, rgba(76, 255, 146, 0.20), transparent 54%),
        linear-gradient(90deg, rgba(3, 28, 19, 0.94), rgba(5, 13, 25, 0.88)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.18) !important;
    cursor: pointer !important;
    overflow: hidden !important;
    text-align: left !important;
    transition: transform 0.16s ease, border-color 0.16s ease, filter 0.16s ease !important;
}

#perk-universe-screen .perk-universe-ship-pill:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(117, 255, 157, 0.58) !important;
    filter: brightness(1.08) saturate(1.12) !important;
}

#perk-universe-screen .perk-universe-ship-thumb {
    width: 52px !important;
    height: 38px !important;
    display: grid !important;
    place-items: center !important;
    pointer-events: none !important;
}

#perk-universe-screen .perk-universe-ship-thumb img {
    width: 66px !important;
    height: 50px !important;
    object-fit: contain !important;
    transform-origin: center !important;
    filter: drop-shadow(0 0 10px rgba(102, 255, 157, 0.36)) drop-shadow(0 8px 8px rgba(0, 0, 0, 0.42)) !important;
    animation: perkShipFloat 2.8s ease-in-out infinite !important;
}

#perk-universe-screen .perk-universe-ship-copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 1px !important;
}

@keyframes perkShipFloat {
    0%, 100% { transform: translateY(1px) rotate(-2deg) scale(0.98); }
    50% { transform: translateY(-3px) rotate(2deg) scale(1.03); }
}

#perk-universe-screen .perk-universe-xp-panel {
    flex: 1 1 360px !important;
    min-width: 260px !important;
    min-height: 40px !important;
    padding: 6px 10px !important;
}

#perk-universe-screen .perk-universe-xp-head strong {
    font-size: 0.92rem !important;
}

#perk-universe-screen .perk-universe-xp-bar {
    height: 6px !important;
    margin: 3px 0 2px !important;
}

#perk-universe-screen .perk-universe-xp-panel small,
#perk-universe-screen .perk-universe-ship-copy > span {
    font-size: 0.58rem !important;
    line-height: 1.05 !important;
}

#perk-universe-screen .perk-universe-ship-copy strong {
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#perk-universe-screen .perk-bender-switcher {
    flex: 0 0 318px !important;
    min-height: 40px !important;
    grid-template-rows: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 5px 7px !important;
    gap: 5px !important;
}

#perk-universe-screen .perk-bender-switcher[hidden] {
    display: none !important;
}

#perk-universe-screen .perk-bender-switcher span {
    display: none !important;
}

#perk-universe-screen .perk-bender-switcher select {
    height: 30px !important;
    font-size: 0.78rem !important;
}

#perk-universe-screen .perk-bender-switcher .btn {
    height: 30px !important;
    min-width: 98px !important;
    padding: 0 12px !important;
    font-size: 0.7rem !important;
}

#perk-universe-screen .perk-universe-zoom-controls button {
    width: 34px !important;
    height: 34px !important;
}

#perk-universe-screen .perk-current-open,
#perk-universe-screen .perk-universe-topbar > .btn:not(.perk-current-open) {
    min-width: 68px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 0.74rem !important;
}

.virus-xp-cost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #eafff3;
    font-weight: 1000;
    white-space: nowrap;
    vertical-align: middle;
}

.virus-xp-cost img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(117, 255, 157, 0.46));
}

.perk-detail-row .virus-xp-cost {
    color: #75ff9d;
}

.perk-detail-actions .btn .virus-xp-cost,
.perk-bender-switcher .btn .virus-xp-cost {
    margin-left: 4px;
}

.perk-bender-switcher .btn:disabled {
    opacity: 0.62;
    cursor: default;
}

@media (max-width: 1180px) {
    #perk-universe-screen .perk-universe-topbar {
        left: 76px !important;
        right: 12px !important;
        min-height: 64px !important;
        max-height: 112px !important;
        flex-wrap: wrap !important;
    }

    #perk-universe-screen .perk-universe-stage {
        top: 104px !important;
    }
}

@media (max-width: 720px) {
    #perk-universe-screen .perk-universe-topbar {
        top: 54px !important;
        left: 10px !important;
        right: 10px !important;
        min-height: 0 !important;
        max-height: 40vh;
        overflow: auto;
    }

    #perk-universe-screen .perk-universe-stage {
        top: 42vh !important;
    }
}
