:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #141414;
    --blue-primary: #0066ff;
    --blue-dark: #0052cc;
    --blue-glow: rgba(0, 102, 255, 0.4);
    --grey-dark: #1f1f1f;
    --grey-medium: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border-color: #1a1a1a;
    --green: #00cc66;
    --red: #ff3355;
}

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

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.mono { font-family: 'Space Mono', monospace; }

/* NAVBAR */
.navbar {
    background-color: rgba(10,10,10,0.85);
    border-bottom: 1px solid var(--grey-dark);
    padding: 1.1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-left { display: flex; align-items: center; gap: 0.7rem; }
.nav-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--blue-primary);
    box-shadow: 0 0 8px var(--blue-glow);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.nav-brand { font-size: 0.85rem; font-weight: 700; letter-spacing: 3px; color: var(--text-secondary); }
.nav-player { font-size: 1rem; font-weight: 600; color: var(--text-primary); letter-spacing: 0.5px; }
.nav-right { display: flex; align-items: center; gap: 0.5rem; }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-secondary);
    transition: background 0.3s;
}
.status-dot.online { background: var(--green); box-shadow: 0 0 8px rgba(0,204,102,0.5); }
.status-dot.error { background: var(--red); }
.status-label { font-size: 0.8rem; font-weight: 500; letter-spacing: 1px; color: var(--text-secondary); }

/* MAIN */
main { flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; padding: 0 3rem; }

/* HERO */
.hero-section { padding: 4rem 0 3rem; }
.hero-content {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-left { display: flex; justify-content: center; }
.avatar-block { position: relative; }
.player-avatar {
    width: 180px;
    filter: drop-shadow(0 0 30px rgba(0,102,255,0.3));
    image-rendering: pixelated;
}
.avatar-glow {
    position: absolute;
    bottom: -20px; left: 50%;
    transform: translateX(-50%);
    width: 120px; height: 40px;
    background: var(--blue-primary);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.25;
}
.hero-right { display: flex; flex-direction: column; gap: 1.2rem; }
.hero-badge {
    display: inline-block;
    background: rgba(0,102,255,0.15);
    border: 1px solid rgba(0,102,255,0.4);
    color: var(--blue-primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    width: fit-content;
}
.site-title { line-height: 1.1; }
.title-main {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.title-sub {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--blue-primary) 0%, #00ccff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc { font-size: 0.95rem; color: var(--text-secondary); }
.last-updated-row { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.update-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; color: var(--text-secondary); }
.update-value { font-size: 0.85rem; color: var(--blue-primary); }

/* SECTION HEADERS */
.stats-section { padding: 1rem 0 3rem; }
.gains-section { padding: 0 0 5rem; }
.section-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.section-title { font-size: 1.1rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: var(--grey-dark); }

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--grey-dark);
    border-radius: 10px;
    padding: 1.8rem 1.6rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,102,255,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover { border-color: rgba(0,102,255,0.4); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,102,255,0.15); }
.stat-card:hover::before { opacity: 1; }
.stat-card.ticking { border-color: var(--blue-primary); box-shadow: 0 0 20px var(--blue-glow); }
.stat-icon { font-size: 1.6rem; line-height: 1; padding-top: 0.2rem; }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.4rem; }
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
    min-height: 2rem;
}
.stat-delta {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0.3rem;
    min-height: 1rem;
    color: transparent;
    transition: color 0.3s;
}
.stat-delta.positive { color: var(--green); }
.stat-delta.negative { color: var(--red); }

/* GAINS GRID */
.gains-note { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.5rem; margin-top: -1rem; }
.gains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.gain-card {
    background: var(--bg-card);
    border: 1px solid var(--grey-dark);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
}
.gain-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.4rem; }
.gain-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green);
}
.gain-value.zero { color: var(--text-secondary); }

/* FOOTER */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--grey-dark); padding: 1.8rem 0; margin-top: 4rem; }
.footer-content { max-width: 1400px; margin: 0 auto; padding: 0 3rem; text-align: center; color: var(--text-secondary); font-size: 0.82rem; letter-spacing: 1px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    main { padding: 0 1.5rem; }
    .nav-container { padding: 0 1.5rem; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-left { justify-content: center; }
    .hero-badge { margin: 0 auto; }
    .title-main { font-size: 2.5rem; }
    .title-sub { font-size: 1.5rem; }
    .last-updated-row { justify-content: center; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

html { scroll-behavior: smooth; }
::selection { background-color: var(--blue-primary); color: #fff; }