@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@400;700&display=swap');

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

:root {
  --bg-deep: #06080F;
  --bg-base: #0A0E1A;
  --bg-elev: #131726;
  --bg-glass: rgba(20, 25, 40, 0.65);
  --bg-card: rgba(15, 19, 32, 0.85);

  --fg-primary: #E8ECF4;
  --fg-secondary: #8A93A8;
  --fg-muted: #4B5366;
  --fg-dim: #2D3344;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.18);

  --gate-violet: #7C3AED;
  --gate-cyan: #06B6D4;
  --gate-pink: #F472B6;
  --gate-energy: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);

  --rank-f: #4B5366;
  --rank-e: #6B7280;
  --rank-d: #84A98C;
  --rank-c: #4FB3F9;
  --rank-b: #A78BFA;
  --rank-a: #F59E0B;
  --rank-s: #EF4444;
  --rank-ss: #FFFFFF;
  --rank-sss: linear-gradient(135deg, #7C3AED, #06B6D4, #F472B6);

  --accent: #7C3AED;
  --accent-2: #06B6D4;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Bebas Neue', 'Pretendard', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--fg-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 70% 15%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 25% 85%, rgba(255, 45, 135, 0.10), transparent 65%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(6, 182, 212, 0.05), transparent 70%),
    linear-gradient(180deg, #06080F 0%, #0A0E1A 50%, #131726 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.7 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.45;
  mix-blend-mode: overlay;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, transparent 70%, rgba(10, 14, 26, 0.6) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
  z-index: 2;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--gate-violet); color: white; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.5); }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.display {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 10;
}

.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;
}

.glow-text {
  text-shadow: 0 0 8px currentColor, 0 0 24px color-mix(in srgb, currentColor 50%, transparent);
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-subtle);
}

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