:root {
  color-scheme: light;
  --green: #04a885;
  --green-dark: #087861;
  --red: #ef4d4b;
  --yellow: #ffd53d;
  --blue: #3956d9;
  --ink: #172033;
  --muted: #6d7588;
  --soft: #f4f7f9;
  --line: #dfe6ee;
  --paper: #ffffff;
  --danger: #b42318;
  --shadow: 0 18px 42px rgba(31, 43, 67, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p { margin: 0; }

h1 {
  max-width: 720px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .94;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

button,
select,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 76px);
  border-bottom: 1px solid rgba(223, 230, 238, .72);
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(4, 168, 133, .28);
}

.main-nav,
.header-actions,
.hero-actions,
.trust-line {
  display: flex;
  align-items: center;
}

.main-nav {
  gap: 24px;
  color: #30394d;
  font-size: 14px;
  font-weight: 800;
}

.header-actions,
.hero-actions {
  gap: 10px;
}

.btn,
.checker-form button,
.filters button,
.history-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(4, 168, 133, .24);
}

.btn.secondary,
.history-actions button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
  box-shadow: none;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 34px;
  align-items: center;
  min-height: 540px;
  padding: 56px clamp(18px, 5vw, 76px) 42px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 213, 61, .55), transparent 19%),
    radial-gradient(circle at 86% 76%, rgba(239, 77, 75, .14), transparent 25%),
    linear-gradient(180deg, #fff 0%, #f7faf9 100%);
}

.hero-copy {
  max-width: 650px;
}

.kicker,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9fbf5;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.hero h1 {
  margin: 18px 0 14px;
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 650;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.trust-line {
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.trust-line strong {
  color: var(--ink);
}

.phone-card {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.phone {
  width: min(330px, 82vw);
  min-height: 500px;
  padding: 18px;
  border: 10px solid #172033;
  border-radius: 38px;
  background: white;
  box-shadow: 0 24px 60px rgba(23, 32, 51, .24);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.phone-title {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  color: white;
  background: linear-gradient(135deg, var(--green), #27c59a);
}

.phone-logo,
.selected-logo,
.card-logo,
.games img {
  display: block;
  object-fit: contain;
}

.phone-logo {
  width: 138px;
  height: 54px;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .14));
}

.phone-title span {
  display: block;
  opacity: .82;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.phone-title strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
}

.phone-balls,
.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phone-balls {
  margin-top: 16px;
  gap: 8px;
}

.phone-balls span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: white;
  font-weight: 900;
}

.phone-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.phone-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfd;
  font-size: 13px;
  font-weight: 900;
}

.dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: #ffe8e8;
  font-size: 11px;
}

.floating-card {
  position: absolute;
  display: grid;
  gap: 2px;
  min-width: 160px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.floating-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.floating-card strong {
  font-size: 22px;
}

.floating-card.left {
  left: 8px;
  top: 72px;
}

.floating-card.right {
  right: 0;
  bottom: 84px;
}

main {
  background: white;
}

.section,
.status-band {
  padding-inline: clamp(18px, 5vw, 76px);
}

.status-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
}

.status-band span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.status-band a {
  color: var(--green-dark);
  font-weight: 900;
  white-space: nowrap;
}

.section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.games-section {
  padding-top: 34px;
}

.section-heading,
.summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-copy {
  max-width: 390px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.eyebrow,
.detail-title,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.games {
  display: grid;
  grid-template-columns: repeat(11, minmax(112px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
}

.games button {
  min-height: 188px;
  display: grid;
  align-content: center;
  justify-items: center;
  grid-template-rows: 62px auto minmax(58px, auto);
  gap: 9px;
  padding: 16px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(31, 43, 67, .06);
  text-align: center;
  font-weight: 900;
  cursor: pointer;
}

.games button.active {
  border-color: rgba(4, 168, 133, .42);
  background: #f0fff9;
}

.games img {
  width: 84px;
  height: 58px;
}

.nav-jackpot {
  width: 100%;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px 8px;
  border-radius: 16px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.games button.active .nav-jackpot {
  background: white;
}

.nav-jackpot em,
.nav-jackpot span {
  display: block;
  font-style: normal;
}

.nav-jackpot em {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav-jackpot strong {
  display: block;
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1.05;
}

.nav-jackpot.no-amount strong,
.nav-jackpot.empty {
  color: var(--muted);
  font-size: 12px;
}

.results-band {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 22px;
}

.latest-card,
.checker,
.history-card-link,
.history,
.game-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.latest-card,
.checker,
.history-card-link,
.history,
.game-card {
  padding: 22px;
}

.selected-logo {
  width: 150px;
  height: 70px;
  margin: 8px 0;
}

.source-pill {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e9fbf5;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.result-panel {
  min-height: 220px;
}

.draw-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 22px;
  align-items: start;
}

.draw-date {
  color: var(--muted);
  font-weight: 850;
}

.balls {
  gap: 11px;
  margin-top: 22px;
}

.ball {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(4, 168, 133, .22);
}

.ball.extra {
  color: #6c4500;
  background: var(--yellow);
}

.extra-list,
.mini-extras,
.national-refunds div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.extra-list {
  margin-top: 18px;
}

.extra-chip,
.mini-extras span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff3cf;
  color: #6c4500;
  font-weight: 900;
}

.extra-chip em,
.mini-extras em {
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}

.extra-chip strong,
.mini-extras strong {
  font-size: 14px;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-list div,
.stats-grid div,
.checker-result,
.empty,
.error {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfd;
}

.meta-list {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.meta-list strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.meta-list small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.details-block {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.prize-table {
  display: grid;
  gap: 10px;
}

.prize-head,
.prize-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 140px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-size: 14px;
  font-weight: 850;
}

.prize-head {
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  text-transform: uppercase;
}

.prize-row strong,
.prize-row em {
  color: var(--green-dark);
  font-style: normal;
  font-weight: 900;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-grid strong {
  display: block;
  margin-top: 4px;
}

.side-stack,
.checker-form,
.phone-list,
.history-list {
  display: grid;
  gap: 18px;
}

.checker {
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 213, 61, .38), transparent 28%),
    white;
}

.checker-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
}

select,
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfd;
}

.checker-form button {
  width: 100%;
}

.checker-result {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 750;
}

.checker-result strong {
  color: var(--ink);
  font-size: 22px;
}

.checker-result.prize {
  border-color: #86efac;
  background: #f0fdf4;
}

.checker-result.prize strong {
  color: #047857;
}

.checker-result.error,
.error {
  color: var(--danger);
  border-color: #fecdca;
  background: #fff6f5;
}

.history-card-link h2 {
  margin: 6px 0 10px;
  font-size: 30px;
}

.history-card-link p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.history-card-link .btn {
  margin-top: 18px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.card-logo {
  width: 86px;
  height: 58px;
}

.game-card h3 {
  margin: 0;
  font-size: 18px;
}

.card-jackpot {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.card-jackpot span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card-jackpot strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.05;
}

.card-jackpot em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.game-card .balls {
  margin-top: 10px;
  gap: 6px;
}

.game-card .ball {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.history {
  margin: 48px clamp(18px, 5vw, 76px);
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.history-actions span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mini-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mini-balls span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.mini-extras {
  gap: 6px;
}

.mini-extras span {
  min-height: 26px;
  padding: 3px 7px;
  border-radius: 8px;
}

.mini-extras em {
  font-size: 10px;
}

.mini-extras strong {
  font-size: 12px;
}

.pool-summary,
.match-row,
.national-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
}

.pool-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
}

.pool-summary strong {
  color: var(--green-dark);
  font-size: 22px;
}

.pool-summary span,
.match-more {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.match-list,
.national-list,
.doc-list {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.match-list.compact,
.national-list.compact {
  margin-top: 0;
}

.match-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) 78px 58px;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.match-row.pleno15 {
  border-color: #f1c27b;
  background: #fffaf0;
}

.match-pos,
.match-sign,
.national-refunds strong {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 9px;
  font-weight: 900;
}

.match-pos {
  color: var(--muted);
  background: var(--soft);
}

.match-teams {
  min-width: 0;
  font-weight: 800;
}

.match-teams em,
.match-score {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.match-score {
  text-align: center;
}

.match-sign {
  color: white;
  background: var(--green);
}

.match-row.pleno15 .match-sign {
  background: var(--red);
}

.national-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 100px 100px;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.national-row span,
.national-refunds {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.national-row strong {
  color: var(--green-dark);
  font-size: 22px;
  letter-spacing: .08em;
}

.national-row em {
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.national-refunds {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.national-refunds strong {
  min-width: 30px;
  min-height: 30px;
  color: white;
  background: var(--red);
}

.doc-list a,
.draw-toggle {
  color: var(--green-dark);
  font-weight: 900;
}

.draw-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
}

.history-detail.hidden {
  display: none;
}

.history-detail td {
  background: #fbfdff;
}

.empty,
.error {
  color: var(--muted);
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

footer {
  padding: 0 clamp(18px, 5vw, 76px) 32px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .hero,
  .results-layout,
  .draw-main {
    grid-template-columns: 1fr;
  }

  .phone-card {
    min-height: 440px;
  }

  .floating-card {
    position: static;
    margin-top: 12px;
  }

  .section-heading,
  .summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .prize-head,
  .prize-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    font-size: 20px;
  }

  .header-actions .secondary {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 17px;
  }

  .phone {
    width: min(300px, 92vw);
  }

  .ball {
    width: 45px;
    height: 45px;
  }

  .match-row {
    grid-template-columns: 30px minmax(150px, 1fr) 50px;
  }

  .match-score {
    display: none;
  }

  .national-row {
    grid-template-columns: 1fr 82px;
  }

  .national-row em {
    grid-column: 1 / -1;
    text-align: left;
  }
}
