/* =========================================================
   DraftDepth Base Styles
   Dark Fantasy Esports Theme
   ========================================================= */

/* =========================
   Variables
   ========================= */
:root {
  /* Color Palette */
  --color-bg: #050714; /* Deep midnight */
  --color-bg-elevated: #0b0e22;
  --color-bg-soft: #121634;

  --color-text: #f5f7ff;
  --color-text-muted: #a0a6d0;
  --color-text-soft: #7c81b0;

  --color-primary: #6c5ce7; /* Arcane violet */
  --color-primary-soft: rgba(108, 92, 231, 0.16);
  --color-primary-strong: #8e7bff;

  --color-accent-blue: #00d8ff;
  --color-accent-cyan-soft: rgba(0, 216, 255, 0.18);
  --color-accent-magenta: #ff4bff;

  --color-success: #3ddc97;
  --color-success-soft: rgba(61, 220, 151, 0.18);
  --color-warning: #ffb347;
  --color-warning-soft: rgba(255, 179, 71, 0.18);
  --color-danger: #ff4b5c;
  --color-danger-soft: rgba(255, 75, 92, 0.18);

  --color-gray-50: #f8fafc;
  --color-gray-100: #e2e8f0;
  --color-gray-200: #cbd5f5;
  --color-gray-300: #94a3b8;
  --color-gray-400: #64748b;
  --color-gray-500: #4b5563;
  --color-gray-600: #374151;
  --color-gray-700: #1f2937;
  --color-gray-800: #111827;
  --color-gray-900: #020617;

  /* Overlays & Borders */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-overlay-deep: rgba(2, 6, 23, 0.92);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Orbitron", "Rajdhani", system-ui, sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px converted to rem assuming 16px base) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows - arcane glow & depth */
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 18px 45px rgba(3, 4, 29, 0.9);
  --shadow-glow-primary: 0 0 18px rgba(108, 92, 231, 0.65);
  --shadow-glow-cyan: 0 0 20px rgba(0, 216, 255, 0.7);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --content-max-width: 1120px;
  --content-max-width-wide: 1320px;
  --header-height: 4.25rem;
}

/* =========================
   Reset / Normalize
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

button {
  border: none;
  background: none;
  padding: 0;
}

a {
  color: inherit;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================
   Base Typography & Layout
   ========================= */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: calc(100vh - var(--header-height));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 3vw + 1.8rem, var(--font-size-5xl)); margin-bottom: var(--space-4); }
h2 { font-size: clamp(1.9rem, 2.5vw + 1.2rem, var(--font-size-4xl)); margin-bottom: var(--space-3); }
h3 { font-size: clamp(1.5rem, 2vw + 1rem, var(--font-size-3xl)); margin-bottom: var(--space-3); }
h4 { font-size: var(--font-size-2xl); margin-bottom: var(--space-2); }
h5 { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
h6 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

/* Links */
a {
  text-decoration: none;
  color: var(--color-accent-blue);
  transition: color var(--transition-base), text-shadow var(--transition-base);
}

a:hover {
  color: var(--color-primary-strong);
  text-shadow: 0 0 8px rgba(0, 216, 255, 0.6);
}

a:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* =========================
   Accessibility Helpers
   ========================= */
:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 3px;
}

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

/* =========================
   Layout Utilities
   ========================= */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container-wide {
  width: 100%;
  max-width: var(--content-max-width-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: var(--space-12);
}

.section--tight {
  padding-block: var(--space-8);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs { gap: var(--space-2); }
.gap-sm { gap: var(--space-3); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Spacing utilities (margin / padding) */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.mt-xs { margin-top: var(--space-2); }
.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }
.mt-xl { margin-top: var(--space-8); }

.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }
.mb-xl { margin-bottom: var(--space-8); }

.pt-md { padding-top: var(--space-4); }
.pb-md { padding-bottom: var(--space-4); }
.pt-lg { padding-top: var(--space-6); }
.pb-lg { padding-bottom: var(--space-6); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* =========================
   Components: Buttons
   ========================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-inline: 1.6rem;
  padding-block: 0.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
}

.btn-primary {
  background: radial-gradient(circle at 0% 0%, rgba(0, 216, 255, 0.18), transparent 55%),
              linear-gradient(135deg, var(--color-primary), var(--color-accent-magenta));
  color: #ffffff;
  box-shadow: var(--shadow-glow-primary);
  border-color: rgba(140, 125, 255, 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-cyan);
  border-color: rgba(0, 216, 255, 0.9);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--color-text);
}

.btn-outline:hover {
  background: rgba(30, 64, 175, 0.6);
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 1px rgba(0, 216, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: rgba(30, 41, 59, 0.7);
  color: var(--color-text);
}

.btn-sm {
  padding-inline: 1rem;
  padding-block: 0.45rem;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding-inline: 2.1rem;
  padding-block: 0.9rem;
  font-size: var(--font-size-md);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 3px;
}

/* =========================
   Components: Form Controls
   ========================= */
.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.92);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 1px rgba(0, 216, 255, 0.7), 0 0 20px rgba(0, 216, 255, 0.3);
}

.input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.field-hint {
  margin-top: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

.field-error {
  margin-top: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* =========================
   Components: Card / Panels
   ========================= */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background:
    radial-gradient(circle at 0% 0%, rgba(108, 92, 231, 0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(0, 216, 255, 0.1), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.card--outlined {
  background: rgba(15, 23, 42, 0.9);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.5);
}

.card--glow-primary {
  box-shadow: var(--shadow-glow-primary);
  border-color: rgba(108, 92, 231, 0.7);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.card-footer {
  margin-top: var(--space-4);
}

/* =========================
   Theme-Specific Helpers
   ========================= */
.bg-surface-soft {
  background: radial-gradient(circle at top left, rgba(108, 92, 231, 0.20), transparent 60%),
              radial-gradient(circle at bottom right, rgba(0, 216, 255, 0.18), transparent 60%),
              linear-gradient(135deg, #020617, #020617 40%, #020617 100%);
}

.bg-panel {
  background: radial-gradient(circle at top, rgba(76, 81, 191, 0.2), transparent 60%),
              rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.text-muted { color: var(--color-text-muted); }
.text-soft { color: var(--color-text-soft); }
.text-accent { color: var(--color-accent-blue); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

.badge {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.55rem;
  padding-block: 0.2rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.badge--primary {
  border-color: rgba(108, 92, 231, 0.7);
  background: rgba(108, 92, 231, 0.18);
  color: var(--color-primary-strong);
}

.badge--success {
  border-color: rgba(61, 220, 151, 0.7);
  background: var(--color-success-soft);
  color: var(--color-success);
}

/* =========================
   Media Helpers
   ========================= */
.responsive-media {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.responsive-media > iframe,
.responsive-media > video,
.responsive-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Utility: Hero / Overlay Base
   (for pages like Home, Game Overview, Drafting Strategies)
   ========================= */
.hero-shell {
  position: relative;
  padding-block: clamp(4rem, 8vh, 6rem);
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 10% 0%, rgba(108, 92, 231, 0.32), transparent 60%),
    radial-gradient(circle at 90% 10%, rgba(0, 216, 255, 0.32), transparent 55%),
    radial-gradient(circle at 50% 110%, rgba(255, 75, 255, 0.24), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 7, 20, 0.2), rgba(5, 7, 20, 0.96));
  pointer-events: none;
}

.hero-shell > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: var(--font-size-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  margin-bottom: var(--space-2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: var(--space-3);
  text-shadow: 0 0 22px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
  max-width: 40rem;
  font-size: var(--font-size-md);
  color: var(--color-text-soft);
}

/* =========================
   Utility: Tactical Grid Lines
   (for backgrounds behind dashboards / strategy sections)
   ========================= */
.tactical-grid-bg {
  position: relative;
  overflow: hidden;
}

.tactical-grid-bg::before {
  content: "";
  position: absolute;
  inset: -1px;
  background-image: linear-gradient(
      rgba(148, 163, 184, 0.12) 1px,
      rgba(15, 23, 42, 0.4) 1px
    ),
    linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.12) 1px,
      rgba(15, 23, 42, 0.4) 1px
    );
  background-size: 40px 40px;
  mix-blend-mode: screen;
  opacity: 0.35;
  pointer-events: none;
}

.tactical-grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, transparent 0, rgba(5, 7, 20, 0.75) 65%);
  pointer-events: none;
}

.tactical-grid-bg > * {
  position: relative;
  z-index: 1;
}

/* =========================
   Utility: Tagline & Meta
   ========================= */
.page-eyebrow {
  font-size: var(--font-size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}

.page-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin-bottom: var(--space-2);
}

.page-intro {
  max-width: 40rem;
  color: var(--color-text-soft);
}

/* =========================
   End of base.css
   ========================= */
