/* ========================================================================== 
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-background: #050814;
  --color-background-elevated: #070b1c;
  --color-background-soft: #0d1024;
  --color-surface: #11152b;
  --color-surface-alt: #171b33;

  --color-text: #e5e7ff;
  --color-text-muted: #8c90b5;
  --color-text-soft: #6b6f96;

  --color-primary: #3ae0ff;
  --color-primary-soft: rgba(58, 224, 255, 0.14);
  --color-primary-strong: #40a9ff;

  --color-accent: #9b5cff;
  --color-accent-soft: rgba(155, 92, 255, 0.16);

  --color-success: #2ecc71;
  --color-success-soft: rgba(46, 204, 113, 0.12);
  --color-warning: #f1c40f;
  --color-warning-soft: rgba(241, 196, 15, 0.18);
  --color-danger: #e74c3c;
  --color-danger-soft: rgba(231, 76, 60, 0.18);

  --color-border-subtle: rgba(255, 255, 255, 0.05);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-overlay: rgba(2, 6, 23, 0.88);

  /* Neutral grays (cool, for subtle UI) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-display: "Rajdhani", "Orbitron", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;

  --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.6;
  --line-height-relaxed: 1.8;

  /* Spacing scale (px converted to rem, base 16) */
  --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 */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows (neon / depth) */
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 20px 45px rgba(0, 0, 0, 0.75);
  --shadow-glow-primary: 0 0 24px rgba(58, 224, 255, 0.5);
  --shadow-glow-accent: 0 0 30px rgba(155, 92, 255, 0.55);

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

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
  }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

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

body {
  margin: 0;
}

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

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

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

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

img {
  height: auto;
}

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

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

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

textarea {
  resize: vertical;
}

:focus {
  outline: none;
}

/* ========================================================================== 
   Base
   ========================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #11152b 0, #050814 52%, #020511 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

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

h1 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-2);
}

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

h5 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-md);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
}

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

strong {
  font-weight: 600;
  color: var(--color-text);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast),
    text-shadow var(--transition-fast),
    box-shadow var(--transition-fast);
}

a:hover {
  color: #7cf0ff;
  text-shadow: 0 0 10px rgba(124, 240, 255, 0.7);
}

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

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ========================================================================== 
   Accessibility & Focus
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@supports selector(:focus-visible) {
  :focus:not(:focus-visible) {
    outline: none;
  }
}

/* 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;
}

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

@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

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

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

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

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

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

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

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-1);
}

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

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

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

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

/* Grid helpers */
.grid {
  display: grid;
}

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

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

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

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

/* Spacing utilities (y-axis) */
.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section-tight {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

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

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

/* Surface helpers for sections */
.surface-soft {
  background: radial-gradient(circle at top left, #171b33 0, #050814 52%, #020511 100%);
}

.surface-card-dark {
  background: linear-gradient(145deg, #11152b 0, #070b1c 45%, #050814 100%);
}

/* ========================================================================== 
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background-color var(--transition-normal),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    text-shadow var(--transition-fast);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(58, 224, 255, 0.28), rgba(155, 92, 255, 0.18));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.btn-primary {
  background: radial-gradient(circle at 0 0, rgba(155, 92, 255, 0.7) 0, rgba(58, 224, 255, 0.7) 36%, #050814 140%);
  color: #0b1020;
  border-color: rgba(122, 255, 255, 0.85);
  box-shadow: var(--shadow-soft), var(--shadow-glow-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong), var(--shadow-glow-primary);
}

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

.btn-primary::before {
  opacity: 0.75;
}

.btn-ghost {
  background: rgba(10, 18, 48, 0.82);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-ghost:hover {
  background: rgba(22, 32, 72, 0.96);
  box-shadow: 0 0 0 1px rgba(58, 224, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(58, 224, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(58, 224, 255, 0.06);
  text-shadow: 0 0 14px rgba(58, 224, 255, 0.85);
  box-shadow: var(--shadow-glow-primary);
}

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

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

/* Inputs */
.input,
textarea.input,
select.input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at top, #171b33 0, #050814 80%);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  box-shadow: inset 0 0 0 1px rgba(2, 8, 23, 0.8);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

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

.input:focus-visible {
  border-color: rgba(58, 224, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(58, 224, 255, 0.6), 0 0 20px rgba(58, 224, 255, 0.3);
  background: radial-gradient(circle at top, #1e2340 0, #050814 90%);
}

.input[aria-invalid="true"],
.input--error {
  border-color: rgba(231, 76, 60, 0.9);
  box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.6);
}

.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Labels & help text */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--gray-100);
}

.form-help {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(155, 92, 255, 0.16) 0, #070b1c 45%, #050814 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-fast),
    background var(--transition-slow),
    filter var(--transition-normal);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(58, 224, 255, 0.18) 0, transparent 55%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-10%, -10%, 0);
  transition:
    opacity var(--transition-normal),
    transform var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px) translateZ(0);
  border-color: rgba(58, 224, 255, 0.5);
  box-shadow: var(--shadow-strong), var(--shadow-glow-primary);
  filter: brightness(1.05);
}

.card:hover::before {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

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

.card-title {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-1);
}

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-soft);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

/* Status chips (e.g., category labels: Aktualności, Esport, etc.) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  background: rgba(9, 12, 32, 0.9);
}

.badge-primary {
  border-color: rgba(58, 224, 255, 0.9);
  color: #c9f9ff;
  background: rgba(58, 224, 255, 0.14);
}

.badge-accent {
  border-color: rgba(155, 92, 255, 0.9);
  color: #f1e6ff;
  background: rgba(155, 92, 255, 0.18);
}

.badge-success {
  border-color: rgba(46, 204, 113, 0.9);
  color: #d6ffe7;
  background: var(--color-success-soft);
}

/* Navigation helpers */
.navbar-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(90deg, rgba(5, 8, 20, 0.94), rgba(5, 8, 20, 0.88));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-soft);
  transition:
    color var(--transition-fast),
    text-shadow var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: #f9f9ff;
  text-shadow: 0 0 14px rgba(155, 92, 255, 0.7);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link--active {
  color: #ffffff;
}

.nav-link--active::after {
  width: 100%;
}

/* Tag-like filters (e.g., category filters on lists) */
.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(9, 12, 32, 0.9);
  color: var(--color-text-soft);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(22, 32, 72, 0.96);
  border-color: rgba(58, 224, 255, 0.7);
  color: var(--color-text);
  box-shadow: 0 0 16px rgba(58, 224, 255, 0.4);
  transform: translateY(-1px);
}

.filter-pill--active {
  background: rgba(58, 224, 255, 0.18);
  border-color: rgba(58, 224, 255, 0.9);
  color: #e9fcff;
  box-shadow: 0 0 24px rgba(58, 224, 255, 0.6);
}

/* Page-specific helper sections (hero, trending, etc.) */
.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin-top: var(--space-3);
  max-width: 40rem;
  color: var(--color-text-muted);
}

.trending-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding: 0.5rem 0;
  font-size: var(--font-size-xs);
}

.trending-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-soft);
}

.trending-link {
  position: relative;
  padding-left: 0.75rem;
  margin-right: 0.5rem;
  color: var(--color-text-muted);
}

.trending-link::before {
  content: "#";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.trending-link:hover {
  color: #ffffff;
}

/* FAQ basic styles (accordions can inherit these) */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-3) 0;
}

.faq-question {
  font-size: var(--font-size-md);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.faq-answer {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Footer basics */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

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

.footer a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(58, 224, 255, 0.8);
}

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