/* ========================================
   Variables
   ======================================== */
:root {
  /* Color Palette */
  --color-background: #050711;
  --color-surface: #101422;
  --color-surface-elevated: #181d2c;
  --color-text: #f7f7fb;
  --color-text-muted: #a5a8b8;

  /* Brand & Accents (urban / vibrant) */
  --color-primary: #ff4458; /* energetic red-pink */
  --color-primary-soft: rgba(255, 68, 88, 0.16);
  --color-accent: #26e0b4; /* neon teal */

  /* Semantic */
  --color-success: #16b36b;
  --color-warning: #ffb547;
  --color-danger: #ff3366;

  /* Neutral Grays */
  --gray-50: #f8fafc;
  --gray-100: #e2e8f0;
  --gray-200: #cbd5f5;
  --gray-300: #94a3b8;
  --gray-400: #64748b;
  --gray-500: #475569;
  --gray-600: #334155;
  --gray-700: #1e293b;
  --gray-800: #0f172a;
  --gray-900: #020617;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Roboto", "Segoe UI", sans-serif;
  --font-display: "Montserrat", 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-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.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 */

  /* Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-pill: 999px;

  /* Shadows (subtle neon / urban glow) */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 24px rgba(255, 68, 88, 0.6);
  --shadow-glow-accent: 0 0 24px rgba(38, 224, 180, 0.5);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition: 220ms ease-out;
  --transition-slow: 320ms ease-out;
}

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

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

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;
}
ul {
    list-style: none !important;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

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

a {
  color: inherit;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========================================
   Base Styles
   ======================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #191f3a 0, #050711 55%, #000 100%);
  color: var(--color-text);
  min-height: 100vh;
}

main {
  min-height: 60vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.03em;
}

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

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

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

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

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

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

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: var(--space-6) 0;
}

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

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

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

.flex {
  display: flex;
}

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

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

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

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

.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: 1fr;
  }
}

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

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

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

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

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

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-primary {
  background: rgba(255, 68, 88, 0.16);
  color: var(--color-primary);
}

.badge-accent {
  background: rgba(38, 224, 180, 0.12);
  color: var(--color-accent);
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    border-color var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #ff7a3c);
  color: #fff;
  box-shadow: var(--shadow-md), var(--shadow-glow-primary);
}

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

.btn-outline {
  background: rgba(15, 23, 42, 0.8);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.5);
}

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

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text);
}

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

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

/* Inputs & Form Controls */
.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(38, 224, 180, 0.4);
}

.input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

label {
  display: block;
  font-size: var(--font-size-sm);
  margin-bottom: 0.35rem;
}

.form-helper {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

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

/* Cards (for menu, events, poker nights, sports matches) */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(255, 68, 88, 0.14), transparent 55%),
              radial-gradient(circle at bottom right, rgba(38, 224, 180, 0.12), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(18px);
}

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

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: 0.25rem;
}

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

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

.card--interactive {
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Tag list for events like "Poker Night", "Live Sports" */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: var(--space-2);
}

.tag {
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--color-text-muted);
}

.tag--highlight {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ========================================
   Accessibility & Motion
   ======================================== */

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

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

/* ========================================
   Theme-specific Helpers for FLOPSERRA
   ======================================== */

/* Bars for navigation / sections that need subtle top border */
.section-bar {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-block: var(--space-8);
}

/* Overlay gradient used for hero images (city / poker / sports) */
.hero-overlay {
  position: relative;
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(5, 7, 17, 0.95) 60%, #050711 100%);
  pointer-events: none;
}

/* Subtle animated border for highlighted content (e.g., next poker tournament) */
.highlight-frame {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 68, 88, 0.9), rgba(38, 224, 180, 0.9));
}

.highlight-frame__inner {
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(255, 68, 88, 0.17), transparent 55%),
              radial-gradient(circle at bottom right, rgba(38, 224, 180, 0.13), transparent 55%),
              rgba(5, 7, 17, 0.98);
  padding: var(--space-5);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card--interactive {
    transition: none;
  }
}
