:root {
  /* Color Palette */
  --color-background: #050914; /* deep, slightly bluish dark */
  --color-surface: #0c1224;
  --color-surface-soft: #141b33;
  --color-text: #f7f7fb;
  --color-text-muted: #b4b9d2;
  --color-primary: #d3212c; /* deep red */
  --color-primary-soft: rgba(211, 33, 44, 0.12);
  --color-primary-hover: #f23442;
  --color-accent: #f0c96a; /* subtle gold */
  --color-accent-soft: rgba(240, 201, 106, 0.18);
  --color-info: #2459f5; /* navy-blue leaning */
  --color-success: #25b273;
  --color-warning: #f7b749;
  --color-danger: #ff4a4a;

  --gray-50:  #f8fafc;
  --gray-100: #edf0f7;
  --gray-200: #d9deea;
  --gray-300: #c0c6d8;
  --gray-400: #9aa1b8;
  --gray-500: #787f99;
  --gray-600: #585f79;
  --gray-700: #3e455f;
  --gray-800: #262b41;
  --gray-900: #141728;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Roboto", "Segoe UI", sans-serif;
  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

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

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --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 */

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows (subtle but modern, for cards and floating elements) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-sm: 0 6px 18px rgba(6, 12, 34, 0.32);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.55);

  /* 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 {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

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

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

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

/* Remove default list styles */
ul[role="list"],
ol[role="list"],
ul,
ol {
  list-style: none;
}

/* ===================================
   Base Typography & Layout
   =================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #111936 0, #050914 55%, #020309 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gray-50);
}

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

h2 {
  font-size: clamp(1.75rem, 1.5vw + 1.2rem, 2.25rem);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.5rem;
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-2);
}

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

h5 {
  font-size: 1.0625rem;
}

h6 {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

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

strong {
  font-weight: 600;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base), opacity var(--transition-base);
}

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

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

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

:focus:not(:focus-visible) {
  outline: none;
}

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

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

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

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

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

/* Flex helpers */
.flex {
  display: flex;
}

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

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

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

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.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 helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 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);
}

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

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

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

.text-uppercase {
  text-transform: uppercase;
}

.badge-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--font-size-xs);
}

/* Spacing utilities (minimal set) */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.py-4 { padding-block: var(--space-4); }
.py-6 { padding-block: var(--space-6); }
.px-4 { padding-inline: var(--space-4); }
.p-4  { padding: var(--space-4); }

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

/* Utility for subtle glowing pulses (e.g., live indicators) */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff5f5f 0, #d3212c 40%, #7c0d12 100%);
  box-shadow: 0 0 0 0 rgba(255, 95, 95, 0.7);
  animation: pulse-soft 1.4s infinite;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  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-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 60%, #ff646f 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(211, 33, 44, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(211, 33, 44, 0.75);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(211, 33, 44, 0.6);
}

.btn-outline {
  background: rgba(12, 18, 36, 0.8);
  color: var(--gray-50);
  border-color: rgba(151, 163, 207, 0.5);
}

.btn-outline:hover {
  background: rgba(22, 30, 60, 0.95);
  border-color: rgba(151, 163, 207, 0.9);
}

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

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

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

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

/* Inputs */
.input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(151, 163, 207, 0.35);
  background-color: rgba(10, 15, 30, 0.9);
  color: var(--gray-50);
  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(--color-text-muted);
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(240, 201, 106, 0.35);
  background-color: rgba(13, 20, 40, 0.98);
}

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

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

/* Cards - for events, offers, leaderboards */
.card {
  position: relative;
  background: radial-gradient(circle at top left, rgba(240, 201, 106, 0.06) 0, rgba(12, 18, 36, 0.98) 26%, rgba(7, 10, 22, 0.98) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(151, 163, 207, 0.18);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(211, 33, 44, 0.16) 0, transparent 46%);
  opacity: 0.8;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--font-size-lg);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Tag / chip used for bookies, odds, etc. */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background: rgba(13, 20, 40, 0.9);
  color: var(--color-text-muted);
  border: 1px solid rgba(151, 163, 207, 0.35);
}

.tag-primary {
  background: var(--color-primary-soft);
  color: #fff;
  border-color: rgba(211, 33, 44, 0.6);
}

.tag-gold {
  background: var(--color-accent-soft);
  color: #130f02;
  border-color: rgba(240, 201, 106, 0.65);
}

/* Simple badge for live / top offer */
.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: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(211, 33, 44, 0.12);
  color: #ff9a9f;
  border: 1px solid rgba(211, 33, 44, 0.7);
}

.badge-top-offer {
  background: rgba(240, 201, 106, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(240, 201, 106, 0.7);
}

/* Tables / leaderboards base */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead {
  background: rgba(18, 24, 52, 0.98);
}

.table th,
.table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(151, 163, 207, 0.25);
}

.table th {
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.table tbody tr:nth-child(even) {
  background: rgba(7, 10, 22, 0.85);
}

.table tbody tr:hover {
  background: rgba(22, 30, 60, 0.95);
}

/* Odds / cote highlight */
.odds-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-md);
  background: rgba(6, 233, 137, 0.13);
  color: #a8ffd3;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

/* Small utility for French micro-copy (e.g., mentions légales) */
.text-micro {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--gray-400);
}
