/* ========================================================================== 
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-bg: #050814; /* deep navy background */
  --color-surface: #0c1020; /* slightly lighter surface */
  --color-surface-alt: #14182a;
  --color-text: #f8fafc; /* near white */
  --color-text-muted: #a5b4c4;
  --color-primary: #36fba1; /* electric green */
  --color-primary-soft: rgba(54, 251, 161, 0.12);
  --color-accent: #ffd95e; /* soft yellow highlight */
  --color-accent-soft: rgba(255, 217, 94, 0.16);
  --color-success: #21c66b;
  --color-warning: #ffb020;
  --color-danger: #ff4b6b;

  /* Neutral grays / borders */
  --color-border-subtle: #1f2437;
  --color-border: #2a3146;
  --color-border-strong: #3b4460;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --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 (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-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem;  /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem;    /* 16px */
  --radius-pill: 999px;

  /* Shadows (soft, energetic glow) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 20px 45px rgba(0, 0, 0, 0.5);
  --shadow-glow-primary: 0 0 0 1px rgba(54, 251, 161, 0.3), 0 0 24px rgba(54, 251, 161, 0.35);

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

  /* Layout */
  --content-max-width: 1120px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0.01ms linear;
    --transition-base: 0.01ms linear;
    --transition-slow: 0.01ms linear;
  }
}


/* ========================================================================== 
   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[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

img {
  height: auto;
}

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

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

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

textarea {
  resize: vertical;
}

:where(a) {
  color: inherit;
}

:where(a):not([class]) {
  text-decoration-skip-ink: auto;
}

/* Remove default focus outlines; we'll restore focus-visible later */
:focus {
  outline: none;
}


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

main {
  min-height: 60vh;
}

/* Headings: bold, modern, slightly playful */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-snug);
  color: var(--color-text);
}

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

h2 {
  font-size: clamp(2rem, 3vw, var(--font-size-4xl));
}

h3 {
  font-size: clamp(1.5rem, 2.3vw, 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);
}

h1, h2, h3 {
  margin-bottom: var(--space-4);
}

h4, h5, h6 {
  margin-bottom: var(--space-3);
}

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

strong {
  font-weight: 600;
}

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

/* Links - subtle but energetic on hover */
a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-base), text-shadow var(--transition-base);
}

a:hover {
  color: #5cffb8;
  text-shadow: 0 0 12px rgba(54, 251, 161, 0.65);
}

a:active {
  color: #24d986;
}


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

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


/* ========================================================================== 
   Utilities
   ========================================================================== */

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

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-6);
  }
}

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

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-16);
  }
}

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

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

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

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

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

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

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

/* Simple spacing utilities (minimal set) */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }


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

/* Buttons - bold, rounded, playful */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-inline: var(--space-5);
  padding-block: var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast),
              color var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #5cffb8);
  color: #020617!important;
  box-shadow: 0 12px 30px rgba(8, 255, 174, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(8, 255, 174, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(8, 255, 174, 0.35);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
}

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

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

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

/* Inputs & form controls */
.input,
select,
textarea {
  width: 100%;
  padding-inline: var(--space-3);
  padding-block: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

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

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(54, 251, 161, 0.4);
}

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

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

/* Card - for offers, events, game zones */
.card {
  background: radial-gradient(circle at top left, rgba(54, 251, 161, 0.06), transparent 52%),
              radial-gradient(circle at bottom right, rgba(255, 217, 94, 0.05), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-elevated);
}

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

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

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

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

/* Tag / pill accent (e.g., VR, Console, Plansza) */
.badge {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-3);
  padding-block: calc(var(--space-1) + 1px);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge-warm {
  background-color: var(--color-accent-soft);
  color: var(--color-accent);
}
