/* ══════════════════════════════════════════════════════════════
   FragHub — Base Theme
   Shared foundation: variables, reset, CRT effects, keyframes,
   page header, link styles, reduced-motion.
   Linked by ALL pages. Page CSS files only add page-specific styles.
   ═══════════════════════════════════════════════════════════════ */
/* Self-hosted fonts (GDPR — no Google Fonts CDN) */
/* JetBrains Mono — variable font (single file covers weights 400-700) */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-greek.woff2') format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/jetbrains-mono-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
/* Orbitron — variable font (single file covers weights 400-900) */
@font-face { font-family: 'Orbitron'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/fonts/orbitron-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg-dark: #0a0c10; --bg-panel: #111520; --bg-panel-hover: #161d2e; --bg-sidebar: #0d1018; --bg-elevated: #1a1f30;
  --border: #1e2740; --border-bright: #2a3550; --border-glow: #3a4560;
  --accent: #f7a51c; --accent-dim: #d48f15; --accent-bright: #ffb940;
  --accent-glow: rgba(247,165,28,0.15); --accent-glow-strong: rgba(247,165,28,0.3);
  --accent-2: #00d4ff; --accent-2-glow: rgba(0,212,255,0.15);
  --text: #d4dae6; --text-dim: #6b7a98; --text-bright: #ffffff;
  --success: #4ae05e; --danger: #e04a4a; --queue: #4a9fe0;
  --steam: #1b2838; --steam-hover: #2a475e;
  --admin: #a855f7; --admin-glow: rgba(168,85,247,0.15);
  --owner: #e04a4a; --warn: #e0a64a;

  --rarity-consumer: #b0c3d9; --rarity-industrial: #5e98d9;
  --rarity-milspec: #4b69ff; --rarity-restricted: #8847ff;
  --rarity-classified: #d32ce6; --rarity-covert: #eb4b4b;
  --rarity-extraordinary: #e4ae39; --rarity-contraband: #e4ae39;
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(247,165,28,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0,212,255,0.02) 0%, transparent 50%);
  animation: flicker 4s ease-in-out infinite;
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: linear-gradient(rgba(247,165,28,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(247,165,28,0.025) 1px, transparent 1px);
  background-size: 60px 60px; opacity: 0.6;
}

/* ── CRT Effects ── */
.scanline-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 2; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.12), rgba(0,0,0,0.12) 1px, transparent 1px, transparent 2px); opacity: 0.35; }
.scanline-sweep { position: fixed; top: 0; left: 0; right: 0; height: 120px; pointer-events: none; z-index: 3; background: linear-gradient(180deg, transparent 0%, rgba(247,165,28,0.06) 50%, transparent 100%); animation: scanline 8s linear infinite; opacity: 0.4; }
.crt-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 4; background: radial-gradient(ellipse at center, transparent 0%, transparent 65%, rgba(10,12,16,0.4) 100%); }

/* ── Links ── */
a { color: var(--accent); text-decoration: none; }
a:not(.text-nodecor):hover { text-decoration: underline; }

/* ── Keyframes ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes glitch { 0%,100% { transform: translate(0); } 20% { transform: translate(-2px,1px); } 40% { transform: translate(2px,-1px); } 60% { transform: translate(-1px,-1px); } 80% { transform: translate(1px,1px); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 5px var(--accent-glow), 0 0 10px var(--accent-glow); } 50% { box-shadow: 0 0 12px var(--accent-glow-strong), 0 0 24px var(--accent-glow-strong); } }
@keyframes pulseGlowText { 0%,100% { text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow-strong); } 50% { text-shadow: 0 0 20px var(--accent), 0 0 35px var(--accent-glow-strong), 0 0 50px var(--accent-glow); } }
@keyframes scanline { 0% { transform: translateY(-100vh); } 100% { transform: translateY(100vh); } }
@keyframes flicker { 0%,100% { opacity: 0.98; } 50% { opacity: 0.94; } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes borderFlow { 0%,100% { opacity: 0.3; } 50% { opacity: 0.7; } }
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ── Animation Utilities ── */
.anim-slide-up { animation: slideInUp 0.5s cubic-bezier(0.25,0.46,0.45,0.94) both; }
.anim-slide-left { animation: slideInLeft 0.5s cubic-bezier(0.25,0.46,0.45,0.94) both; }
.anim-slide-right { animation: slideInRight 0.5s cubic-bezier(0.25,0.46,0.45,0.94) both; }
.anim-scale-in { animation: scaleIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
.anim-glitch { animation: glitch 0.3s cubic-bezier(0.25,0.46,0.45,0.94); }
.anim-delay-1 { animation-delay: 0.1s; } .anim-delay-2 { animation-delay: 0.2s; } .anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; } .anim-delay-5 { animation-delay: 0.5s; } .anim-delay-6 { animation-delay: 0.6s; }

/* ── Sub-page Header (profile, loadout, store, legal) ── */
.page-header { position: relative; padding: 16px 40px; border-bottom: 2px solid var(--border); background: linear-gradient(180deg, rgba(17,21,32,0.98), var(--bg-dark)); z-index: 10; display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(12px); }
.page-header::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--accent-2) 50%, var(--accent) 80%, transparent 100%); opacity: 0.4; }
.page-header h1 { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 900; color: var(--accent); letter-spacing: 8px; text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-glow-strong); transition: text-shadow 0.3s; }
.page-header h1:hover { text-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent-glow-strong), 0 0 45px var(--accent-glow); animation: glitch 0.3s; }
.page-header .header-subtitle { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); letter-spacing: 3px; text-transform: uppercase; margin-top: 2px; }
.page-header .header-subtitle::after { content: '\2588'; animation: blink 1s step-end infinite; color: var(--accent-dim); margin-left: 3px; font-size: 9px; }
.page-header .back-link { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 1px; color: var(--text-dim); border: 1px solid var(--border); padding: 5px 12px; transition: all 0.15s; }
.page-header .back-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; box-shadow: 0 0 8px var(--accent-glow); }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .scanline-sweep, .scanline-overlay { display: none !important; }
}
