:root {
    --bg: #15181f;
    --bg-elevated: #1d212b;
    --bg-soft: #262b37;
    --text: #f5f7fb;
    --muted: #9ea6b8;
    --accent: #ff8a1d;
    --accent-alt: #6ef7a7;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 138, 29, 0.18), transparent 30%),
        radial-gradient(circle at right center, rgba(110, 247, 167, 0.08), transparent 28%),
        linear-gradient(180deg, #13161d 0%, #1a1d24 100%);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 48px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(14, 16, 22, 0.7);
    backdrop-filter: blur(14px);
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.steam-login,
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, #ffbc42 100%);
    color: #111;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.balance-pill,
.message,
.panel,
.case-card,
.live-drop,
.item-card,
.roulette-item,
.transaction-row {
    border: 1px solid var(--border);
    background: rgba(25, 29, 36, 0.95);
}

.messages {
    margin-bottom: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 14px;
}

.hero,
.dashboard-grid,
.case-detail {
    display: grid;
    gap: 20px;
}

.hero {
    grid-template-columns: 1.25fr 0.95fr;
    align-items: start;
    margin-bottom: 28px;
}

.hero h1,
.panel h1 {
    margin: 8px 0 14px;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--accent-alt);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
}

.hero-copy,
.muted {
    color: var(--muted);
}

.hero-panel,
.panel,
.case-card {
    padding: 20px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.live-drops,
.inventory-grid,
.transaction-list {
    display: grid;
    gap: 12px;
}

.live-drop,
.item-card,
.transaction-row,
.roulette-item {
    border-radius: 18px;
    padding: 12px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.case-card img,
.case-preview {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.case-card-body {
    display: grid;
    gap: 10px;
}

.dashboard-grid,
.case-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid .panel:last-child,
.case-detail .panel:last-child {
    grid-column: 1 / -1;
}

.inventory-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.item-card img,
.roulette-item img,
.avatar {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 10px;
}

.avatar {
    max-width: 96px;
}

.center-panel {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.narrow {
    width: min(100%, 480px);
}

.stack-form p {
    display: grid;
    gap: 8px;
}

.roulette-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 150px);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-behavior: smooth;
}

.drop-result {
    margin-top: 16px;
}

.rarity-mil-spec {
    box-shadow: inset 0 0 0 1px rgba(48, 148, 255, 0.75);
}

.rarity-restricted {
    box-shadow: inset 0 0 0 1px rgba(130, 78, 255, 0.75);
}

.rarity-classified {
    box-shadow: inset 0 0 0 1px rgba(227, 60, 193, 0.75);
}

.rarity-covert {
    box-shadow: inset 0 0 0 1px rgba(255, 68, 68, 0.75);
}

.rarity-gold {
    box-shadow: inset 0 0 0 1px rgba(255, 203, 68, 0.85);
}

@media (max-width: 900px) {
    .hero,
    .dashboard-grid,
    .case-detail {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE — Stats bar
═══════════════════════════════════════════════════════════════ */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 18px 28px;
    margin-bottom: 36px;
    background: rgba(18, 21, 28, 0.88);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(16px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 5px;
    min-width: 0;
}

.stat-num {
    font-size: 1.65rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
    transition: color 0.3s;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 44px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 8px;
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE — Hero
═══════════════════════════════════════════════════════════════ */
.home-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 44px;
    min-height: 360px;
}

.home-hero-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-title {
    font-size: clamp(2.6rem, 5.5vw, 4.8rem);
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 900;
    margin: 8px 0 20px;
    letter-spacing: -0.02em;
}

.accent-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #ffbc42 50%, var(--accent-alt) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 0 28px;
    max-width: 460px;
}

.hero-cta {
    font-size: 1rem;
    min-height: 52px;
    padding: 0 32px;
    align-self: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Hero visual */
.home-hero-visual {
    position: relative;
}

.hero-glow-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.hero-glow-box::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle at center, rgba(255, 138, 29, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.hero-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-item-card {
    background: rgba(22, 26, 36, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 12px;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.hero-item-card:nth-child(odd) {
    animation: float-a 4.2s ease-in-out infinite;
}

.hero-item-card:nth-child(even) {
    animation: float-b 4.8s ease-in-out infinite 0.7s;
}

.hero-item-card.rarity-covert  { box-shadow: 0 0 18px rgba(255, 68, 68, 0.20),  inset 0 0 0 1px rgba(255, 68, 68, 0.4); }
.hero-item-card.rarity-gold    { box-shadow: 0 0 20px rgba(255,203, 68, 0.25),  inset 0 0 0 1px rgba(255,203, 68, 0.5); }
.hero-item-card.rarity-classified { box-shadow: 0 0 16px rgba(227,60,193,0.18), inset 0 0 0 1px rgba(227,60,193,0.4); }
.hero-item-card.rarity-restricted { box-shadow: 0 0 14px rgba(130,78,255,0.15), inset 0 0 0 1px rgba(130,78,255,0.35);}

@keyframes float-a {
    0%, 100% { transform: translateY(0px);  }
    50%       { transform: translateY(-9px); }
}

@keyframes float-b {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(7px); }
}

.hero-item-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto 10px;
    display: block;
}

.hero-item-name {
    font-size: 0.68rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 4px;
}

.hero-item-price {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--accent-alt);
    margin: 0;
}

.hero-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--muted);
}

.placeholder-glow {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,138,29,0.35), transparent);
    animation: float-a 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE — Live drops ticker
═══════════════════════════════════════════════════════════════ */
.drops-ticker-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 44px;
    overflow: hidden;
    padding: 14px 20px;
    background: rgba(16, 19, 26, 0.75);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.drops-ticker-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ff4444;
    white-space: nowrap;
    flex-shrink: 0;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    flex-shrink: 0;
    animation: live-pulse 1.2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255,68,68,0.5); }
    50%       { opacity: 0.5; transform: scale(0.8); box-shadow: 0 0 0 4px rgba(255,68,68,0); }
}

.drops-ticker {
    display: flex;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ticker-drop {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 8px;
    background: rgba(25, 29, 40, 0.95);
    border: 1px solid var(--border);
    border-radius: 50px;
    animation: ticker-slide-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ticker-slide-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.ticker-drop img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.ticker-drop-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ticker-drop-name {
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.ticker-drop-user {
    font-size: 0.66rem;
    color: var(--muted);
    white-space: nowrap;
}

.ticker-drop.rarity-covert     { border-color: rgba(255, 68, 68, 0.5);  box-shadow: 0 0 10px rgba(255, 68, 68, 0.12); }
.ticker-drop.rarity-classified { border-color: rgba(227, 60,193, 0.5);  box-shadow: 0 0 10px rgba(227, 60,193, 0.12); }
.ticker-drop.rarity-restricted { border-color: rgba(130, 78,255, 0.45); box-shadow: 0 0 10px rgba(130, 78,255, 0.10); }
.ticker-drop.rarity-gold       { border-color: rgba(255,203, 68, 0.6);  box-shadow: 0 0 12px rgba(255,203, 68, 0.18); }

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE — Section title & Cases
═══════════════════════════════════════════════════════════════ */
.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 22px;
}

.case-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.case-card-noimg {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    font-size: 3rem;
    background: var(--bg-elevated);
    border-radius: 18px;
    margin-bottom: 16px;
}

.case-card-price {
    color: var(--accent);
    font-weight: 800;
    font-size: 1.05rem;
    margin: 0;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.empty-state a {
    color: var(--accent);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-hero-visual {
        display: none;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1 0 45%;
    }

    .stat-num {
        font-size: 1.35rem;
    }
}

