/* =========================================================
   Base CSS for Shadow Fight Arena Fan Hub
   Style: dynamic, immersive, competitive, modern, action-packed, sleek
   ============================================================ */

/* =========================================================
   1. CSS Variables
   ============================================================ */

:root {
  /* Color Palette - Core */
  --color-bg: #050814; /* Deep, immersive blue-black */
  --color-bg-elevated: #0c111f;
  --color-bg-soft: #13192a;

  --color-text: #f4f5fb;
  --color-text-muted: #a7b0c6;
  --color-text-soft: #7b849a;

  /* Brand / Accent Colors (Arena-inspired) */
  --color-primary: #e53945;            /* Energetic red */
  --color-primary-soft: #ff5a64;
  --color-primary-dark: #b51d2a;

  --color-accent: #3aa5ff;             /* Tactical blue for highlights */
  --color-accent-soft: #68c1ff;

  /* State Colors */
  --color-success: #3dd68c;
  --color-warning: #ffb547;
  --color-danger: #ff4b5c;

  /* Neutral Grays / Metallics */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #111827;
  --color-gray-900: #020617;

  --color-metal-light: #cfd6e6;        /* Subtle metallic silver */
  --color-metal-mid: #9aa3b8;
  --color-metal-dark: #4e5669;

  /* Borders & Overlays */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-overlay: rgba(4, 6, 15, 0.85);

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

  /* Typography - Base Sizes */
  --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 Heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (0–96px) */
  --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-none: 0;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows (metallic / arena glow) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.6);
  --shadow-glow-red: 0 0 20px rgba(229, 57, 69, 0.6);
  --shadow-glow-blue: 0 0 24px rgba(58, 165, 255, 0.5);

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

  /* Layout */
  --container-max-width: 1200px;
  --container-gutter: 1.5rem;
}

/* =========================================================
   2. Reset & Normalize
   ============================================================ */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
video,
audio,
canvas,
svg,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

picture {
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

/* =========================================================
   3. Base Typography & Layout
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

/* Headings - display font, arena feel */

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

h1 {
  font-size: clamp(2.25rem, 3.2vw + 1.5rem, 3.5rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.4vw + 1rem, 2.5rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.4rem, 1.5vw + 0.9rem, 2rem);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-md);
  margin-bottom: var(--space-1);
}

/* Paragraphs */

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

strong,
 b {
  font-weight: 600;
}

em,
 i {
  font-style: italic;
}

/* Links - modern, underline on focus/hover only */

a {
  color: var(--color-accent-soft);
  text-decoration: none;
  transition: color var(--transition-base),
    text-shadow var(--transition-base);
}

a:hover {
  color: var(--color-primary-soft);
  text-shadow: 0 0 8px rgba(229, 57, 69, 0.5);
}

a:active {
  color: var(--color-primary-dark);
}

/* Lists */

ul,
 ol {
  padding-left: 1.5rem;
  margin-bottom: var(--space-4);
}

li + li {
  margin-top: 0.25rem;
}

/* Code */

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

pre {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--color-border-subtle);
  overflow: auto;
}

/* Blockquotes (for tips/quotes) */

blockquote {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-accent);
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-md);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   4. Utilities
   ============================================================ */

/* Container */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

/* Flex Helpers */

.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

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

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

.flex-between {
  justify-content: space-between;
}

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

.gap-sm {
  gap: var(--space-2);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

/* Grid Helpers */

.grid {
  display: grid;
}

.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, limited set) */

.mt-0 { margin-top: 0 !important; }
.mt-sm { margin-top: var(--space-2) !important; }
.mt-md { margin-top: var(--space-4) !important; }
.mt-lg { margin-top: var(--space-8) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--space-2) !important; }
.mb-md { margin-bottom: var(--space-4) !important; }
.mb-lg { margin-bottom: var(--space-8) !important; }

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

/* Alignment / Text */

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

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

.text-muted {
  color: var(--color-text-soft);
}

/* Screen Reader Only */

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

/* Visually hidden but focusable (for skip links) */

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =========================================================
   5. Form Elements
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  outline: none;
  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,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 1px var(--color-accent-soft),
    0 0 0 4px rgba(58, 165, 255, 0.25);
}

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

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-metal-light);
}

/* =========================================================
   6. Buttons
   ============================================================ */

.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-soft) 48%, #ffdc5e 100%);
  color: #0b0b11;
  box-shadow: var(--shadow-soft), var(--shadow-glow-red);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast),
    background-position var(--transition-fast);
  background-size: 160% 160%;
  background-position: 0% 50%;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  color: #0b0b11;
  transform: translateY(-1px) scale(1.01);
  background-position: 100% 50%;
  box-shadow: var(--shadow-strong), var(--shadow-glow-red);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--shadow-soft);
}

.button--secondary {
  background: linear-gradient(135deg, #1f2937 0%, #374151 40%, #6b7280 100%);
  color: var(--color-text)!important;
  box-shadow: var(--shadow-soft);
}

.button--outline {
  background: transparent;
  border-color: var(--color-accent-soft);
  color: var(--color-accent-soft)!important;
  box-shadow: none;
}

.button--ghost {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--color-border-subtle);
  color: var(--color-text)!important;
}

.button--sm {
  padding: 0.4rem 1rem;
  font-size: var(--font-size-xs);
}

.button--lg {
  padding: 0.85rem 1.9rem;
  font-size: var(--font-size-md);
}

button:disabled,
.button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button:focus-visible,
.button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px #000,
    0 0 0 3px var(--color-accent-soft);
}

/* =========================================================
   7. Cards & Surfaces
   ============================================================ */

.card {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98));
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* Subtle metallic top edge */
.card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-metal-light), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.card--highlight {
  border-color: rgba(229, 57, 69, 0.6);
  box-shadow: var(--shadow-strong), var(--shadow-glow-red);
}

.card--soft {
  background: rgba(15, 23, 42, 0.9);
  border-style: dashed;
}

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

.card-title {
  margin-bottom: var(--space-1);
}

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

/* Hero / spotlight panel */

.surface-hero {
  position: relative;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(229, 57, 69, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(58, 165, 255, 0.22), transparent 55%),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.surface-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.13), transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* =========================================================
   8. Accessibility & Motion
   ============================================================ */

/* Focus visible outline for all interactive elements */

a[href],
button,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
  outline-offset: 2px;
}

a[href]:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--color-accent-soft);
  outline-offset: 3px;
}

/* Respect prefers-reduced-motion */

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

/* =========================================================
   9. Misc Helpers for Arena-style UI
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-metal-light);
}

.badge--danger {
  border-color: rgba(229, 57, 69, 0.8);
  color: var(--color-primary-soft);
}

.badge--success {
  border-color: rgba(61, 214, 140, 0.8);
  color: var(--color-success);
}

.tagline {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}

.hr-gradient {
  border: 0;
  height: 1px;
  margin: var(--space-6) 0;
  background-image: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.9), transparent);
}

/* Responsive helper: clamp hero sections padding */

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--alt {
  background: radial-gradient(circle at top right, rgba(229, 57, 69, 0.22), transparent 55%),
    radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.85), #020617 75%);
}

