/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #050b16; /* deep navy background */
  --color-surface: #0d1624;    /* elevated surface panels */
  --color-surface-alt: #131f32;
  --color-text: #f5f7fb;
  --color-text-muted: #a4acbf;

  --color-primary: #1f6feb;    /* clear action blue */
  --color-primary-soft: rgba(31, 111, 235, 0.12);
  --color-success: #4bbf73;    /* soft green accent for verified / safe */
  --color-warning: #ffb020;
  --color-danger: #e55353;

  --color-border-subtle: #273349;
  --color-border-strong: #3a4966;

  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "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-md: 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 */

  --line-height-tight: 1.2;
  --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: 9999px;

  /* Shadows (subtle, to keep trust & clarity) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);

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

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
  }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ========================================================================== 
   Reset / Normalize
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-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%;
}

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

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

textarea {
  resize: vertical;
}

/* Remove default focus outlines (we'll re-add focus-visible) */
:focus {
  outline: none;
}

/* ========================================================================== 
   Base Styles
   ========================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #101b2f 0, var(--color-background) 42%, #020611 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

h1 { font-size: var(--font-size-4xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-2xl); margin-bottom: var(--space-3); }
h4 { font-size: var(--font-size-xl);  margin-bottom: var(--space-2); }
h5 { font-size: var(--font-size-lg);  margin-bottom: var(--space-2); }
h6 { font-size: var(--font-size-md);  margin-bottom: var(--space-1); }

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

strong {
  font-weight: 600;
}

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

a:hover {
  color: #4b8dff;
}

a:active {
  color: #1550b1;
}

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

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

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ========================================================================== 
   Accessibility
   ========================================================================== */

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

[tabindex="-1"]:focus {
  outline: none !important;
}

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

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

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

.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: 1200px) {
  .container {
    max-width: 1200px;
  }
}

.layout-main {
  padding-top: var(--space-10);
  padding-bottom: var(--space-12);
}

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

.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: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Spacing utilities (minimal set for layout consistency) */

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

.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge--verified {
  background-color: rgba(75, 191, 115, 0.16);
  color: var(--color-success);
}

.badge--neutral {
  background-color: rgba(163, 172, 191, 0.16);
  color: var(--color-text-muted);
}

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

/* Buttons: strong but not aggressive, with clear hierarchy */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #4b8dff);
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #336ee5, #5e9aff);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: linear-gradient(135deg, #1b5ccd, #477be0);
  box-shadow: var(--shadow-xs);
  transform: translateY(0);
}

.btn-secondary {
  background-color: rgba(19, 31, 50, 0.9);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-secondary:hover {
  background-color: #1b2740;
}

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

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

.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-success);
  outline-offset: 2px;
}

/* Inputs: consistent, calm, focused on clarity */

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

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

.field-helper {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(11, 18, 32, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-gray-500);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--color-success);
  box-shadow: 0 0 0 1px rgba(75, 191, 115, 0.35);
  outline: none;
}

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

/* Card: comparison-style, with subtle separation and grid alignment */

.card {
  background-color: #ffffff;
  color: var(--color-gray-900);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.card--elevated {
  box-shadow: var(--shadow-md);
  background: rgba(11, 18, 32, 0.9);
}

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

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
  font-weight: 500;
}

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-4);
}

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

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

/* Offer-specific helper blocks for betting aggregator style */

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-gray-900);
}

.offer-meta__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--color-gray-700);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.offer-meta__item strong {
  color: var(--color-gray-900);
  font-weight: 600;
  min-width: 120px;
}

.offer-odds {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3);
  background-color: #f3f4f6;
  border-radius: var(--radius-md);
}

.offer-odds__label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.offer-odds__value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-gray-900);
}

.offer-odds__stars {
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: #fbbf24;
}

.offer-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.offer-terms {
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
}

/* Table-like head for comparisons without full table styling */

.comparison-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 0 var(--space-2) var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-gray-200);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gray-600);
}

@media (max-width: 720px) {
  .comparison-header {
    display: none;
  }
}

/* ========================================================================== 
   Misc helpers for a clean, trustworthy layout
   ========================================================================== */

.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.border-subtle { border: 1px solid var(--color-border-subtle); }

.bg-surface { background-color: var(--color-surface); }
.bg-surface-alt { background-color: var(--color-surface-alt); }
.bg-soft-success { background-color: rgba(75, 191, 115, 0.06); }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }

.opacity-muted { opacity: 0.7; }

