@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Rajdhani:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ============================================================
   CSCrew Neon Glass — base.css
   Design tokens, CSS reset, scrollbar, selection, keyframes
   ============================================================ */

:root {
  /* === SURFACE COLORS === */
  --color-void:           #08090c;
  --color-surface-dark:   #0f1118;
  --color-surface-mid:    #161b27;
  --color-surface-light:  #1e2535;

  /* === BORDERS === */
  --color-border-subtle:  rgba(255,255,255,0.06);
  --color-border-default: rgba(255,255,255,0.12);
  --color-border-strong:  rgba(255,255,255,0.22);
  --color-border-hover:   rgba(91,127,255,0.4);
  --color-border-hover:   color-mix(in srgb, var(--main-color) 40%, transparent);

  /* === TEXT === */
  --color-text-primary:   #f0f2f8;
  --color-text-secondary: #8a92a8;
  --color-text-dim:       #4a5268;

  /* === DYNAMIC ACCENT === */
  --main-color:           #5b7fff;
  --accent-surface:       rgba(91,127,255,0.12);
  --accent-surface:       color-mix(in srgb, var(--main-color) 12%, transparent);
  --accent-border:        rgba(91,127,255,0.35);
  --accent-border:        color-mix(in srgb, var(--main-color) 35%, transparent);
  --accent-text:          #8ca5ff;
  --accent-text:          color-mix(in srgb, var(--main-color), white 30%);

  /* === RARITY PALETTE === */
  --rarity-consumer:      #b0b8c8;
  --rarity-milspec:       #4b7bff;
  --rarity-restricted:    #7c4dff;
  --rarity-classified:    #cc3fff;
  --rarity-covert:        #ff3b3b;
  --rarity-contraband:    #f0b030;

  /* === TEAM COLORS === */
  --color-team-t:         #ff9500;
  --color-team-ct:        #0096ff;

  /* === SEMANTIC === */
  --color-success:        #22c55e;
  --color-error:          #ef4444;
  --color-warning:        #fca5a5;

  /* === TYPOGRAPHY === */
  --font-display:         'Rajdhani', sans-serif;
  --font-body:            'Inter', sans-serif;
  --font-mono:            'JetBrains Mono', monospace;

  /* === SPACING (4px grid) === */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* === BORDER RADIUS === */
  --radius-xs:    4px;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --radius-2xl:   28px;
  --radius-pill:  9999px;
  --radius-cat:   0 0 120% 120% / 0 0 48% 48%;

  /* === GLOWS & SHADOWS === */
  --glow-accent:      0 0 24px rgba(91,127,255,0.5);
  --glow-accent:      0 0 24px color-mix(in srgb, var(--main-color), transparent 50%);
  --glow-tight:       0 0 10px rgba(91,127,255,0.4);
  --glow-tight:       0 0 10px color-mix(in srgb, var(--main-color), transparent 60%);
  --glow-covert:      0 0 20px rgba(255,59,59,0.4);
  --glow-contraband:  0 0 20px rgba(240,176,48,0.45);
  --glow-card:        0 8px 32px rgba(0,0,0,0.5);
  --glow-green:       0 0 20px rgba(34,197,94,0.4);
  --drop-weapon:      drop-shadow(0 0 8px rgba(0,0,0,0.9));
  --drop-rank:        drop-shadow(0 2px 8px var(--main-color));

  /* === TRANSITIONS === */
  --t-fast:       120ms ease;
  --t-base:       220ms ease;
  --t-slow:       380ms cubic-bezier(0.4,0,0.2,1);
  --t-progress:   1.6s cubic-bezier(0.4,0,0.2,1);
  --t-counter:    1.2s ease-out;
  --t-page:       600ms ease-in-out;
  --t-spring:     320ms cubic-bezier(0.34,1.56,0.64,1);

  /* === LAYOUT === */
  --sidebar-width:  280px;
  --topbar-height:  56px;
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-void);
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

p { color: var(--color-text-secondary); }

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--color-text-primary); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ============================================================
   SELECTION + FOCUS
   ============================================================ */

::selection {
  background: var(--main-color);
  color: var(--color-void);
}

::-moz-selection {
  background: var(--main-color);
  color: var(--color-void);
}

:focus-visible {
  outline: 2px dashed var(--main-color);
  outline-offset: 6px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-void); }
::-webkit-scrollbar-thumb {
  background: var(--color-surface-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-dim);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes card-drop {
  from { opacity: 0; transform: translateY(-18px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 6px var(--main-color); }
  50%      { box-shadow: 0 0 22px var(--main-color); }
}

@keyframes shimmer-sweep {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes rarity-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1.05); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-8px); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(20px) scale(0.95); }
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes confetti-pop {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.3); }
}

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

@keyframes progress-fill {
  from { width: 0; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.animate-in {
  animation: count-up var(--t-counter) ease-out forwards;
}

.card-drop-in {
  animation: card-drop var(--t-spring) forwards;
}

.shimmer-btn {
  background-size: 200% 100%;
  animation: shimmer-sweep 1.5s linear 1;
}
