/* ============================================
   CS2 Case Simulator - Authentic CS2 Style
   ============================================ */
:root {
    --bg: #1a1a2e;
    --bg-dark: #0f0f1a;
    --bg-panel: rgba(20, 20, 35, 0.95);
    --bg-item: rgba(30, 30, 50, 0.8);
    --text: #d4d4d4;
    --text-dim: #7a7a8a;
    --text-bright: #ffffff;
    --accent: #f5a623;

    --mil-spec: #4b69ff;
    --restricted: #8847ff;
    --classified: #d32ce6;
    --covert: #eb4b4b;
    --rare: #ffd700;

    --roulette-h: 124px;
    --item-w: 154px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Be Vietnam Pro', 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

img { max-width: 100%; }

/* =========== SCREEN SELECT =========== */
.screen { min-height: 100vh; }

#screen-select {
    background: linear-gradient(180deg, #68685f 0%, #55564f 14%, #474842 100%);
    padding-bottom: 34px;
}

#screen-select::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% -10%, rgba(255, 210, 120, 0.1), transparent 42%),
        radial-gradient(circle at 85% 0%, rgba(120, 170, 255, 0.08), transparent 40%);
    z-index: 0;
}

#screen-select > * {
    position: relative;
    z-index: 1;
}

.select-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: #f4f4f0;
}

.stats-bar { display: flex; gap: 18px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-label { display: block; font-size: 9px; text-transform: uppercase; color: rgba(255,255,255,0.55); letter-spacing: 0.8px; }
.stat-val { font-family: 'Be Vietnam Pro', sans-serif; font-size: 15px; font-weight: 700; color: var(--text-bright); }
.stat-val.positive { color: #4ade80; }
.stat-val.negative { color: #f87171; }

/* Cases grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 12px;
    padding: 16px 18px 8px;
    max-width: 1280px;
    margin: 0 auto;
}

.case-card {
    background: linear-gradient(180deg, rgba(89,90,84,0.95), rgba(112,113,106,0.94));
    border: 1px solid rgba(255,255,255,0.12);
    padding: 10px 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    position: relative;
    min-height: 170px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 18px rgba(0, 0, 0, 0.16);
}

.case-card::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
}

.case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.18);
}

.case-card-thumb {
    height: 106px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(145,146,138,0.18), rgba(66,67,61,0.06));
    margin-bottom: 10px;
}

.case-card img {
    width: 126px;
    height: 94px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.25));
    transition: transform 0.3s;
}

.case-card:hover img { transform: scale(1.03); }

.case-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #f2f1eb;
    margin-bottom: 3px;
    min-height: 30px;
}

.case-card-price {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    text-transform: uppercase;
}

/* =========== SCREEN OPEN =========== */
#screen-open {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0d0d1a;
}

.case-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.92) saturate(0.95);
    z-index: 0;
}

.case-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 18%, rgba(0,0,0,0.06) 40%, rgba(0,0,0,0.18) 100%);
}

#screen-open > *:not(.case-bg):not(.result-overlay) {
    position: relative;
    z-index: 1;
}

/* Top bar - see USER BAR section below */

.open-title-main {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.4px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.open-title-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}

.open-title-sub span {
    color: rgba(255,255,255,0.78);
    font-weight: 600;
}

/* Center area */
.open-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 6px 20px 0;
}

.case-display {
    text-align: center;
}

.case-3d {
    max-width: 430px;
    width: 100%;
    filter: drop-shadow(0 24px 50px rgba(0,0,0,0.32));
    animation: caseFloat 3s ease-in-out infinite;
}

@keyframes caseFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Subtitle */
.open-subtitle {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    padding: 0 20px 6px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

/* =========== ROULETTE =========== */
.roulette-wrapper {
    width: 100%;
    max-width: 980px;
    position: relative;
    margin: 8px auto 0;
}

.roulette-viewport {
    overflow: hidden;
    height: var(--roulette-h);
    position: relative;
}

.roulette-strip {
    display: flex;
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    will-change: transform;
}

.roulette-item {
    width: var(--item-w);
    min-width: var(--item-w);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 8px 6px;
    position: relative;
    background: rgba(255,255,255,0.18);
    border-right: 1px solid rgba(0,0,0,0.18);
    backdrop-filter: blur(1px);
}

.roulette-item::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
}

.roulette-item[data-rarity="mil_spec"]::before { background: var(--mil-spec); }
.roulette-item[data-rarity="restricted"]::before { background: var(--restricted); }
.roulette-item[data-rarity="classified"]::before { background: var(--classified); }
.roulette-item[data-rarity="covert"]::before { background: var(--covert); }
.roulette-item[data-rarity="rare"]::before { background: var(--rare); }

.roulette-item[data-rarity="mil_spec"] { background: linear-gradient(180deg, rgba(75,105,255,0.08), rgba(75,105,255,0.02)); }
.roulette-item[data-rarity="restricted"] { background: linear-gradient(180deg, rgba(136,71,255,0.08), rgba(136,71,255,0.02)); }
.roulette-item[data-rarity="classified"] { background: linear-gradient(180deg, rgba(211,44,230,0.08), rgba(211,44,230,0.02)); }
.roulette-item[data-rarity="covert"] { background: linear-gradient(180deg, rgba(235,75,75,0.1), rgba(235,75,75,0.02)); }
.roulette-item[data-rarity="rare"] { background: linear-gradient(180deg, rgba(255,215,0,0.12), rgba(255,215,0,0.02)); }

.roulette-item img {
    width: 116px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.28));
}

.roulette-item-name {
    font-size: 10px;
    color: rgba(255,255,255,0.95);
    text-align: left;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.roulette-item-weapon {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-align: left;
    width: 100%;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pointer / marker */
.roulette-pointer {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: var(--accent);
    z-index: 10;
    box-shadow: 0 0 15px rgba(245,166,35,0.5), 0 0 30px rgba(245,166,35,0.2);
}

.roulette-pointer::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--accent);
}

.roulette-pointer.bottom::before {
    top: auto;
    bottom: -8px;
    border-top: none;
    border-bottom: 12px solid var(--accent);
}

/* =========== ITEMS GRID =========== */
.items-grid-wrapper {
    padding: 0 24px 0;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    max-width: 1220px;
    margin: 0 auto;
}

.grid-item {
    min-width: 0;
    background: rgba(255,255,255,0.18);
    padding: 7px 6px 8px;
    text-align: left;
    cursor: default;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(1px);
}

.grid-item:hover {
    z-index: 5;
}

.grid-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
}

.grid-item[data-rarity="mil_spec"]::after { background: var(--mil-spec); }
.grid-item[data-rarity="restricted"]::after { background: var(--restricted); }
.grid-item[data-rarity="classified"]::after { background: var(--classified); }
.grid-item[data-rarity="covert"]::after { background: var(--covert); }
.grid-item[data-rarity="rare"]::after { background: var(--rare); }

.grid-item img {
    width: 100%;
    height: 62px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

.grid-item-name {
    font-size: 10px;
    color: rgba(255,255,255,0.96);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 24px;
}

.grid-item-rarity {
    font-size: 9px;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
    color: rgba(255,255,255,0.58);
}

.grid-item[data-rarity="mil_spec"] .grid-item-rarity { color: var(--mil-spec); }
.grid-item[data-rarity="restricted"] .grid-item-rarity { color: var(--restricted); }
.grid-item[data-rarity="classified"] .grid-item-rarity { color: var(--classified); }
.grid-item[data-rarity="covert"] .grid-item-rarity { color: var(--covert); }
.grid-item[data-rarity="rare"] .grid-item-rarity { color: var(--rare); }

/* Special item (rare/gold) */
.grid-item.special-item {
    background: linear-gradient(180deg, rgba(170,145,42,0.72), rgba(146,124,31,0.84));
}

.grid-item.special-item img {
    width: 100%;
    height: 62px;
    object-fit: cover;
}

.grid-item.special-item .grid-item-name {
    color: #fff6d4;
    text-align: center;
    min-height: auto;
}

/* =========== BOTTOM BAR =========== */
.open-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    background: rgba(0,0,0,0.28);
    border-top: 1px solid rgba(255,255,255,0.03);
    gap: 12px;
}

.bottom-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.key-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(245,166,35,0.2));
}

.key-text {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.key-text strong { color: rgba(255,255,255,0.78); }

.bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.open-count select {
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    min-width: 52px;
}

.unlock-btn {
    background: linear-gradient(180deg, #11b31d, #0e9818);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 2px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.6px;
    min-width: 86px;
}

.unlock-btn:hover {
    background: linear-gradient(180deg, #14c723, #10ab1c);
    box-shadow: 0 0 12px rgba(17,179,29,0.25);
}

.unlock-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.86);
    padding: 10px 10px;
    border-radius: 0;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.4px;
}

.close-btn:hover {
    color: white;
}

/* =========== RESULT OVERLAY (CS2 STYLE) =========== */
.result-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
    background: rgba(11, 16, 22, 0.7);
    backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-cs2 {
    position: relative;
    width: min(1020px, 86vw);
    height: min(460px, 64vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 18px 80px rgba(0,0,0,0.5);
    --result-glow: rgba(75,105,255,0.25);
    --result-glow-soft: rgba(75,105,255,0.08);
    --result-stripe: var(--mil-spec);
    background:
        radial-gradient(circle at 50% 52%, var(--result-glow) 0%, var(--result-glow-soft) 28%, rgba(8, 12, 17, 0.92) 64%),
        linear-gradient(180deg, rgba(30, 40, 52, 0.96) 0%, rgba(18, 24, 33, 0.98) 100%);
}

.result-rarity-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 7px;
    background: var(--result-stripe);
    z-index: 3;
}

.result-starburst {
    position: absolute;
    top: 50%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 560px;
    height: 560px;
    background: radial-gradient(ellipse at center, var(--result-glow) 0%, transparent 70%);
    z-index: 0;
    animation: starburstPulse 3.6s ease-in-out infinite;
}

@keyframes starburstPulse {
    0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -55%) scale(1.1); opacity: 0.8; }
}

/* Starburst rays */
.result-starburst::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    height: 520px;
    background: 
        repeating-conic-gradient(
            rgba(255,255,255,0.06) 0deg,
            rgba(255,255,255,0) 9deg,
            rgba(255,255,255,0) 21deg
        );
    border-radius: 50%;
    animation: starburstRotate 24s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.65;
}

@keyframes starburstRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Header */
.result-header {
    position: relative;
    z-index: 2;
    padding: 20px 34px 0 52px;
}

.result-new-item {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 54px;
    font-weight: 600;
    color: rgba(255,255,255,0.38);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 0.95;
    animation: slideInLeft 0.35s ease;
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Center item image */
.result-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 4px 20px 0;
}

.result-img {
    max-width: 590px;
    width: 62%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px var(--result-glow-soft)) drop-shadow(0 8px 32px rgba(0,0,0,0.45));
    animation: itemReveal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

@keyframes itemReveal {
    0% { transform: scale(0.66); opacity: 0; filter: brightness(1.5); }
    100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 30px var(--result-glow-soft)) drop-shadow(0 8px 32px rgba(0,0,0,0.5)); }
}

.result-bottom {
    position: relative;
    z-index: 2;
    padding: 8px 26px 16px 52px;
    background: linear-gradient(0deg, rgba(8,10,14,0.7) 0%, rgba(8,10,14,0.15) 100%);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 18px;
}

.result-item-name {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 35px;
    font-weight: 700;
    color: #f3f7ff;
    margin-bottom: 0;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.result-item-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 0;
}

.result-item-wear,
.result-item-float {
    font-size: 15px;
    line-height: 1;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}

.result-item-price {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 0;
    color: #8fd3ff;
}

.result-info {
    min-width: 0;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-self: end;
}

.result-btn {
    background: linear-gradient(180deg, rgba(68,72,79,0.82), rgba(41,45,52,0.92));
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    padding: 11px 36px;
    border-radius: 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    line-height: 1;
}

.result-btn:hover {
    background: linear-gradient(180deg, rgba(88,94,103,0.9), rgba(52,58,66,0.95));
    border-color: rgba(255,255,255,0.3);
}

/* Rarity-specific starburst colors */
.result-cs2[data-rarity="mil_spec"] { --result-glow: rgba(75,105,255,0.26); --result-glow-soft: rgba(75,105,255,0.1); --result-stripe: var(--mil-spec); }
.result-cs2[data-rarity="restricted"] { --result-glow: rgba(136,71,255,0.3); --result-glow-soft: rgba(136,71,255,0.11); --result-stripe: var(--restricted); }
.result-cs2[data-rarity="classified"] { --result-glow: rgba(211,44,230,0.3); --result-glow-soft: rgba(211,44,230,0.11); --result-stripe: var(--classified); }
.result-cs2[data-rarity="covert"] { --result-glow: rgba(235,75,75,0.32); --result-glow-soft: rgba(235,75,75,0.12); --result-stripe: var(--covert); }
.result-cs2[data-rarity="rare"] { --result-glow: rgba(255,214,88,0.34); --result-glow-soft: rgba(255,214,88,0.14); --result-stripe: var(--rare); }
.result-cs2[data-rarity="rare"] .result-starburst { animation: starburstPulse 2.6s ease-in-out infinite; }

/* Multi overlay */
.multi-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8,12,18,0.74);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.multi-content {
    position: relative;
    width: min(1020px, 90vw);
    max-height: 82vh;
    padding: 26px 24px 22px;
    border: 1px solid rgba(255,255,255,0.14);
    background:
        radial-gradient(circle at 50% 40%, rgba(140, 90, 240, 0.24) 0%, rgba(90, 62, 170, 0.06) 33%, rgba(17,22,30,0.94) 72%),
        linear-gradient(180deg, rgba(37,46,58,0.95), rgba(22,28,36,0.96));
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,0.52);
}

.multi-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #b47fff, #7e52ce);
}

.multi-content h3 {
    position: relative;
    z-index: 1;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 34px;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: rgba(233,241,255,0.9);
}

.multi-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.multi-item {
    background: linear-gradient(180deg, rgba(69,82,98,0.98), rgba(52,63,78,0.98));
    border: 1px solid rgba(165,186,210,0.14);
    padding: 10px 8px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 124px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.multi-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.multi-item[data-rarity="mil_spec"]::before { background: var(--mil-spec); }
.multi-item[data-rarity="restricted"]::before { background: var(--restricted); }
.multi-item[data-rarity="classified"]::before { background: var(--classified); }
.multi-item[data-rarity="covert"]::before { background: var(--covert); }
.multi-item[data-rarity="rare"]::before { background: var(--rare); }

.multi-item img { width: 98px; height: 66px; object-fit: contain; }
.multi-item .mi-name { font-size: 11px; margin-top: 5px; font-weight: 600; color: rgba(236,244,255,0.92); }
.multi-item .mi-price { font-size: 12px; color: #ffbc4d; margin-top: 2px; font-weight: 700; }

.multi-total {
    position: relative;
    z-index: 1;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 34px;
    color: #ffbc4d;
    margin-bottom: 14px;
}

/* =========== INVENTORY =========== */
.inventory-section {
    padding: 14px 18px 0;
    max-width: 1280px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(72,73,67,0.3), rgba(58,59,54,0.1));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
}

.inv-header h2 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 28px;
    letter-spacing: 0.6px;
    color: #f5f5ef;
}

.inv-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.inv-filters { display: flex; gap: 4px; flex-wrap: wrap; }

.inv-filter {
    background: rgba(55,56,52,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    padding: 5px 11px;
    border-radius: 0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.inv-filter:hover { background: rgba(255,255,255,0.1); }
.inv-filter.active {
    background: linear-gradient(180deg, #8a8b83, #6f7069);
    color: #fff;
    border-color: rgba(255,255,255,0.18);
    font-weight: 600;
}

.inv-clear {
    background: rgba(78,52,52,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    color: #f3b0b0;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.inv-clear:hover { background: rgba(239,68,68,0.25); }

.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 10px;
    min-height: 80px;
    padding-bottom: 14px;
}

.inv-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    padding: 30px;
    font-size: 14px;
}

.inv-card {
    background: linear-gradient(180deg, rgba(108,109,102,0.98), rgba(91,92,86,0.98));
    padding: 10px 8px 12px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid rgba(255,255,255,0.08);
    min-height: 164px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 14px rgba(0,0,0,0.13);
}

.inv-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15);
}

.inv-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
}

.inv-card[data-rarity="mil_spec"]::before { background: var(--mil-spec); }
.inv-card[data-rarity="restricted"]::before { background: var(--restricted); }
.inv-card[data-rarity="classified"]::before { background: var(--classified); }
.inv-card[data-rarity="covert"]::before { background: var(--covert); }
.inv-card[data-rarity="rare"]::before { background: var(--rare); }

.inv-thumb-wrap {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
}

.inv-card img {
    width: 108px;
    height: 68px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.inv-card .ic-name {
    font-size: 10px;
    font-weight: 600;
    color: #fffef8;
    line-height: 1.25;
    min-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inv-card .ic-wear,
.inv-card .ic-float {
    font-size: 9px;
    color: rgba(255,255,255,0.72);
    margin-top: 1px;
}

/* =========== GOLDEN GLOW FOR RARE =========== */
@keyframes goldenPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255,215,0,0.3); }
    50% { box-shadow: 0 0 60px rgba(255,215,0,0.5), 0 0 100px rgba(255,215,0,0.2); }
}

/* Strip uses JS animation, no CSS transition needed */

/* =========== RESPONSIVE =========== */
@media (max-width: 768px) {
    .select-title {
        font-size: 28px;
        text-align: center;
    }
    .select-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 12px 10px;
        gap: 10px;
    }
    .header-right {
        width: 100%;
        align-items: center;
        gap: 10px;
    }
    .user-bar {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .stats-bar {
        width: 100%;
        justify-content: center;
        gap: 12px;
        background: rgba(0, 0, 0, 0.16);
        border: 1px solid rgba(255,255,255,0.08);
        padding: 8px 6px;
    }
    .stat-item {
        min-width: 65px;
    }
    .cases-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px;
        gap: 10px;
    }
    .case-card {
        min-height: 164px;
        padding: 8px 8px 10px;
    }
    .case-card-thumb { height: 90px; }
    .case-card img { width: 104px; height: 74px; }
    .case-card-name {
        font-size: 15px;
        min-height: 34px;
    }
    .case-card-price {
        font-size: 12px;
    }
    :root { --item-w: 132px; --roulette-h: 116px; }
    .open-center { min-height: 240px; }
    .case-3d { max-width: 300px; }
    .roulette-item img { width: 92px; height: 54px; }
    .items-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-item img { height: 48px; }
    .grid-item-name { font-size: 9px; }
    .open-bottombar { flex-direction: column; align-items: stretch; }
    .bottom-left, .bottom-right { justify-content: center; }
    .key-text { white-space: normal; text-align: center; }
    .inventory-section {
        padding: 12px 10px;
    }
    .inv-header {
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 10px;
    }
    .inv-header h2 {
        font-size: 20px;
    }
    .inv-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .inv-filters {
        width: 100%;
    }
    .inv-filter, .inv-sell-all, .inv-clear {
        font-size: 11px;
        padding: 6px 9px;
    }
    .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .inv-card {
        min-height: 154px;
        padding: 8px 6px 10px;
    }
    .inv-thumb-wrap {
        height: 70px;
        margin-bottom: 7px;
    }
    .inv-card img {
        width: 96px;
        height: 62px;
    }
    .inv-card .ic-name {
        font-size: 10px;
        min-height: 22px;
    }
    .inv-card .ic-wear,
    .inv-card .ic-float {
        font-size: 9px;
    }
    .inv-card .sell-btn {
        left: 6px;
        right: 6px;
        bottom: 6px;
        font-size: 9px;
        padding: 5px;
    }
    .result-cs2 { width: 94vw; height: auto; min-height: 58vh; }
    .result-new-item { font-size: 42px; }
    .result-img { width: 88%; max-height: 220px; }
    .result-item-name { font-size: 22px; }
    .result-item-meta { gap: 10px; }
    .result-actions { justify-content: center; }
    .auth-box { width: 92vw; }
    .leaderboard-content { width: 92vw; }
}

/* =========== AUTH SCREEN =========== */
#screen-auth {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

.auth-box {
    background: rgba(20, 20, 40, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 40px 36px;
    width: 420px;
    max-width: 100%;
    text-align: center;
}

.auth-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #f5a623;
    letter-spacing: 2px;
    margin-bottom: 28px;
    text-shadow: 0 2px 20px rgba(245,166,35,0.3);
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tab:hover { color: rgba(255,255,255,0.8); }
.auth-tab.active {
    color: #f5a623;
    border-bottom-color: #f5a623;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-form input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    border-color: #f5a623;
}

.auth-form input::placeholder { color: rgba(255,255,255,0.35); }

.auth-error {
    color: #f87171;
    font-size: 13px;
    text-align: left;
    padding: 8px 12px;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.2);
}

.auth-submit {
    background: linear-gradient(180deg, #11b31d, #0e9818);
    border: none;
    color: white;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-submit:hover {
    background: linear-gradient(180deg, #14c723, #10ab1c);
    box-shadow: 0 0 16px rgba(17,179,29,0.3);
}

.auth-hint {
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.auth-hint strong { color: #4ade80; }

/* =========== USER BAR =========== */
.select-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 22px;
    background: linear-gradient(180deg, rgba(52,53,48,0.95), rgba(66,67,61,0.92));
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
    gap: 12px;
}

.header-left { display: flex; align-items: center; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #f5a623;
}

.user-balance {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74,222,128,0.1);
    padding: 4px 12px;
    border: 1px solid rgba(74,222,128,0.2);
}

.btn-leaderboard, .btn-logout {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-leaderboard:hover, .btn-logout:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.btn-logout {
    background: rgba(78,52,52,0.85);
    color: #f3b0b0;
    border-color: rgba(248,113,113,0.15);
}

.btn-logout:hover {
    background: rgba(239,68,68,0.25);
}

/* Open screen balance */
.open-topbar {
    text-align: center;
    padding: 28px 20px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.open-balance {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.3);
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.1);
}

.open-balance strong { color: #4ade80; font-size: 16px; }

/* =========== SELL BUTTONS =========== */
.inv-sell-all {
    background: rgba(34,78,52,0.9);
    border: 1px solid rgba(74,222,128,0.15);
    color: #a3f0b5;
    padding: 4px 10px;
    border-radius: 0;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.inv-sell-all:hover { background: rgba(74,222,128,0.25); }

.inv-card {
    cursor: pointer;
}

.inv-card .sell-btn {
    display: none;
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(74,222,128,0.9);
    border: none;
    color: #0a3a1a;
    padding: 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    z-index: 5;
}

.inv-card:hover .sell-btn { display: block; }

/* =========== LEADERBOARD =========== */
.leaderboard-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s;
}

.leaderboard-content {
    background: var(--bg-panel);
    padding: 30px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.leaderboard-content h3 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    color: #f5a623;
}

.lb-tabs {
    display: flex;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.lb-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.lb-tab:hover { color: rgba(255,255,255,0.8); }
.lb-tab.active { color: #f5a623; border-bottom-color: #f5a623; }

.lb-list { margin-bottom: 16px; }

.lb-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
}

.lb-row:first-child { background: rgba(255,215,0,0.08); }
.lb-row:nth-child(2) { background: rgba(192,192,192,0.06); }
.lb-row:nth-child(3) { background: rgba(205,127,50,0.06); }

.lb-row.current-user { border-left: 3px solid #f5a623; }

.lb-rank {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    width: 36px;
    text-align: center;
}

.lb-row:first-child .lb-rank { color: #ffd700; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-username {
    flex: 1;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.lb-value {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #4ade80;
}

.lb-close { margin-top: 8px; }

.lb-empty {
    color: rgba(255,255,255,0.4);
    padding: 30px;
    font-size: 14px;
}

/* =========== APP MODAL (CUSTOM ALERT/CONFIRM) =========== */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 18, 0.72);
    backdrop-filter: blur(5px);
}

.app-modal {
    position: relative;
    width: min(680px, 88vw);
    min-height: 250px;
    border: 1px solid rgba(255,255,255,0.15);
    background:
        radial-gradient(circle at 50% 45%, rgba(140, 90, 240, 0.2) 0%, rgba(70, 45, 130, 0.06) 35%, rgba(17, 22, 30, 0.94) 70%),
        linear-gradient(180deg, rgba(37, 46, 58, 0.95), rgba(22, 28, 36, 0.96));
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}

.app-modal::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #b47fff, #7e52ce);
}

.app-modal-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(203, 124, 255, 0.2) 0%, rgba(203, 124, 255, 0.04) 45%, transparent 75%);
    pointer-events: none;
}

.app-modal-header,
.app-modal-body,
.app-modal-actions {
    position: relative;
    z-index: 1;
}

.app-modal-header {
    padding: 20px 26px 6px 34px;
}

.app-modal-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(233, 241, 255, 0.9);
    font-size: 30px;
}

.app-modal-body {
    padding: 8px 34px 0;
    font-size: 18px;
    line-height: 1.45;
    color: rgba(226, 235, 247, 0.86);
    min-height: 110px;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px 20px;
    background: linear-gradient(0deg, rgba(10, 13, 18, 0.46), rgba(10, 13, 18, 0.12));
}

.app-modal-btn {
    border: 1px solid rgba(255,255,255,0.22);
    background: linear-gradient(180deg, rgba(100, 119, 147, 0.85), rgba(69, 84, 108, 0.95));
    color: rgba(246, 250, 255, 0.94);
    font-family: 'Be Vietnam Pro', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    font-size: 14px;
    padding: 10px 20px;
    cursor: pointer;
}

.app-modal-btn:hover {
    background: linear-gradient(180deg, rgba(125, 148, 180, 0.9), rgba(79, 98, 126, 0.95));
}

.app-modal-btn.ghost {
    background: linear-gradient(180deg, rgba(71, 77, 87, 0.78), rgba(46, 50, 58, 0.9));
}

/* =========== SELECT SCREEN V2 (CS2-LIKE) =========== */
#screen-select {
    background:
        linear-gradient(180deg, rgba(42, 49, 58, 0.98) 0%, rgba(28, 33, 40, 0.98) 45%, rgba(22, 26, 32, 1) 100%),
        url('assets/images/map_header.jpg');
    background-size: cover;
    background-attachment: fixed;
}

#screen-select::before {
    background:
        radial-gradient(circle at 22% -10%, rgba(120, 170, 255, 0.14), transparent 35%),
        radial-gradient(circle at 90% 0%, rgba(255, 180, 90, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.42));
}

.select-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 22px;
    background: linear-gradient(180deg, rgba(15,20,26,0.94), rgba(12,16,22,0.94));
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.select-nav-brand {
    font-size: 14px;
    letter-spacing: 1.8px;
    font-weight: 700;
    color: rgba(206, 220, 238, 0.85);
}

.select-nav-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.select-nav-tab {
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(220,230,242,0.72);
    padding: 4px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.select-nav-tab.active {
    background: linear-gradient(180deg, rgba(115,154,200,0.35), rgba(63,98,140,0.45));
    color: #e6f1ff;
}

#screen-select .select-header {
    background: linear-gradient(180deg, rgba(38,45,56,0.94), rgba(31,37,47,0.94));
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

#screen-select .select-title {
    font-size: 38px;
    letter-spacing: 0.8px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

.cases-section {
    max-width: 1280px;
    margin: 12px auto 0;
}

.section-caption {
    color: rgba(190, 205, 222, 0.72);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    margin: 0 18px 6px;
}

#screen-select .cases-grid {
    padding-top: 0;
}

#screen-select .case-card {
    background: linear-gradient(180deg, rgba(56,66,78,0.96), rgba(44,53,65,0.98));
    border-color: rgba(167, 187, 210, 0.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 20px rgba(0,0,0,0.24);
}

#screen-select .case-card::after {
    background: linear-gradient(90deg, rgba(88,128,183,0.5), rgba(102,174,255,0.78), rgba(88,128,183,0.5));
}

#screen-select .case-card-thumb {
    background: linear-gradient(180deg, rgba(148,172,201,0.14), rgba(66,84,105,0.06));
}

#screen-select .case-card-name {
    color: #e8eef8;
}

#screen-select .case-card-price {
    color: rgba(186, 203, 222, 0.72);
}

#screen-select .inventory-section {
    margin-top: 14px;
    background: linear-gradient(180deg, rgba(36,43,53,0.78), rgba(27,33,42,0.86));
    border-color: rgba(156,176,201,0.18);
}

#screen-select .inv-header h2 {
    color: #eaf3ff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#screen-select .inv-filter {
    background: rgba(57, 70, 85, 0.9);
    border-color: rgba(167, 188, 214, 0.2);
    color: rgba(214, 227, 243, 0.82);
}

#screen-select .inv-filter.active {
    background: linear-gradient(180deg, #7293b8, #4e6e93);
    border-color: rgba(200,220,245,0.3);
}

#screen-select .inv-card {
    background: linear-gradient(180deg, rgba(69,82,98,0.98), rgba(52,63,78,0.98));
    border-color: rgba(165,186,210,0.15);
}

.admin-tools {
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(186, 139, 70, 0.35);
    background: linear-gradient(180deg, rgba(64,44,23,0.55), rgba(41,29,17,0.6));
}

.admin-tools-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 210, 140, 0.9);
    margin-bottom: 7px;
}

.admin-tools-row {
    display: grid;
    grid-template-columns: 1fr 130px auto;
    gap: 7px;
}

.admin-tools-row input {
    height: 32px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(16,20,28,0.65);
    color: #e9eff8;
    padding: 0 10px;
    font-size: 12px;
}

.admin-tools-row input::placeholder {
    color: rgba(210,220,232,0.55);
}

#admin-grant-btn {
    border: 1px solid rgba(255,255,255,0.22);
    background: linear-gradient(180deg, rgba(62,125,86,0.92), rgba(44,95,65,0.95));
    color: #e9fff1;
    padding: 0 14px;
    height: 32px;
    font-size: 11px;
    letter-spacing: 0.6px;
    font-weight: 700;
    cursor: pointer;
}

#admin-grant-btn:hover {
    background: linear-gradient(180deg, rgba(73,145,101,0.95), rgba(51,110,75,0.98));
}

@media (max-width: 768px) {
    .select-nav {
        padding: 8px 10px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
    .select-nav-tabs {
        width: 100%;
    }
    #screen-select .select-title {
        font-size: 30px;
    }
    .cases-section {
        margin-top: 8px;
    }
    .section-caption {
        margin-left: 12px;
    }
    .admin-tools-row {
        grid-template-columns: 1fr;
    }
    #admin-grant-btn, .admin-tools-row input {
        width: 100%;
    }
}
