/* NEON RUINS — base reset + atmosphere */

*, *::before, *::after { box-sizing: border-box; }

::selection {
    background: var(--accent);
    color: #000;
}

html {
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.45;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body {
    position: relative;
    min-height: 100dvh;
}

/* Void grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.55;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

/* Scanlines */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline) 2px,
        var(--scanline) 4px
    );
    opacity: 0.55;
}

body > * {
    position: relative;
    z-index: 1;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); text-shadow: 0 0 8px var(--primary-glow); }

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

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; }

h1, h2, h3, .font-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0;
}

.mono, .tabular {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

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

.positive, .pnl-up { color: var(--positive) !important; }
.negative, .pnl-down { color: var(--danger) !important; }

.empty-state, .no-selection {
    color: var(--muted);
    text-align: center;
    padding: 32px 16px;
    font-size: 14px;
}

.empty-state .icon,
.no-selection .icon {
    font-size: 36px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* App shell: fill viewport without page scroll (War Room / trade) */
body.app-shell {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
    body::after { display: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
