/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Color Palette - inspired by modern, trustworthy sports betting brand */
  --color-background: #050b16; /* deep navy for main background */
  --color-surface: #0d1624;    /* elevated surfaces (cards, headers) */
  --color-surface-alt: #101a2a;

  --color-text: #f7f8fb;       /* primary text on dark backgrounds */
  --color-text-muted: #a7b3c8;

  --color-primary: #1f7da5;    /* slate teal primary action */
  --color-primary-soft: rgba(31, 125, 165, 0.12);
  --color-primary-strong: #1a637f;

  --color-accent-sand: #6fe36b; /* warm sand for highlights, odds, accents */

  --color-success: #34c38f;
  --color-warning: #ffc861;
  --color-danger: #ff4b5c;

  /* Neutral grays for borders & subtle UI on dark backgrounds */
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-overlay: rgba(0, 0, 0, 0.75);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px - comfortable for body */
  --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 */

  --line-height-tight: 1.15;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (px-based, mapped to rem for responsiveness) */
  --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 and professional */
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-soft-up: 0 -8px 24px rgba(0, 0, 0, 0.24);
  --shadow-strong: 0 22px 45px rgba(0, 0, 0, 0.5);
  --shadow-focus: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(31, 125, 165, 0.6);

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

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-sans);
  line-height: var(--line-height-normal);
  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;
  padding: 0;
  margin: 0;
}

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

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

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

textarea {
  resize: vertical;
}

:where(a) {
  text-decoration: none;
  color: inherit;
}

:where(a, button) {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Remove default focus outlines; we'll reintroduce accessible focus styles */
:focus {
  outline: none;
}

/* ========================================================================
   Base Styles
   ======================================================================== */
body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #101b30 0, #050b16 52%, #020309 100%);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

/* Headings - scalable, authoritative hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 1.8rem + 1.5vw, 3rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 0.9vw, 2.25rem);
  line-height: 1.25;
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem);
  line-height: 1.3;
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
}

p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
}

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

strong {
  font-weight: 600;
}

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

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

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
              opacity var(--transition-fast),
              text-decoration-color var(--transition-normal);
}

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

a:active {
  opacity: 0.9;
}

/* Lists */
ul, ol {
  padding-left: 1.2rem;
  margin: 0 0 var(--space-4);
}

/* Blockquotes */
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-primary);
  background: rgba(10, 18, 32, 0.9);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

/* Tables - used in comparisons */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: var(--font-size-sm);
  overflow: scroll;
}

thead {
  background: rgba(10, 20, 38, 0.95);
}

thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-strong);
}

th, td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* ========================================================================
   Accessibility & Focus
   ======================================================================== */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

button:focus-visible,
[type='button']:focus-visible,
[type='submit']:focus-visible,
[type='reset']:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

/* Screen reader only utility */
.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;
}

/* Respect users who prefer reduced motion */
@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%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: min(1120px, 100% - 2 * var(--space-4));
}

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

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

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

/* Flex Utilities */
.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-xs {
  gap: var(--space-2);
}

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

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

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

/* Grid Utilities */
.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: 1fr;
  }
}

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

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

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

.text-accent {
  color: var(--color-accent-sand);
}

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

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

/* Display */
.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .hidden-md-up {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .hidden-md-down {
    display: none !important;
  }
}

/* Spacing utilities (margin & padding) - commonly used sizes only */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }

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

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

/* Badges & Pills for ratings & legal labels */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(7, 17, 32, 0.9);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

.badge--primary {
  background: rgba(31, 125, 165, 0.18);
  border-color: rgba(31, 125, 165, 0.7);
  color: #e0f4ff;
}

.badge--success {
  background: rgba(52, 195, 143, 0.16);
  border-color: rgba(52, 195, 143, 0.7);
  color: #e6fff5;
}

.badge--warning {
  background: rgba(255, 200, 97, 0.15);
  border-color: rgba(255, 200, 97, 0.7);
  color: #fff7e0;
}

.badge--danger {
  background: rgba(255, 75, 92, 0.15);
  border-color: rgba(255, 75, 92, 0.7);
  color: #ffe5e8;
}

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

/* Buttons */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-strong);
  --btn-color: #ffffff;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.68rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-fast),
              border-color var(--transition-fast);
}

.btn:hover {
  background: var(--btn-bg-hover);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

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

.btn--primary {
  --btn-bg: linear-gradient(135deg, #1f7da5, #1a637f);
  --btn-bg-hover: linear-gradient(135deg, #1f88b5, #195c76);
  --btn-color: #ffffff;
}

.btn--secondary {
  --btn-bg: rgba(9, 18, 32, 0.9);
  --btn-bg-hover: rgba(12, 22, 38, 1);
  --btn-border: var(--color-border-strong);
  --btn-color: var(--color-text);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(12, 22, 38, 0.85);
  --btn-border: rgba(163, 190, 255, 0.3);
  --btn-color: var(--color-text-muted);
}

.btn--accent {
  --btn-bg: linear-gradient(135deg, #e3b06b, #c79447);
  --btn-bg-hover: linear-gradient(135deg, #f0c37f, #c28b3f);
  --btn-color: #1a1308;
}

.btn--sm {
  padding: 0.45rem 0.95rem;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 0.85rem 1.8rem;
  font-size: var(--font-size-base);
}

/* Inputs & Form Controls */
.input,
select,
textarea,
[type='text'],
[type='email'],
[type='url'],
[type='tel'],
[type='search'],
[type='password'],
[type='number'] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(7, 13, 25, 0.95);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

.input::placeholder,
textarea::placeholder,
[type='text']::placeholder,
[type='email']::placeholder,
[type='password']::placeholder {
  color: rgba(167, 179, 200, 0.6);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[type='text']:focus-visible,
[type='email']:focus-visible,
[type='url']:focus-visible,
[type='tel']:focus-visible,
[type='search']:focus-visible,
[type='password']:focus-visible,
[type='number']:focus-visible {
  border-color: rgba(31, 125, 165, 0.8);
  box-shadow: 0 0 0 1px rgba(31, 125, 165, 0.9), 0 0 0 4px rgba(19, 94, 130, 0.6);
  background-color: rgba(9, 17, 33, 0.98);
}

.input[aria-invalid='true'],
.input--error {
  border-color: rgba(255, 75, 92, 0.85);
}

.input[aria-invalid='true']:focus-visible,
.input--error:focus-visible {
  box-shadow: 0 0 0 1px rgba(255, 75, 92, 0.9), 0 0 0 4px rgba(255, 75, 92, 0.5);
}

.label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.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 - used for sportsbook tiles, comparisons, bonus offers */
.card {
  position: relative;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(25, 102, 140, 0.18), transparent 58%),
              radial-gradient(circle at bottom right, rgba(227, 176, 107, 0.12), transparent 55%),
              linear-gradient(145deg, rgba(5, 11, 22, 0.98), rgba(7, 14, 27, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  padding: var(--space-6);
  overflow: hidden;
}

.card--subtle {
  border-radius: var(--radius-lg);
  background: rgba(7, 14, 27, 0.95);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.card--bordered {
  border-color: rgba(31, 125, 165, 0.6);
}

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

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

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

.card__body {
  font-size: var(--font-size-sm);
}

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

/* Chip / Tag - for odds, country, legal status */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(5, 13, 26, 0.95);
  border: 1px solid var(--color-border-subtle);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.chip--highlight {
  background: rgba(227, 176, 107, 0.1);
  border-color: rgba(227, 176, 107, 0.6);
  color: var(--color-accent-sand);
}

/* Rating Stars / Score pill base container (visual only; stars via SVG) */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(5, 13, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 18px;
  color: var(--color-text-muted);
}

.rating-pill__score {
  font-weight: 600;
  color: var(--color-accent-sand);
}

/* Alert / Notice - for responsible gaming & legal disclaimers */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background: rgba(7, 13, 25, 0.96);
  font-size: var(--font-size-sm);
}

.alert--info {
  border-color: rgba(31, 125, 165, 0.6);
  background: rgba(10, 24, 36, 0.98);
}

.alert--warning {
  border-color: rgba(255, 200, 97, 0.8);
  background: rgba(43, 30, 6, 0.98);
}

.alert--danger {
  border-color: rgba(255, 75, 92, 0.85);
  background: rgba(45, 14, 18, 0.98);
}

.alert__title {
  font-weight: 600;
  margin-bottom: 0.1rem;
}

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

/* Tagline / Legal strip at footer */
.legal-strip {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-3);
  margin-top: var(--space-6);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
