:root {
  /* Pokémon brand */
  --red: #ee1515;
  --red-dark: #a30e0e;
  --yellow: #ffcb05;
  --yellow-lt: #ffde00;
  --blue: #2a75bb;
  --blue-dark: #1b3f86;
  /* GO Fest night surface */
  --bg: #120a2e;
  --bg-2: #1a1140;
  --panel: rgba(30, 20, 66, 0.72);
  --panel-solid: #241653;
  --panel-edge: rgba(120, 100, 200, 0.28);
  --ink: #f3f0ff;
  --ink-dim: #b8b0da;
  --ink-faint: #8b83b0;
  --gold: #ffcb05;
  --teal: #38e0c8;
  --pink: #ff5d8f;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  --maxw: 1120px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 74px); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(61, 123, 255, 0.28), transparent 60%),
    radial-gradient(900px 600px at 10% 10%, rgba(255, 93, 143, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%, #0c0722);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, #fff, transparent),
    radial-gradient(1px 1px at 40% 80%, #cfe, transparent),
    radial-gradient(1px 1px at 85% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, #ffd, transparent),
    radial-gradient(1px 1px at 15% 65%, #fff, transparent);
  opacity: 0.5;
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Top bar (Poké Ball red accent) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(14, 8, 34, 0.9);
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 0 #000, 0 6px 18px rgba(0,0,0,0.4);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; height: var(--topbar-h);
  padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: linear-gradient(#ee1515 0 calc(50% - 3px), #111 calc(50% - 3px) calc(50% + 3px), #f7f7f7 calc(50% + 3px) 100%);
  box-shadow: inset 0 0 0 3px #111, 0 0 0 2px rgba(255,203,5,0.9), var(--shadow);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: inset 0 0 0 2px #111, 0 0 0 3px #111;
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: 1.1rem; margin: 0; letter-spacing: 0.3px; font-weight: 900; white-space: nowrap;
  color: var(--yellow-lt);
  text-shadow: 1.5px 1.5px 0 var(--blue-dark), -1px 1px 0 var(--blue-dark), 1px -1px 0 var(--blue-dark), -1px -1px 0 var(--blue-dark);
}
.tagline { margin: 0; font-size: 0.72rem; color: var(--teal); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lang-toggle { display: flex; align-items: center; gap: 6px; flex: none; }
.lang-label { font-size: 0.66rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.lang-btn {
  border: 2px solid var(--panel-edge); background: rgba(255,255,255,0.04); color: var(--ink-dim);
  padding: 6px 11px; border-radius: 999px; font-size: 0.8rem; cursor: pointer; font-weight: 700;
  transition: all 0.15s; white-space: nowrap;
}
.lang-btn.is-active { background: var(--yellow); color: #241653; border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,203,5,0.3); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 16px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 14px; display: grid; gap: 14px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 26px, #111 26px 32px, transparent 32px),
    linear-gradient(#ee1515 0 calc(50% - 4px), #111 calc(50% - 4px) calc(50% + 4px), #f7f7f7 calc(50% + 4px) 100%);
  opacity: 0.10; pointer-events: none;
}
.hero h2 {
  margin: 0; font-size: clamp(1.5rem, 5vw, 2.15rem); font-weight: 900; line-height: 1.05; letter-spacing: 0.3px;
  color: var(--yellow-lt);
  text-shadow:
    2px 2px 0 var(--blue), -2px 2px 0 var(--blue), 2px -2px 0 var(--blue), -2px -2px 0 var(--blue),
    0 4px 0 var(--blue-dark), 0 6px 8px rgba(0,0,0,0.5);
}
.hero .hero-sub { color: var(--ink-dim); margin: 0; font-weight: 600; }
.hero .free-badge {
  display: inline-block; background: linear-gradient(90deg, var(--red), #ff5a3c);
  color: #fff; font-weight: 900; padding: 4px 13px; border-radius: 999px; font-size: 0.78rem;
  letter-spacing: 0.05em; box-shadow: 0 0 0 2px rgba(255,255,255,0.15) inset, var(--shadow);
}
.countdown { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-cell {
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.18));
  border: 1px solid var(--panel-edge); border-radius: 12px; padding: 8px 13px; text-align: center; min-width: 62px;
}
.cd-cell b { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--yellow); font-variant-numeric: tabular-nums; font-weight: 900; }
.cd-cell span { font-size: 0.64rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.cd-label { font-weight: 800; color: var(--teal); margin-bottom: 2px; }
.cd-live { color: var(--pink); font-weight: 700; }
.bonus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.bonus-item {
  display: flex; gap: 8px; align-items: flex-start; background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-edge); border-radius: 10px; padding: 8px 10px; font-size: 0.84rem; color: var(--ink-dim);
}
.bonus-item::before { content: "✦"; color: var(--gold); }

/* ---------- Day switcher: sticky horizontal pill strip ---------- */
.day-tabs {
  position: sticky; top: var(--topbar-h); z-index: 20;
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding: 10px 4px; margin: 0 -4px 14px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, rgba(14,8,34,0.96), rgba(14,8,34,0.72));
  backdrop-filter: blur(8px);
  scrollbar-width: thin;
}
.day-tabs::-webkit-scrollbar { height: 5px; }
.day-tabs::-webkit-scrollbar-thumb { background: var(--panel-edge); border-radius: 3px; }
.day-tab {
  flex: 0 0 auto; scroll-snap-align: start; text-align: left; cursor: pointer;
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 14px;
  padding: 9px 14px; color: var(--ink); transition: transform 0.12s, border-color 0.12s, background 0.12s;
  display: flex; flex-direction: column; gap: 1px; min-width: 118px;
}
.day-tab:hover { transform: translateY(-2px); }
.day-tab.is-active { border-color: var(--yellow); background: linear-gradient(160deg, rgba(255,203,5,0.2), var(--panel)); box-shadow: 0 0 0 2px rgba(255,203,5,0.25); }
.day-tab .dt-day { font-weight: 800; font-size: 0.98rem; white-space: nowrap; }
.day-tab .dt-date { font-size: 0.74rem; color: var(--ink-dim); white-space: nowrap; }
.day-tab .dt-status { font-size: 0.72rem; font-weight: 800; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.dt-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-live { color: var(--pink); }  .status-live .dot { background: var(--pink); box-shadow: 0 0 0 3px rgba(255,93,143,0.3); animation: pulse 1.2s infinite; }
.status-soon { color: var(--teal); }  .status-soon .dot { background: var(--teal); }
.status-past { color: var(--ink-faint); } .status-past .dot { background: var(--ink-faint); }

/* ---------- In-day section quick-nav ---------- */
.section-nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 2px; margin-top: 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: 0 0 auto; text-decoration: none; font-size: 0.82rem; font-weight: 700; color: var(--ink-dim);
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-edge); border-radius: 999px; padding: 6px 13px;
  transition: all 0.12s; white-space: nowrap;
}
.section-nav a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Section blocks ---------- */
.block { margin-bottom: 20px; scroll-margin-top: calc(var(--topbar-h) + 78px); }
.block > h3 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-weight: 800; }
.block > h3 .em { font-size: 1.3rem; }
.card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }

/* day header card */
.day-head-card h3 { margin-top: 0; }

/* narratable row with play button */
.speak { display: flex; gap: 10px; align-items: flex-start; }
.speak p { margin: 0; }
.play-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--teal); background: rgba(56,224,200,0.14); color: var(--teal);
  cursor: pointer; font-size: 0.85rem; display: grid; place-items: center; transition: all 0.15s;
}
.play-btn:hover { background: var(--teal); color: #08122a; }
.play-btn.is-playing { background: var(--pink); border-color: var(--pink); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---------- Habitats ---------- */
.habitats { display: grid; gap: 12px; }
.habitat { border: 1px solid var(--panel-edge); border-radius: 14px; overflow: hidden; background: rgba(0,0,0,0.16); }
.habitat.is-now { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(255,93,143,0.4); }
.habitat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(90deg, rgba(61,123,255,0.18), transparent); flex-wrap: wrap; }
.habitat-time { font-weight: 900; color: var(--yellow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.habitat-name { font-weight: 700; }
.habitat-now-tag { margin-left: auto; font-size: 0.68rem; color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; background: var(--pink); padding: 2px 8px; border-radius: 999px; }
.type-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; }
.type-chip { font-size: 0.74rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.35); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* ---------- Pokémon cards ---------- */
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.mon-card { background: rgba(0,0,0,0.2); border: 1px solid var(--panel-edge); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mon-card:hover { border-color: rgba(255,203,5,0.4); }
.mon-top { display: flex; align-items: center; gap: 10px; }
.mon-img { width: 66px; height: 66px; flex: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.45)); }
.mon-name { font-weight: 800; font-size: 1rem; }
.mon-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.badge { font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-shiny { background: linear-gradient(90deg,#ffd54a,#ff9d3c); color: #3a2400; }
.badge-shiny-no { background: rgba(255,255,255,0.1); color: var(--ink-faint); }
.badge-move { background: rgba(61,123,255,0.28); color: #cfe0ff; border: 1px solid rgba(61,123,255,0.6); }
.badge-mythic { background: linear-gradient(90deg,#b06bff,#ff5d8f); color: #fff; }
.mon-reason { font-size: 0.86rem; color: var(--ink-dim); }
.move-box { background: rgba(61,123,255,0.14); border: 1px solid rgba(61,123,255,0.45); border-radius: 10px; padding: 8px 10px; font-size: 0.82rem; }
.move-box .move-name { font-weight: 800; color: var(--teal); }
.move-box .move-kind { font-size: 0.68rem; color: var(--ink-faint); text-transform: uppercase; margin-left: 4px; }

/* ---------- Raids ---------- */
.super-mega { background: linear-gradient(150deg, rgba(176,107,255,0.22), rgba(255,93,143,0.16)); border: 1px solid rgba(176,107,255,0.55); }
.raid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.raid-tier h4 { margin: 0 0 8px; font-size: 0.9rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.05em; }
.raid-list { display: flex; flex-wrap: wrap; gap: 6px; }
.raid-mon { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.24); border: 1px solid var(--panel-edge); border-radius: 999px; padding: 3px 11px 3px 3px; font-size: 0.8rem; font-weight: 600; }
.raid-mon img { width: 32px; height: 32px; object-fit: contain; }
.raid-more { margin-top: 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--panel-edge); color: var(--teal); font-weight: 800; font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.raid-more:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.raid-hidden { display: none; }
.raid-hidden.show { display: flex; }

/* ---------- Facts ---------- */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 10px; }
.fact { background: rgba(0,0,0,0.16); border: 1px solid var(--panel-edge); border-radius: 12px; padding: 12px; border-left: 4px solid var(--gold); }

/* ---------- Zeraora / extras ---------- */
.zeraora-card { background: linear-gradient(150deg, rgba(255,203,5,0.16), rgba(61,123,255,0.14)); border: 1px solid var(--gold); display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.zeraora-card img { width: 120px; height: 120px; object-fit: contain; }
.zeraora-steps { margin: 8px 0 0; padding-left: 18px; font-size: 0.86rem; color: var(--ink-dim); }

/* ---------- Footer ---------- */
.site-footer { max-width: var(--maxw); margin: 20px auto 40px; padding: 0 18px; }
.site-footer p { font-size: 0.75rem; color: var(--ink-faint); text-align: center; }

.audio-status {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.88); color: #fff; padding: 8px 16px; border-radius: 999px;
  font-size: 0.82rem; opacity: 0; transition: opacity 0.25s; pointer-events: none; z-index: 40; border: 1px solid var(--panel-edge);
}
.audio-status.show { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  :root { --topbar-h: 54px; }
  main { padding: 12px; }
  .hero { padding: 16px; }
  .lang-label { display: none; }
  .lang-btn { padding: 6px 9px; font-size: 0.76rem; }
  .brand-text h1 { font-size: 0.98rem; }
  .tagline { display: none; }
  .cd-cell { min-width: 54px; padding: 7px 9px; }
  .cd-cell b { font-size: 1.4rem; }
  .zeraora-card { grid-template-columns: 1fr; text-align: center; }
  .zeraora-card img { justify-self: center; }
}
@media (max-width: 400px) {
  .lang-btn span.lbl { display: none; }
}
