/* ============================================================
   LOTTOSYA.COM — Design System v1.0
   Custom theme built from scratch — no frameworks
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Background layers — neutral cool dark grey, matching Chrome's
     Material dark theme (the reference): NOT pure black, NOT warm
     brown (that was an overcorrection) — just a softer, slightly
     desaturated dark neutral that's easier on older eyes than pure
     #000/#fff without tinting the whole site a color. */
  --bg-body:        #131314;
  --bg-surface:     #1a1b1c;
  --bg-card:        #232427;
  --bg-card-hover:  #2b2c30;
  --bg-glass:       rgba(19, 19, 20, 0.85);
  --bg-input:       #232427;

  /* Brand colors — Google's own dark-theme accent blue, not amber.
     Variable names kept as-is (--green/--gold/--red) since dozens of
     components already reference them; only the values changed. */
  --green:          #8ab4f8;
  --green-dark:     #669df6;
  --green-glow:     rgba(138, 180, 248, 0.25);
  --green-subtle:   rgba(138, 180, 248, 0.10);
  --gold:           #a8c7fa;
  --gold-glow:      rgba(168, 199, 250, 0.22);
  --red:            #f28b82;
  --blue-accent:    #8ab4f8;

  /* Text — Google's own dark-theme text greys: a soft off-white and a
     neutral (not warm, not cool-blue) secondary grey. */
  --text-primary:   #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted:     #5f6368;

  /* Borders — neutral white-alpha, no color tint */
  --border:         rgba(232, 234, 237, 0.08);
  --border-bright:  rgba(232, 234, 237, 0.16);
  --border-green:   rgba(138, 180, 248, 0.28);

  /* Country brand colors */
  --ca:   #cc0000;   /* Canada */
  --uk:   #00247d;   /* UK */
  --au:   #009B4D;   /* Australia */
  --us:   #3c3b6e;   /* USA */
  --eu:   #003399;   /* European Union */
  --pa:   #1952a0;   /* Panama */
  --mx:   #006847;   /* Mexico */
  --co:   #003087;   /* Colombia */
  --ar:   #74acdf;   /* Argentina */
  --do:   #002d62;   /* Dominican Republic */
  --pe:   #d91023;   /* Peru */
  --cl:   #d52b1e;   /* Chile */
  --za:   #007749;   /* South Africa */
  --nz:   #00247d;   /* New Zealand */

  /* Spacing scale */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* Border radius */
  --r-sm:   8px;
  --r:      14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows — soft warm glow instead of none, matching the reference
     style's gentle ambient light around cards/accents */
  --shadow:         0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.5);
  --shadow-green:   0 0 24px rgba(138, 180, 248, 0.12);
  --shadow-gold:    0 0 24px rgba(168, 199, 250, 0.12);

  /* Transitions */
  --t:    0.18s ease;
  --t-md: 0.3s ease;

  /* Typography */
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-display: 'Inter', -apple-system, sans-serif;

  /* Container */
  --container:    1160px;
  --container-sm: 760px;
}

/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  /* Flat neutral surface — Chrome's dark mode has no vignette/glow,
     so neither does this; the earlier corner-glow was an overcorrection. */
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: #4ade80; }

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s6);
}

.container-sm {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 var(--s6);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s6); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.gap-6 { gap: var(--s6); }

.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }

/* ============================================================
   4. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--green) 0%, #16a34a 100%);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: none;
}

.logo span { color: var(--green); }

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--t);
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active {
  background: var(--bg-card-hover);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-md);
}

/* ============================================================
   5. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: var(--s16) 0 var(--s12);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s12);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s8);
  }
}

.hero-left {
  text-align: left;
}

.hero-pretitle {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: var(--s4);
  display: flex;
  gap: var(--s2);
}

.hero-pretitle span {
  color: var(--text-secondary);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--s4);
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: var(--s8);
  line-height: 1.7;
}

.hero-shop-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: var(--s10);
  transition: opacity var(--t);
}

.hero-shop-link::after {
  content: '⟶';
  font-size: 1.2rem;
  font-weight: 300;
}

.hero-shop-link:hover {
  opacity: 0.7;
}

.hero-specs {
  display: flex;
  gap: var(--s10);
}

.hero-spec-col {
  flex: 1;
}

.hero-spec-col h3 {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}

.hero-spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}

.hero-right {
  position: relative;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   6. SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s6);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--green);
  border-radius: 2px;
}

.see-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--t);
}
.see-all:hover { color: var(--green); }

/* ============================================================
   7. RESULT CARDS (Home page)
   ============================================================ */
.results-section {
  padding: var(--s10) 0;
}

.lottery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5);
  transition: all var(--t-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  text-decoration: none;
  color: inherit;
}

.lottery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--country-color, var(--green)) 0%, transparent 100%);
  opacity: 0.8;
}

.lottery-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow);
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-lottery-info {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.country-flag {
  font-size: 1.4rem;
  line-height: 1;
}

.lottery-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.lottery-country {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-latest {
  background: var(--green-subtle);
  border: 1px solid var(--border-green);
  color: var(--green);
}

.badge-latest::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.badge-time {
  background: rgba(127, 152, 181, 0.1);
  color: var(--text-muted);
}

/* Card draw date */
.card-draw-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Mini balls on card */
.card-numbers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
}

.card-numbers .separator {
  width: 1px;
  height: 24px;
  background: var(--border-bright);
  margin: 0 var(--s1);
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
}

.card-jackpot {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-jackpot strong {
  color: var(--gold);
  font-weight: 700;
}

.card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--t);
}
.lottery-card:hover .card-cta { gap: 8px; }

/* ============================================================
   8. LOTTERY BALLS
   ============================================================ */
/* Base ball */
.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--t);
}

/* Sizes */
.ball-xs  { width: 28px; height: 28px; font-size: 0.7rem; }
.ball-sm  { width: 34px; height: 34px; font-size: 0.8rem; }
.ball-md  { width: 48px; height: 48px; font-size: 1rem; }
.ball-lg  { width: 60px; height: 60px; font-size: 1.15rem; }
.ball-xl  { width: 72px; height: 72px; font-size: 1.3rem; }

/* Regular number ball */
.ball-regular {
  background: var(--bg-surface);
  border: 2.5px solid var(--border-bright);
  color: var(--text-primary);
}

/* Bonus ball */
.ball-bonus {
  background: var(--green);
  border: 2.5px solid var(--green);
  color: #fff;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.35);
}

/* Extra / secondary bonus */
.ball-extra {
  background: var(--gold);
  border: 2.5px solid var(--gold);
  color: #1a1000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

/* Supplementary (AU style) */
.ball-supp {
  background: transparent;
  border: 2.5px dashed var(--text-muted);
  color: var(--text-muted);
}

/* Powerball special */
.ball-powerball {
  background: var(--red);
  border: 2.5px solid var(--red);
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

/* Digit balls for Pick 3 / Pick 4 style */
.ball-digit {
  background: var(--bg-surface);
  border: 2px solid var(--border-bright);
  color: var(--text-primary);
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  width: 52px;
  height: 60px;
}

/* Ball label (for "Bonus", "PB", etc.) */
.ball-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
}

.ball-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ball-label.green { color: var(--green); }
.ball-label.gold { color: var(--gold); }
.ball-label.red { color: var(--red); }

/* Ball reveal animation */
.ball-animate {
  animation: ball-in 0.4s ease backwards;
}
.ball-animate:nth-child(1)  { animation-delay: 0.05s; }
.ball-animate:nth-child(2)  { animation-delay: 0.10s; }
.ball-animate:nth-child(3)  { animation-delay: 0.15s; }
.ball-animate:nth-child(4)  { animation-delay: 0.20s; }
.ball-animate:nth-child(5)  { animation-delay: 0.25s; }
.ball-animate:nth-child(6)  { animation-delay: 0.30s; }
.ball-animate:nth-child(7)  { animation-delay: 0.35s; }
.ball-animate:nth-child(8)  { animation-delay: 0.40s; }
.ball-animate:nth-child(9)  { animation-delay: 0.45s; }

@keyframes ball-in {
  from { opacity: 0; transform: scale(0.5) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   9. RESULTS PAGE LAYOUT
   ============================================================ */
.results-page {
  padding: var(--s8) 0 var(--s16);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--s6);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--t);
}
.breadcrumb a:hover { color: var(--text-primary); }

.breadcrumb .sep { color: var(--text-muted); opacity: 0.4; }
.breadcrumb .current { color: var(--text-secondary); }

/* Draw navigation bar */
.draw-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s3) var(--s5);
  margin-bottom: var(--s6);
}

.draw-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  transition: all var(--t);
  background: none;
}
.draw-nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.draw-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.draw-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.draw-date-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.draw-number-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Lottery header on results page */
.result-header {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s8);
}

.result-lottery-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.result-lottery-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.result-lottery-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================================
   10. LOTTO MAX RESULT DISPLAY
   ============================================================ */
.result-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  margin-bottom: var(--s5);
}

.result-block-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s5);
}

/* Main numbers row */
.numbers-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s6);
}

.numbers-main-group {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--s3);
}

.numbers-separator {
  width: 1px;
  height: 60px;
  background: var(--border-bright);
  flex-shrink: 0;
  margin: 0 var(--s2);
  align-self: center;
}

/* Jackpot info row */
.jackpot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid var(--border-green);
  border-radius: var(--r);
}

.jackpot-info {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.jackpot-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.jackpot-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.jackpot-won {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
}

.winners-link {
  font-size: 0.82rem;
  color: var(--green);
  font-weight: 600;
}

/* EXTRA game block */
.extra-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6) var(--s8);
  margin-bottom: var(--s5);
}

.extra-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s5);
}

.extra-badge {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-style: italic;
  transform: skew(-5deg);
  display: inline-block;
}

.extra-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================================
   11. PANAMA LOTTERY RESULT DISPLAY
   ============================================================ */
.pa-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: var(--s5);
}

.pa-result-header {
  background: linear-gradient(135deg, #0a1f4e 0%, #1952a0 100%);
  padding: var(--s6) var(--s8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pa-sorteo-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pa-sorteo-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pa-sorteo-num-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pa-sorteo-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold);
  text-align: right;
  line-height: 1;
  letter-spacing: -0.02em;
}

.pa-draw-date {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--s3) var(--s8);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Prize rows */
.pa-prize-row {
  padding: var(--s6) var(--s8);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s6);
  align-items: center;
}

.pa-prize-row:last-child { border-bottom: none; }

.pa-prize-left {}

.pa-prize-rank {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s2);
}

.pa-prize-rank.first  { color: #fbbf24; }
.pa-prize-rank.second { color: #94a3b8; }
.pa-prize-rank.third  { color: #cd7c3b; }

.pa-prize-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.pa-prize-rank.first  .pa-prize-number { color: #fbbf24; }

/* Letras / Serie / Folio for 1st prize */
.pa-ticket-info {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-top: var(--s3);
  flex-wrap: wrap;
}

.pa-ticket-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pa-ticket-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pa-ticket-field-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

/* Provinces */
.pa-provinces {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s1);
}

.pa-province-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: right;
  margin-bottom: 2px;
}

.pa-province-tag {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  text-align: center;
}

.pa-result-footer {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border);
  padding: var(--s4) var(--s8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}

.pa-official-seal {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pa-official-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

/* ============================================================
   12. PRIZE BREAKDOWN TABLE
   ============================================================ */
.prize-table-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s5);
}

.prize-table-header {
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prize-table {
  width: 100%;
  border-collapse: collapse;
}

.prize-table th {
  padding: var(--s3) var(--s6);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.prize-table th:last-child,
.prize-table td:last-child { text-align: right; }

.prize-table td {
  padding: var(--s3) var(--s6);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.prize-table tr:last-child td { border-bottom: none; }

.prize-table tr:hover td {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

.prize-match {
  font-weight: 600;
  color: var(--text-primary);
}

.prize-amount {
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-display);
}

.prize-jackpot-row td {
  background: rgba(245, 158, 11, 0.06);
  color: var(--text-primary);
}

/* ============================================================
   13. SCHEDULE / UPCOMING DRAWS WIDGET
   ============================================================ */
.schedule-section {
  padding: var(--s10) 0;
  border-top: 1px solid var(--border);
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s3) var(--s5);
  transition: all var(--t);
}
.schedule-item:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

.schedule-flag { font-size: 1.25rem; flex-shrink: 0; }

.schedule-info { flex: 1; }

.schedule-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.schedule-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.schedule-countdown {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

.schedule-countdown.soon { color: var(--gold); }

/* ============================================================
   14. STATS ROW
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  margin-bottom: var(--s10);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s5);
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   15. FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--s12) 0 var(--s6);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s10);
  margin-bottom: var(--s10);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: var(--s3);
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--t);
}
.footer-col ul li a:hover { color: var(--green); }

.footer-bottom {
  padding-top: var(--s6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   16. COUNTRY COLOR MODIFIERS
   ============================================================ */
[data-country="ca"] { --country-color: var(--ca); }
[data-country="uk"] { --country-color: var(--uk); }
[data-country="au"] { --country-color: var(--au); }
[data-country="us"] { --country-color: var(--us); }
[data-country="eu"] { --country-color: var(--eu); }
[data-country="pa"] { --country-color: var(--pa); }
[data-country="mx"] { --country-color: var(--mx); }
[data-country="co"] { --country-color: var(--co); }
[data-country="ar"] { --country-color: var(--ar); }
[data-country="do"] { --country-color: var(--do); }
[data-country="za"] { --country-color: var(--za); }
[data-country="nz"] { --country-color: var(--nz); }

[data-country="ca"] .ball-bonus { background: var(--ca); border-color: var(--ca); box-shadow: 0 0 16px rgba(204, 0, 0, 0.35); }
[data-country="uk"] .ball-bonus { background: #003087; border-color: #003087; }
[data-country="au"] .ball-powerball { background: #009B4D; border-color: #009B4D; }

/* ============================================================
   17. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root {
    --s8: 24px; --s10: 32px; --s12: 40px; --s16: 52px;
  }

  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: var(--s4);
    gap: var(--s1);
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  .hero h1 { font-size: 2rem; }

  .draw-nav { padding: var(--s3); }
  .draw-date-label { font-size: 0.9rem; }

  .pa-prize-number { font-size: 2.5rem; }
  .pa-result-header { flex-direction: column; gap: var(--s3); text-align: center; }
  .pa-prize-row { grid-template-columns: 1fr; }
  .pa-provinces { align-items: flex-start; }

  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }

  .result-header { flex-direction: column; align-items: flex-start; }
  .numbers-row { gap: var(--s2); }
  .ball-lg { width: 48px; height: 48px; font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .hero { padding: var(--s10) 0; }
  .quick-links { gap: 6px; }
  .quick-link { font-size: 0.78rem; padding: 6px 10px; }
  .ball-md { width: 40px; height: 40px; font-size: 0.9rem; }
  .pa-prize-number { font-size: 2rem; }
  .jackpot-amount { font-size: 1.2rem; }
}

/* WordPress Custom Logo */
.custom-logo-link img { max-height: 40px; width: auto; display: block; }

/* ============================================================
   AUTO-GENERATED ARTICLE BODY (Lottosya_Content)
   Typography for the SEO article text around the result block —
   the result block / ball / pa-result-card markup inside it already
   has its own styling above; this only covers the surrounding prose.
   ============================================================ */
.lsya-post-content {
  margin-top: var(--s8);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  width: 100%;
  max-width: 100%;
}
.lsya-post-content > p {
  margin: 0 0 var(--s5);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.lsya-post-content > h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin: var(--s10) 0 var(--s4);
  padding-top: var(--s6);
  border-top: 1px solid var(--border);
}
.lsya-post-content > h3:first-of-type { border-top: none; padding-top: 0; }
.lsya-post-content ul,
.lsya-post-content ol {
  margin: 0 0 var(--s5);
  padding-left: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.lsya-post-content li { color: var(--text-secondary); }
.lsya-post-content strong { color: var(--text-primary); }
.lsya-post-content em {
  display: block;
  margin-top: var(--s6);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: normal;
}
.lsya-post-content .result-block,
.lsya-post-content .pa-result-card,
.lsya-post-content .extra-block {
  margin: var(--s6) 0;
}

/* ============================================================
   History archive page (/{lang}/{country}/sorteos-anteriores/)
   ============================================================ */
.history-year {
  margin-bottom: var(--s10, 40px);
  scroll-margin-top: var(--s6, 24px);
}
.history-year h2 {
  font-size: 1.6rem;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: var(--s3, 12px);
  margin-bottom: var(--s6, 24px);
}
.history-month {
  margin-bottom: var(--s8, 32px);
}
.history-month h3 {
  color: var(--text-secondary);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s4, 16px);
}
.history-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r, 14px);
  padding: var(--s5, 20px);
  margin-bottom: var(--s3, 12px);
  scroll-margin-top: var(--s6, 24px);
}
.history-entry-title {
  font-weight: 700;
  margin-bottom: var(--s3, 12px);
}

