/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Colors - retro fantasy palette */
  --color-background: #050814;
  --color-surface: #0c1021;
  --color-surface-elevated: #11172e;
  --color-surface-soft: rgba(10, 16, 36, 0.9);

  --color-text: #f5f7ff;
  --color-text-muted: #a3b0d9;
  --color-text-soft: #c3c9e6;

  --color-primary: #5ee6ff;          /* neon cyan accent */
  --color-primary-soft: rgba(94, 230, 255, 0.15);
  --color-primary-strong: #8bffea;

  --color-success: #4ade80;          /* emerald */
  --color-warning: #fbbf24;          /* amber */
  --color-danger: #fb7185;           /* soft red */

  /* Neutral grays (cool, game UI style) */
  --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: #111827;
  --gray-900: #020617;

  /* Overlay / borders */
  --color-border-subtle: rgba(148, 163, 184, 0.35);
  --color-border-strong: rgba(148, 163, 184, 0.7);
  --color-backdrop: rgba(5, 8, 20, 0.85);

  /* 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: "Press Start 2P", "DM Sans", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font sizes (relative scale) */
  --fs-xs: 0.75rem;   /* 12px */
  --fs-sm: 0.875rem;  /* 14px */
  --fs-md: 1rem;      /* 16px */
  --fs-lg: 1.125rem;  /* 18px */
  --fs-xl: 1.25rem;   /* 20px */
  --fs-2xl: 1.5rem;   /* 24px */
  --fs-3xl: 1.875rem; /* 30px */
  --fs-4xl: 2.25rem;  /* 36px */
  --fs-5xl: 3rem;     /* 48px */

  /* Line heights */
  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-normal: 1.5;
  --lh-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-7: 1.75rem;  /* 28px */
  --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 (subtle glow for retro-fantasy UI) */
  --shadow-xs: 0 0 0 1px rgba(15, 23, 42, 0.9);
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.75);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(148, 163, 184, 0.15);
  --shadow-glow: 0 0 20px rgba(94, 230, 255, 0.5);

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

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
li,
fieldset,
legend,
pre {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

ul,
ol {
  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;
  cursor: pointer;
}

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

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

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

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

/* ========================================================================
   Base Styles
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  display: block;
}

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

h1 {
  font-size: var(--fs-4xl);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  font-size: var(--fs-3xl);
}

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

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

h5 {
  font-size: var(--fs-lg);
}

h6 {
  font-size: var(--fs-md);
}

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

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

strong,
b {
  font-weight: 600;
}

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

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

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

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

hr {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin: var(--space-6) 0;
}

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

::-moz-focus-inner {
  border: 0;
}

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

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

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

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

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

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

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

/* Text alignment */
.text-center {
  text-align: center;
}

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

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

/* Width */
.w-full {
  width: 100%;
}

/* Spacing utilities (selection) */
.mt-0 {
  margin-top: 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-0 {
  margin-bottom: 0;
}

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

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

/* Badges / labels */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--color-text-muted);
}

.badge--primary {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

/* ========================================================================
   Components
   ======================================================================== */
/* Buttons - primary CTA adapted for Polish gaming portal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

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

.btn-primary {
  background: radial-gradient(circle at 20% 0, #8bffea 0, #00c9ff 40%, #0077ff 100%);
  border-color: rgba(148, 163, 184, 0.4);
  color: #020617 !important;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(94, 230, 255, 0.7);
}

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

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--color-text-soft);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.85);
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.65);
  border-color: transparent;
  color: var(--color-text-soft);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.95);
}

.btn-lg {
  padding: 1rem 2.4rem;
  font-size: var(--fs-md);
}

/* Inputs / Forms */
.input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--fs-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(--gray-500);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(94, 230, 255, 0.5);
}

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

label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

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

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

.input-error {
  border-color: var(--color-danger);
}

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

/* Card - for sections like O grze, Świat i poziomy, Porady, Blog post teasers */
.card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(12, 10, 32, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(94, 230, 255, 0.12) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.16) 0, transparent 50%);
  opacity: 0.9;
  pointer-events: none;
}

.card__body {
  position: relative;
  z-index: 1;
}

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

/* Media placeholders for screenshots / artwork */
.media-frame {
  position: relative;
  border-radius: var(--radius-md);
  /*border: 1px solid rgba(148, 163, 184, 0.5);*/
  overflow: hidden;
  /*background: radial-gradient(circle at 20% 0, #1d2440 0, #020617 55%);*/
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      0deg,
      rgba(15, 23, 42, 0.55) 0,
      rgba(15, 23, 42, 0.1) 45%,
      rgba(15, 23, 42, 0.7) 100%
    );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.media-frame--tall {
  /*padding-bottom: 56.25%; !* 16:9 placeholder ratio *!*/
}

.media-frame--tall > * {
  /*position: absolute;*/
  /*inset: 0;*/
  /*width: 100%;*/
  /*height: 100%;*/
}

/* Tags / meta text */
.meta-text {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

/* Hero-specific helper for main CTA sections */
.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-subtitle {
  margin-top: var(--space-4);
  max-width: 36rem;
  color: var(--color-text-soft);
}

.hero-actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Navigation bar skeleton */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.92), rgba(12, 10, 32, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--fs-sm);
}

.navbar-link {
  position: relative;
  padding-bottom: 0.1rem;
  color: var(--color-text-muted);
}

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5ee6ff, #8b5cf6);
  transition: width var(--transition-base);
}

.navbar-link:hover {
  color: var(--color-text);
}

.navbar-link:hover::after,
.navbar-link[aria-current="page"]::after {
  width: 100%;
}

.navbar-cta {
  display: none;
}

@media (min-width: 900px) {
  .navbar-cta {
    display: inline-flex;
  }
}

/* Footer baseline */
.site-footer {
  margin-top: var(--space-12);
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at 50% 0, rgba(94, 230, 255, 0.08) 0, transparent 50%),
    #020617;
}

.site-footer-inner {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* FAQ / accordion basics (for FAQ page) */
.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  padding: var(--space-4);
}

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

.faq-answer {
  margin-top: var(--space-2);
  color: var(--color-text-soft);
}

/* Chips / category pills (for Blog, Aktualizacje, Mechaniki) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.8);
}

.chip--success {
  border-color: rgba(74, 222, 128, 0.8);
  color: var(--color-success);
}

.chip--warning {
  border-color: rgba(251, 191, 36, 0.8);
  color: var(--color-warning);
}

.chip--danger {
  border-color: rgba(248, 113, 113, 0.8);
  color: var(--color-danger);
}

/* Status bullets for turn-based / progression info */
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background-color: var(--color-primary);
}

.status-dot--success {
  background-color: var(--color-success);
}

.status-dot--warning {
  background-color: var(--color-warning);
}

.status-dot--danger {
  background-color: var(--color-danger);
}

/* Simple table styling (for lists of poziomy, statystyki, mechaniki) */
.table {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.table th,
.table td {
  padding: 0.7rem 0.9rem;
  font-size: var(--fs-sm);
}

.table thead {
  background: linear-gradient(to right, rgba(94, 230, 255, 0.15), rgba(15, 23, 42, 0.9));
}

.table tbody tr:nth-child(odd) {
  background-color: rgba(15, 23, 42, 0.9);
}

.table tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.95);
}

.table tbody tr:hover {
  background-color: rgba(30, 64, 175, 0.55);
}

/* Tagline / overline for sections like O grze, Świat i poziomy, Porady */
.section-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-3);
}

.section-description {
  max-width: 36rem;
  color: var(--color-text-soft);
}

/* Chips row for page nav on multi-page layout */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

.subnav-link {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.9);
  transition:
    border-color var(--transition-base),
    color var(--transition-base),
    background-color var(--transition-base);
}

.subnav-link:hover,
.subnav-link[aria-current="page"] {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  background: rgba(15, 23, 42, 0.98);
}

/* Simple toast / notification bar (for Aktualizacje) */
.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: radial-gradient(circle at 0 0, rgba(94, 230, 255, 0.18) 0, rgba(15, 23, 42, 0.98) 60%);
  font-size: var(--fs-sm);
}

.toast--success {
  border-color: rgba(74, 222, 128, 0.9);
}

.toast--warning {
  border-color: rgba(251, 191, 36, 0.9);
}

.toast--danger {
  border-color: rgba(248, 113, 113, 0.9);
}

/* End of base.css */
