/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #050812;
  --color-bg-elevated: #0b1220;
  --color-bg-subtle: #070b16;
  --color-text: #f5f7ff;
  --color-text-muted: #9ca3c9;
  --color-primary: #34d6ff;
  --color-primary-soft: rgba(52, 214, 255, 0.15);
  --color-primary-strong: #5af5ff;
  --color-accent: #a855f7;
  --color-accent-soft: rgba(168, 85, 247, 0.18);
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;

  /* Neutral grays (for borders, text, UI) */
  --gray-50: #f9fafb;
  --gray-100: #e5e7eb;
  --gray-200: #cbd5f5;
  --gray-300: #9ca3c9;
  --gray-400: #6b728f;
  --gray-500: #4b5563;
  --gray-600: #374151;
  --gray-700: #1f2937;
  --gray-800: #111827;
  --gray-900: #020617;
  --border-subtle: rgba(148, 163, 255, 0.16);

  /* 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-heading: "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-base: 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.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;

  /* Spacing scale (px) */
  --space-0: 0;
  --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;
  --space-20: 80px;
  --space-24: 96px;

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

  /* Shadows (neon-ish for gaming aesthetic) */
  --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.75);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.9);
  --shadow-neon-primary: 0 0 18px rgba(52, 214, 255, 0.6);
  --shadow-neon-accent: 0 0 18px rgba(168, 85, 247, 0.6);

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

/* Motion-safe adjustments */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms linear;
    --transition-base: 0ms linear;
    --transition-slow: 0ms linear;
  }
}

/* ========================================================================== 
   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,
svg,
video,
canvas,
audio,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

picture {
  display: block;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========================================================================== 
   Base
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

h1 {
  font-size: clamp(2.3rem, 4vw, var(--font-size-5xl));
  letter-spacing: 0.04em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, var(--font-size-4xl));
  letter-spacing: 0.06em;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, var(--font-size-3xl));
}

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

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

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

strong,
b {
  font-weight: 600;
}

a {
  position: relative;
  color: var(--color-primary);
  transition: color var(--transition-base), text-shadow var(--transition-base);
}

a:hover {
  color: var(--color-primary-strong);
  text-shadow: 0 0 12px rgba(52, 214, 255, 0.7);
}

a:focus-visible {
  outline: none;
}

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

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

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

/* ========================================================================== 
   Accessibility & Focus
   ========================================================================== */

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

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

/* 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 {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1280px) {
  .container {
    max-width: 1240px;
  }
}

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

.section--compact {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

/* Flex */

.flex {
  display: flex;
}

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

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

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

.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-around {
  justify-content: space-around;
}

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

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

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

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

/* Grid */

.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 (y-axis) */

.stack-xs > * + * {
  margin-top: var(--space-2);
}

.stack-sm > * + * {
  margin-top: var(--space-3);
}

.stack-md > * + * {
  margin-top: var(--space-4);
}

.stack-lg > * + * {
  margin-top: var(--space-6);
}

/* Text alignment */

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

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

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

/* Badges / labels for quick info (e.g., recenzja gry, poradnik) */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(148, 163, 255, 0.5);
  background: radial-gradient(circle at top left, rgba(52, 214, 255, 0.18),
        rgba(15, 23, 42, 0.95));
  color: var(--color-text);
}

.badge--primary {
  border-color: rgba(52, 214, 255, 0.8);
}

.badge--accent {
  border-color: rgba(168, 85, 247, 0.8);
}

/* ========================================================================== 
   Components
   ========================================================================== */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #020617;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), var(--shadow-neon-primary);
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 32px rgba(45, 212, 191, 0.85);
}

.btn:active {
  transform: translateY(0px) scale(0.99);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 18px rgba(52, 214, 255, 0.7);
}

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

.btn--ghost {
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  border-color: rgba(148, 163, 255, 0.5);
  box-shadow: var(--shadow-soft);
}

.btn--ghost:hover {
  background: radial-gradient(circle at top left, rgba(52, 214, 255, 0.13),
        rgba(15, 23, 42, 0.98));
}

.btn--secondary {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #f9fafb;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), var(--shadow-neon-accent);
}

.btn--sm {
  padding: 6px 14px;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 14px 26px;
  font-size: var(--font-size-base);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Inputs */

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 255, 0.4);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-300);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 18px rgba(52, 214, 255, 0.7);
}

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

label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--gray-200);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-help {
  margin-top: 4px;
  font-size: var(--font-size-xs);
  color: var(--gray-300);
}

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

/* Card */

.card {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(52, 214, 255, 0.12),
        rgba(11, 18, 32, 0.98));
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.13),
      transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(168, 85, 247, 0.13), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.card__content {
  position: relative;
}

.card--highlight {
  border-color: rgba(52, 214, 255, 0.7);
  box-shadow: var(--shadow-neon-primary);
}

/* Hero-like section helper for immersive homepage */

.hero {
  position: relative;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(52, 214, 255, 0.12),
        transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(129, 140, 248, 0.16), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.hero__content {
  position: relative;
}

/* Media wrapper (for screenshots & videos) */

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 255, 0.4);
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9),
        rgba(3, 7, 18, 1));
  box-shadow: var(--shadow-soft);
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: auto;
}

/* Tag list for pros/cons, mechanics, etc. */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 255, 0.5);
  font-size: var(--font-size-xs);
  color: var(--gray-100);
  background: rgba(15, 23, 42, 0.9);
}

.tag--positive {
  border-color: rgba(34, 197, 94, 0.8);
}

.tag--negative {
  border-color: rgba(239, 68, 68, 0.8);
}

/* Simple pill for meta info (e.g., czas gry, platforma, ocena) */

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 255, 0.45);
  color: var(--gray-100);
}

/* Navigation bar shell (no layout opinionated styles) */

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.85));
  border-bottom: 1px solid rgba(148, 163, 255, 0.25);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.nav-link {
  font-size: var(--font-size-sm);
  color: var(--gray-200);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    text-shadow var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
  background-color: rgba(15, 23, 42, 0.9);
  text-shadow: 0 0 10px rgba(52, 214, 255, 0.6);
}

.nav-link--active {
  color: var(--color-text);
  background: radial-gradient(circle at top left, rgba(52, 214, 255, 0.16),
        rgba(15, 23, 42, 0.96));
}

/* Article layout for reviews & guides */

.article {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.article h2,
.article h3,
.article h4 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article p {
  margin-bottom: var(--space-4);
}

.article ul,
.article ol {
  margin-left: var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

.article /* Callout for tips & warnings */

.callout {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 255, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08),
        rgba(15, 23, 42, 0.98));
}

.callout--warning {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.09),
        rgba(15, 23, 42, 0.98));
}

.callout--danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.09),
        rgba(15, 23, 42, 0.98));
}

/* Simple rating bar for review scores */

.rating-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 1);
  overflow: hidden;
}

.rating-bar__fill {
  position: absolute;
  inset: 0;
  width: var(--rating, 70%);
  background: linear-gradient(90deg, #22c55e, #a3e635);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.75);
}

/* Footer shell */

.footer {
  border-top: 1px solid rgba(148, 163, 255, 0.25);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9),
        rgba(2, 6, 23, 1));
  font-size: var(--font-size-sm);
  color: var(--gray-300);
}

.footer a {
  color: var(--gray-100);
}

.footer a:hover {
  color: var(--color-primary-strong);
}

/* Small helper for subtle section titles in Polish (e.g., Rozgrywka, Fabuła) */

.section-label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: var(--space-2);
}
