@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: dark;

    --bg-main: #080a0f;
    --bg-panel: #11141c;
    --bg-hover: #181d28;
    --bg-elevated: #1d2230;

    --accent: #9b5cff;
    --accent-hover: #ad7aff;
    --accent-soft: rgba(155, 92, 255, 0.14);
    --accent-border: rgba(155, 92, 255, 0.38);

    --cyan: #25c2e8;
    --green: #27c77a;
    --red: #f05252;
    --danger: #e5484d;
    --gold: #f5bf42;

    --text-main: #f6f7fb;
    --text-muted: #9199a;
    --text-dark: #080a0f;

    --border: #242a38;
    --border-light: #303749;

    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.48);

    --rarity-consumer: #b0c3d9;
    --rarity-industrial: #5e98d9;
    --rarity-milspec: #4b69ff;
    --rarity-restricted: #8847ff;
    --rarity-classified: #d32ce6;
    --rarity-covert: #eb4b4b;
    --rarity-gold: #e4ae39;
    --text-muted: #91949a;
    --mx: 50%;
    --my: 50%;
    touch-action: none;
   user-select: none;
   -webkit-user-select: none;
   -webkit-touch-callout: none;
 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

html {
    min-width: 320px;
    background: var(--bg-main);
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-width: 320px;
    height: 100vh;
    overflow: hidden;
    color: var(--text-main);
    background: var(--bg-main);
}

/* PREMIUM SPACE BACKGROUND */
#bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 45%, #0b1020 0%, #050816 48%, #02040b 100%);
}

#bg-fx::before,
#bg-fx::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

#bg-fx::before {
    inset: -25%;
    z-index: 0;
    background:
        radial-gradient(ellipse at 12% 18%, rgba(116, 68, 214, 0.25), transparent 34%),
        radial-gradient(ellipse at 86% 72%, rgba(20, 137, 190, 0.20), transparent 38%),
        radial-gradient(ellipse at 73% 8%, rgba(192, 54, 145, 0.13), transparent 30%);
    filter: blur(48px) saturate(1.25);
    animation: spaceNebulaDrift 28s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

#bg-fx::after {
    inset: 0;
    z-index: 3;
    opacity: 0.22;
    background:
        radial-gradient(
            420px circle at var(--space-mx, 50%) var(--space-my, 50%),
            rgba(115, 170, 255, 0.16),
            rgba(118, 77, 210, 0.05) 46%,
            transparent 74%
        );
    transition: opacity 500ms ease;
}

#bg-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.space-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 50% 42%, transparent 20%, rgba(1, 3, 9, 0.18) 72%, rgba(1, 2, 7, 0.66) 100%),
        linear-gradient(180deg, rgba(2, 4, 12, 0.05), rgba(2, 4, 12, 0.24));
}

@keyframes spaceNebulaDrift {
    0% {
        opacity: 0.78;
        transform: translate3d(-2%, -1%, 0) rotate(-2deg) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate3d(2%, 1%, 0) rotate(2deg) scale(1.08);
    }

    100% {
        opacity: 0.86;
        transform: translate3d(-1%, 3%, 0) rotate(-1deg) scale(1.13);
    }
}

@media (prefers-reduced-motion: reduce) {
    #bg-fx::before {
        animation: none;
    }
}

::selection {
    color: white;
    background: rgba(155, 92, 255, 0.7);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background: #343b4d;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5369;
    background-clip: padding-box;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    font-weight: 700;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease,
        opacity 160ms ease;
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: saturate(0.55);
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    background: #0c0f16;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-light);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    background: #10131b;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder {
    color: #697184;
}

input[type="range"] {
    min-height: auto;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

img {
    max-width: 100%;
}

.text-green {
    color: var(--green) !important;
    font-weight: 700;
}

.text-red {
    color: var(--danger) !important;
    font-weight: 700;
}

/* SIDEBAR */
#sidebar {
    position: relative;
    z-index: 20;
    display: flex;
    width: 254px;
    flex: 0 0 254px;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: rgba(13, 16, 23, 0.86);
    backdrop-filter: blur(12px);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
}

.logo {
    position: relative;
    display: flex;
    min-height: 106px;
    align-items: center;
    justify-content: center;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.012);
}

.logo::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: -1px;
    left: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.7;
}

.logo img {
    filter: drop-shadow(0 8px 18px rgba(155, 92, 255, 0.2));
    transition: transform 200ms ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.external-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.ext-link {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    padding: 0 12px;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    transition: 160ms ease;
}

.ext-link::before {
    width: 7px;
    height: 7px;
    margin-right: 10px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: 0.7;
    box-shadow: 0 0 10px currentColor;
}

.ext-link:hover {
    color: white;
    border-color: var(--border);
    background: var(--bg-hover);
    transform: translateX(2px);
}

.ext-link.twitch:hover {
    color: #b98cff;
}

.ext-link.telegram:hover {
    color: #42c4f2;
}

.ext-link.donate:hover {
    color: var(--gold);
}

.live-drops {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    padding: 16px 12px;
    background: rgba(6, 8, 12, 0.5);
}

.live-drops-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #c5cad5;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.live-drops-title::after {
    height: 1px;
    flex: 1;
    margin-left: 10px;
    background: var(--border);
    content: "";
}

.live-drops-list {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
}

.live-drop-item {
    position: relative;
    display: block;
    height: 58px;
    min-height: 58px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--accent);
    border-radius: 6px;
    background: var(--bg-panel);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.15);
    animation: liveDropEnter 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.live-drop-item:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
    transform: translateX(3px);
}

.live-drop-normal,
.live-drop-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.live-drop-hover {
    opacity: 0;
    transform: translateY(100%);
    background: var(--bg-hover);
}

.live-drop-item:hover .live-drop-normal {
    opacity: 0;
    transform: translateY(-100%);
}

.live-drop-item:hover .live-drop-hover {
    opacity: 1;
    transform: translateY(0);
}

.live-drop-icon {
    display: flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
}

.live-drop-info {
    min-width: 0;
    flex: 1;
    font-size: 11px;
}

.live-drop-info .name {
    overflow: hidden;
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* MAIN / HEADER */
#main-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: calc(100% - 254px);
    min-width: 0;
    min-height: 100vh;
    flex: 1;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}

#header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    width: 100%;
    min-height: 70px;
    height: 70px;
    flex: 0 0 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid rgba(48, 55, 73, 0.72);
    background: rgba(8, 10, 15, 0.72);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(16px);
}

.header-nav {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 6px;
}

.header-nav a {
    position: relative;
    display: flex;
    height: 42px;
    align-items: center;
    padding: 0 15px;
    color: var(--text-muted);
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    transition: 160ms ease;
}

.header-nav a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.045);
}

.header-nav a.active {
    color: white;
    background: var(--accent-soft);
}

.header-nav a.active::after {
    position: absolute;
    right: 14px;
    bottom: 4px;
    left: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
    box-shadow: 0 0 9px rgba(155, 92, 255, 0.7);
}

.header-actions {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 10px;
}

#sound-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel);
    font-size: 17px;
    color: white;
}

#sound-toggle:hover {
    border-color: var(--accent-border);
    background: var(--bg-hover);
}

.balance-display,
.header-pill {
    display: inline-flex;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel);
    box-shadow: var(--shadow-sm);
    transition: 160ms ease;
}

.balance-display {
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.header-pill {
    cursor: pointer;
    max-width: 200px;
}

.header-pill:hover {
    border-color: var(--accent-border);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.header-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-pill img {
    flex: 0 0 auto;
    border: 1px solid var(--border-light);
    border-radius: 50%;
}

#content {
    width: 100%;
    max-width: 1440px;
    flex: 1;
    margin: 0 auto;
    padding: 34px 38px 60px;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: viewEnter 350ms ease both;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
    padding-bottom: 11px;
    border: 0;
    color: var(--text-main);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

.section-title::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    content: "";
}

#home-promo-input {
    min-width: 190px;
    flex: 1 1 220px;
}

#home-promo-input + button {
    flex: 0 0 auto;
    min-width: 108px;
    padding-inline: 18px;
    white-space: nowrap;
}

/* CARDS / CASES */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 16px;
}

.card {
    position: relative;
    display: flex;
    min-height: 238px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
        rgba(17, 20, 28, 0.82);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    text-align: center;
    animation: surfaceEnter 320ms ease both;
    transition:
        transform 200ms ease,
        border-color 200ms ease,
        box-shadow 200ms ease,
        background-color 200ms ease;
}

.card::before {
    position: absolute;
    top: 0;
    right: 20%;
    left: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    content: "";
    opacity: 0.8;
}

.card:hover {
    border-color: var(--accent-border);
    background-color: var(--bg-hover);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    transform: translateY(-5px);
}

.card-icon {
    display: flex;
    width: min(180px, 100%);
    height: 138px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.35));
    transition: transform 260ms ease;
}

.card:hover .card-icon {
    transform: translateY(-3px) scale(1.04);
}

.card h3 {
    width: 100%;
    overflow: hidden;
    font-size: 16px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card .price {
    margin-top: 9px;
    color: #c9a9ff;
    font-size: 14px;
    font-weight: 800;
}

.case-header-info {
    margin-bottom: 24px;
    text-align: center;
}

.case-header-info > div {
    filter: drop-shadow(0 24px 32px rgba(155, 92, 255, 0.18));
    animation: caseFloat 4s ease-in-out infinite;
}

.case-header-info .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.item-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 15px;
    border: 1px solid var(--border);
    border-bottom: 3px solid transparent;
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.82);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.14);
    text-align: center;
    animation: surfaceEnter 320ms ease both;
    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.item-card::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 55%);
    content: "";
}

.item-card:hover {
    border-color: var(--border-light);
    background: var(--bg-hover);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.item-card.stock-0 {
    opacity: 0.35;
    filter: grayscale(0.8);
}

.item-card-icon {
    display: flex;
    width: 100px;
    height: 82px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.3));
}

.item-card .chance {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
}

.rare-glow {
    animation: rareGlowPulse 2.4s ease-in-out infinite;
}

@keyframes rareGlowPulse {
    0%,
    100% {
        box-shadow: 0 7px 20px rgba(0, 0, 0, 0.14);
    }

    50% {
        box-shadow:
            0 0 0 1px currentColor,
            0 0 22px rgba(155, 92, 255, 0.28);
    }
}

.opening-panel {
    margin: 18px 0 42px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
}

.opening-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.amount-selector {
    display: flex;
    max-width: 100%;
    gap: 4px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #090c12;
}

.amt-btn {
    min-width: 43px;
    padding: 9px 12px;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    font-size: 13px;
}

.amt-btn:hover {
    color: white;
    background: var(--bg-hover);
}

.amt-btn.active {
    color: white;
    border-color: var(--accent-border);
    background: var(--accent-soft);
    box-shadow: inset 0 0 12px rgba(155, 92, 255, 0.08);
}

.fast-drop-btn {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #0c0f16;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    user-select: none;
    transition: 180ms ease;
}

.fast-drop-btn:hover {
    color: white;
    border-color: var(--border-light);
}

.fast-drop-btn.active {
    color: var(--gold);
    border-color: rgba(245, 191, 66, 0.45);
    background: rgba(245, 191, 66, 0.09);
    box-shadow: 0 0 20px rgba(245, 191, 66, 0.08);
}

.lightning {
    display: inline-block;
    animation: lightningFlicker 1.6s ease-in-out infinite;
}

@keyframes lightningFlicker {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

.btn-deposit,
.btn-open-huge,
.btn-upgrade {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(135deg, #8e4ff2, #a865ff);
    box-shadow: 0 10px 24px rgba(155, 92, 255, 0.23);
}

.btn-deposit {
    padding: 11px 20px;
}

.btn-open-huge {
    width: 100%;
    min-height: 58px;
    padding: 16px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    font-size: 16px;
    text-transform: uppercase;
}

.btn-deposit:hover:not(:disabled),
.btn-open-huge:hover:not(:disabled),
.btn-upgrade:hover:not(:disabled) {
    background: linear-gradient(135deg, #9d61f7, #b477ff);
    box-shadow: 0 14px 34px rgba(155, 92, 255, 0.34);
    transform: translateY(-2px);
}

/* Одиночная рулетка */
.single-roulette-container {
    position: relative;
    display: none;
    width: 100%;
    height: 154px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.45), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.45)),
        #090c12;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.42);
}

.single-roulette-container::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 5;
    width: 2px;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
    content: "";
    transform: translateX(-50%);
    pointer-events: none;
}

/* Общий контейнер мульти-открытия. --reveal-columns из JS (максимум 5). */
.multi-roulettes-grid {
    display: none;
    grid-template-columns: repeat(var(--reveal-columns, 5), minmax(0, 1fr));
    gap: 10px;
    max-height: 62vh;
    overflow-y: auto;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c12;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.42);
}

/* 2-10 кейсов: крутящиеся барабаны. */
.mini-roulette {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 130px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.01);
}

.mini-roulette::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 5;
    width: 2px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    content: "";
    transform: translateX(-50%);
    pointer-events: none;
}

.roulette-strip {
    display: flex;
    height: 100%;
    will-change: transform;
}

.roulette-item {
    position: relative;
    display: flex;
    width: 150px;
    flex: 0 0 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.roulette-item-icon {
    display: flex;
    width: 80px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.roulette-item .name {
    width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 25/50/100 (фарм): быстрый reveal-грид, всегда 5 колонок. */
.bulk-open-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-height: 65vh;
}

.bulk-drop {
    position: relative;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: 3px solid var(--drop-rarity, var(--accent));
    border-radius: 7px;
    background: var(--bg-panel);
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.bulk-drop.revealed {
    animation: bulkDropReveal 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bulk-drop.rare-glow.revealed {
    animation:
        bulkDropReveal 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
        rareDropPulse 900ms ease 260ms 1;
}

.bulk-drop-number {
    position: absolute;
    top: 7px;
    left: 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
}

.bulk-drop-icon {
    display: flex;
    height: 62px;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
}

.bulk-drop-name {
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-drop-price {
    margin-top: 5px;
    color: var(--drop-rarity, var(--accent));
    font-size: 11px;
    font-weight: 800;
}

@keyframes bulkDropReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rareDropPulse {
    0%,
    100% {
        box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow:
            0 0 0 2px var(--drop-rarity, var(--accent)),
            0 0 34px rgba(155, 92, 255, 0.45);
    }
}

/* PROFILE */
.profile-dashboard {
    display: grid;
    grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.profile-user-card,
.profile-inventory-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    animation: surfaceEnter 340ms ease both;
}

.profile-user-card {
    position: relative;
    overflow: hidden;
    padding: 28px 24px;
    text-align: center;
}

.profile-user-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 80px;
    background:
        linear-gradient(120deg, rgba(155, 92, 255, 0.25), rgba(37, 194, 232, 0.08)),
        #141823;
    content: "";
}

#prof-avatar {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    object-fit: cover;
}

.profile-id {
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
    font-size: 22px;
    font-weight: 800;
    word-break: break-word;
}

.profile-profit {
    margin-bottom: 18px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #0c0f16;
    font-size: 18px;
    font-weight: 800;
}

.profile-stats-list {
    margin-bottom: 18px;
    text-align: left;
}

.profile-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.profile-stat-row span:first-child {
    color: var(--text-muted);
}

.profile-stat-row span:last-child {
    font-weight: 700;
}

.profile-inventory-box {
    min-width: 0;
    padding: 24px;
}

.profile-inventory-header {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.multi-select-bar {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #0c0f16;
    flex-wrap: wrap;
}

.inv-item {
    cursor: pointer;
}

.inv-item:hover {
    border-color: var(--accent-border) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28) !important;
    transform: translateY(-4px) !important;
}

.inv-item.multi-selected {
    border-color: var(--green) !important;
    background: rgba(39, 199, 122, 0.08);
    box-shadow: 0 0 0 2px rgba(39, 199, 122, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* UPGRADER */
.upgrade-wrapper {
    display: grid;
    max-width: 1000px;
    grid-template-columns: 220px minmax(240px, 1fr) 220px;
    align-items: center;
    gap: 28px;
    margin: 20px auto 28px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    animation: surfaceEnter 340ms ease both;
}

.upg-slot {
    position: relative;
    display: flex;
    width: 100%;
    height: 250px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    border: 1px dashed #3b4355;
    border-radius: 8px;
    background: #0b0e14;
    text-align: center;
    transition: border-color 200ms ease;
}

.upg-slot::after {
    position: absolute;
    right: 20%;
    bottom: 0;
    left: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    content: "";
    opacity: 0.65;
}

.upg-slot .icon-wrap {
    display: flex;
    width: 120px;
    height: 105px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.4));
    animation: surfaceEnter 260ms ease both;
}

.upg-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 19px;
}

.upgrade-spinner {
    position: relative;
    display: flex;
    width: 220px;
    height: 220px;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 7px solid #282e3c;
    border-radius: 50%;
    background: #080a0f;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.55),
        0 18px 45px rgba(0, 0, 0, 0.3);
}

.upgrade-spinner::before {
    position: absolute;
    top: -14px;
    left: 50%;
    z-index: 20;
    width: 0;
    height: 0;
    border-right: 11px solid transparent;
    border-top: 21px solid var(--gold);
    border-left: 11px solid transparent;
    content: "";
    filter: drop-shadow(0 3px 6px rgba(245, 191, 66, 0.35));
    transform: translateX(-50%);
}

.upg-wheel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0%, transparent 0%);
    transition: transform 4s cubic-bezier(0.1, 0, 0.1, 1);
}

.upg-chance-text {
    position: absolute;
    z-index: 10;
    display: flex;
    width: 100px;
    height: 100px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid #2d3444;
    border-radius: 50%;
    background: var(--bg-panel);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 23px;
    font-weight: 800;
}

.btn-upgrade {
    min-width: 152px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
}

.fast-upg-btn {
    display: flex;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #0c0f16;
    cursor: pointer;
    transition: 180ms ease;
}

.fast-upg-btn:hover,
.fast-upg-btn.active {
    color: var(--gold);
    border-color: rgba(245, 191, 66, 0.5);
    background: rgba(245, 191, 66, 0.08);
    box-shadow: 0 0 18px rgba(245, 191, 66, 0.1);
}

.upg-rebet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #0c0f16;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    user-select: none;
    transition: 180ms ease;
}

.upg-rebet-toggle:hover {
    color: white;
    border-color: var(--border-light);
}

.upg-rebet-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3a4356;
    transition: 180ms ease;
}

.upg-rebet-toggle.active {
    color: var(--green);
    border-color: rgba(39, 199, 122, 0.45);
    background: rgba(39, 199, 122, 0.08);
}

.upg-rebet-toggle.active .upg-rebet-dot {
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.upgrade-lists-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.upgrade-list-box {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    animation: surfaceEnter 340ms ease both;
}

.upgrade-items-grid {
    display: grid;
    max-height: 410px;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    align-content: start;
    gap: 9px;
    overflow-y: auto;
    padding-right: 4px;
}

.upgrade-items-grid .item-card {
    cursor: pointer;
}

.upgrade-items-grid .item-card:hover {
    transform: translateY(-3px);
}

.upgrade-items-grid .item-card.selected {
    border-color: var(--green) !important;
    background: rgba(39, 199, 122, 0.07);
    box-shadow: 0 0 0 2px rgba(39, 199, 122, 0.13);
}

.upgrade-empty {
    grid-column: 1 / -1;
    padding: 40px 15px;
    color: var(--text-muted);
    text-align: center;
}

.upg-preset-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    flex-wrap: wrap;
}

.upg-preset-row:last-child {
    margin-bottom: 0;
}

.upg-preset-label {
    width: 74px;
    flex: 0 0 74px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.upg-auto-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.upg-auto-btns > button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #0c0f16;
    font-size: 12px;
    font-weight: 700;
}

.upg-auto-btns > button:hover {
    color: white;
    border-color: var(--accent-border);
    background: var(--accent-soft);
}

.upg-custom {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: #0c0f16;
}

.upg-custom input {
    width: 66px;
    min-height: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

.upg-custom input::-webkit-outer-spin-button,
.upg-custom input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.upg-custom input:focus {
    box-shadow: none;
    background: #10131b;
}

.upg-custom button {
    min-height: 34px;
    padding: 0 12px;
    color: white;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: var(--accent-soft);
    font-size: 13px;
    font-weight: 800;
}

.upg-custom button:hover {
    background: var(--accent);
}

/* GAMES */
.minigame-wrapper {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 28, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-sm);
    text-align: center;
    animation: surfaceEnter 340ms ease both;
}

#snake-canvas {
    display: block;
    width: min(400px, 100%);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    background: #080a0f;
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.35),
        0 0 0 5px rgba(255, 255, 255, 0.018);
}

.game-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.mines-settings {
    display: flex;
    max-width: 340px;
    flex-direction: column;
    gap: 14px;
    margin: 0 auto;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.mines-grid {
    display: grid;
    width: min(100%, 340px);
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 20px auto;
}

.mine-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid #353d50;
    border-radius: 7px;
    background: linear-gradient(145deg, #2a3040, #1c212d);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.06),
        0 5px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-size: 21px;
    user-select: none;
    transition: 150ms ease;
}

.mine-cell:hover {
    border-color: var(--accent);
    background: #353050;
    box-shadow: 0 0 0 3px var(--accent-soft);
    transform: translateY(-2px);
}

.mine-cell.opened {
    color: white;
    border-color: rgba(39, 199, 122, 0.7);
    background: rgba(39, 199, 122, 0.2);
    box-shadow: inset 0 0 18px rgba(39, 199, 122, 0.15);
    cursor: default;
    animation: cellOpen 220ms ease;
}

.mine-cell.bomb {
    border-color: rgba(229, 72, 77, 0.8);
    background: rgba(229, 72, 77, 0.22);
    cursor: default;
    animation: bombReveal 300ms ease;
}

/* FOOTER */
#footer-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 0;
    margin-top: auto;
    padding: 0;
    border-top: 1px solid var(--border);
    background: rgba(13, 16, 23, 0.82);
    backdrop-filter: blur(10px);
}

.stat-box {
    position: relative;
    padding: 22px 14px;
    text-align: center;
}

.stat-box:not(:last-child)::after {
    position: absolute;
    top: 25%;
    right: 0;
    bottom: 25%;
    width: 1px;
    background: var(--border);
    content: "";
}

.stat-value {
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 800;
}

.stat-label {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

/* MODALS / TOASTS */
#toast-container {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    display: flex;
    width: min(360px, calc(100vw - 36px));
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    min-width: 0;
    padding: 14px 16px;
    color: white;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: rgba(17, 20, 28, 0.96);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(14px);
    font-size: 13px;
    font-weight: 650;
    pointer-events: auto;
    animation: toastEnter 300ms ease;
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--gold);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    background: rgba(4, 5, 8, 0.82);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: min(100%, 520px);
    max-width: 100%;
    padding: 32px;
    overflow: hidden;
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    background: var(--bg-panel);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: modalEnter 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#modal-multi .modal-content {
    width: min(100%, 860px);
    min-height: 0;
}

#modal-multi .modal-content > h2,
#modal-multi .modal-content > .modal-actions,
#modal-multi-grid + div {
    flex: 0 0 auto;
}

#modal-multi-grid {
    flex: 1 1 auto !important;
    min-height: 0;
    grid-template-columns:
        repeat(var(--result-columns, 5), minmax(0, 1fr));
    grid-auto-rows: 168px;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

#modal-multi-grid .multi-drop-item {
    width: 100%;
    min-width: 0;
    height: 168px;
    min-height: 168px;
    padding: 12px 8px 44px;
}

#modal-multi-grid .item-card-icon {
    width: 82px;
    max-width: 100%;
    margin-bottom: 7px;
}

#modal-multi-grid.bulk-results {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.modal-content h2 {
    margin-bottom: 18px;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.modal-actions button {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 14px;
}

/* Одиночный дроп в модалке */
#modal-single-icon {
    display: flex;
    width: 180px;
    height: 140px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 8px;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.4));
    animation: dropReveal 400ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#modal-single-icon.rare-glow {
    animation:
        dropReveal 400ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
        rareDropPulse 1200ms ease 400ms infinite;
}

#modal-single-name {
    margin-top: 18px;
    font-size: 22px;
    font-weight: 800;
}

/* Мульти-грид в модалке */
.multi-drop-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 4px;
}

.multi-drop-item {
    position: relative;
    padding: 12px;
    transition: 180ms ease;
}

.multi-drop-item.sold {
    opacity: 0.35;
    filter: grayscale(0.85);
    pointer-events: none;
}

.multi-drop-item .hover-actions {
    position: absolute;
    inset: auto 6px 6px 6px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transform: translateY(6px);
    transition: 180ms ease;
}

.multi-drop-item:hover .hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    flex: 1;
    min-height: 30px;
    padding: 5px;
    color: white;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.action-btn.sell {
    background: var(--green);
}

.action-btn.sell:hover {
    background: #2fd685;
}

.action-btn.upg {
    background: #2AABEE;
}

.action-btn.upg:hover {
    background: #38b7f5;
}

/* KEYFRAMES */
@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes surfaceEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes liveDropEnter {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes caseFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes dropReveal {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(-6deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes cellOpen {
    from {
        transform: scale(0.85);
    }

    to {
        transform: scale(1);
    }
}

@keyframes bombReveal {
    0% {
        transform: scale(0.85);
    }

    40% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(14px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    #bg-fx::before,
    #bg-fx::after,
    .blob {
        animation: none !important;
    }
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .upgrade-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .upg-slot {
        height: 200px;
    }

    .profile-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 200;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 250ms ease;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #main-wrapper {
        width: 100%;
    }

    #content {
        padding: 24px 18px 48px;
    }

    .upgrade-lists-wrapper {
        grid-template-columns: 1fr;
    }

    #footer-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-box:nth-child(3n)::after {
        display: none;
    }

    .multi-drop-grid,
    .bulk-open-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    #header {
        padding: 0 14px;
    }

    .header-nav a {
        padding: 0 10px;
        font-size: 13px;
    }

    .header-pill span {
        display: none;
    }

    .multi-roulettes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

.bulk-open-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#modal-multi {
    align-items: stretch;
    padding: 8px;
}

#modal-multi .modal-content {
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: none !important;
    padding: 16px 10px;
}

#modal-multi-grid,
#modal-multi-grid.bulk-results {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 158px;
    gap: 7px;
    margin: 12px 0;
}

#modal-multi-grid .multi-drop-item {
    height: 158px;
    min-height: 158px;
    padding: 9px 6px 40px;
}

#modal-multi-grid .multi-drop-item .hover-actions {
    opacity: 1;
    transform: none;
}

#modal-multi-grid + div {
    margin-top: 8px !important;
    padding-top: 10px !important;
}

#modal-multi-total {
    margin-bottom: 10px !important;
    font-size: 22px !important;
}


    #footer-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-box:nth-child(3n)::after {
        display: block;
    }

    .stat-box:nth-child(2n)::after {
        display: none;
    }

}
#header {
    display: flex;
    height: auto;
    min-height: 105px;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 7px;
    padding: 8px 12px;
}

.header-nav {
    order: 1;
    display: flex;
    width: 100%;
    height: 42px;
    min-height: 42px;
    gap: 4px;
}

.header-nav a {
    min-width: 0;
    height: 42px;
    flex: 1 1 0;
    justify-content: center;
    padding: 0 5px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.header-nav a.active::after {
    right: 8px;
    left: 8px;
}

.header-actions {
    order: 2;
    display: flex;
    width: 100%;
    height: 40px;
    min-height: 40px;
    justify-content: center;
    gap: 8px;
}

.header-actions .header-pill {
    display: none;
}

.header-actions .balance-display {
    height: 40px;
    flex: 1 1 auto;
    max-width: 190px;
}

.header-actions > a:has(button) {
    width: 100%;
}

.header-actions > a:has(button) button {
    width: 100%;
}

#sound-toggle {
    flex: 0 0 40px;
}
