/* ============================================================
   PowerDraw — implementation of the Figma design (node 156:6)
   Dark monochrome system: #131313 ground, #282828 panels,
   #868686 muted text, #45d17d for money. Committed dark-only.
   ============================================================ */

:root {
  --bg-0: #131313;
  --bg-1: #1d1d1d;
  --bg-2: #222222;
  --panel: #282828;
  --panel-2: #494949;
  --line: #4d4d4d;
  --line-2: #535353;
  --muted: #868686;
  --muted-2: #b4b4b4;
  --bright: #dbdbdb;
  --white: #ffffff;
  --green: #45d17d;
  --btn-dark: #171717;
  --font-body: "Instrument Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-label: "Space Grotesk", "Instrument Sans", monospace, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-color: var(--bg-0);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }

h1, h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 4.5vw, 64px); }
h2 { font-size: clamp(34px, 4.2vw, 64px); }

/* ---------- Shared bits ---------- */
.label {
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.label-dim { margin-top: 4px; }
.green { color: var(--green); }

.link-more {
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.link-more:hover { color: var(--white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 44px;
  border-radius: 36px;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.btn-white { background: var(--white); color: #000; }
.btn-white:hover { opacity: 0.88; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--white); }
.btn-dark {
  background: var(--btn-dark);
  color: var(--white);
  border-radius: 8px;
  font-family: var(--font-label);
  border: 1px solid #2c2c2c;
}
.btn-dark:hover { background: #202020; }
.btn-square { border-radius: 8px; font-family: var(--font-label); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  padding: 48px 48px 60px;
  position: relative;
  overflow: hidden;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 3;
}
.nav-brand {
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.08em;
}
.nav-links { display: flex; }
.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--line);
  margin-left: -1px;
  transition: background 0.15s, color 0.15s;
}
.nav-pill:hover { background: rgba(255, 255, 255, 0.08); }
.nav-pill-solid { background: var(--white); color: #000; border-color: var(--white); }
.nav-pill-solid:hover { background: var(--bright); }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; }

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
}
.hero-copy { max-width: 751px; }
.hero-copy h1 { margin-bottom: 42px; }
.hero-copy .btn-dark { min-width: 225px; }
.hero-eligibility {
  margin-top: 20px;
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--muted);
}
.hero-eligibility strong { color: var(--bright); font-weight: 500; }

.hero-art {
  width: min(646px, 42vw);
  aspect-ratio: 646 / 466;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.hero-art img {
  position: absolute;
  width: 174.43%;
  height: 181.27%;
  left: -36.87%;
  top: -38.58%;
  max-width: none;
}

.hero-cards {
  display: grid;
  grid-template-columns: 361px 361px 1fr;
  gap: 20px;
  margin-top: 88px;
  position: relative;
  z-index: 2;
}
.hcard { padding: 20px; min-height: 361px; display: flex; flex-direction: column; }
.hcard-outline { border: 1px solid var(--line); }
.hcard-solid { background: var(--panel); }
.hcard-center { align-items: flex-start; }

/* Last winning draw */
.last-digits-box {
  background: var(--panel);
  border-radius: 8px;
  height: 59px;
  width: 266px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 68px auto 40px;
}
.hcard-outline .label { text-align: center; }
.last-digits {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.last-winner {
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}
.winner-wallet { color: var(--white); font-weight: 600; text-decoration: none; }
.last-prize { display: block; margin-top: 4px; }
.last-prize strong { color: var(--green); font-weight: 500; font-variant-numeric: tabular-nums; }
.hcard-outline .link-more { margin-top: auto; text-align: center; }

/* Next draw */
.hcard-center { text-align: center; align-items: center; }
.countdown {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 60px;
}
.cd-box {
  width: 100px;
  height: 100px;
  background: var(--panel);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-box span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 64px;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.cd-sep {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 64px;
  color: var(--white);
}
.jackpot {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--white);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hcard-note {
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--muted);
  margin-top: auto;
  max-width: 330px;
  line-height: 1.5;
}
.hcard-note-left { max-width: 456px; }

/* Instant pool card */
.hcard-solid-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.instant-pool {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ============ MARQUEE ============ */
.marquee {
  background: var(--panel);
  overflow: hidden;
  padding: 28px 0;
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  width: max-content;
  animation: scroll 45s linear infinite;
  font-family: var(--font-label);
  font-size: 20px;
  color: var(--muted);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============ SECTIONS ============ */
.section {
  padding: 150px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-grad { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%); }
.section-winners { background: #141414; }
.section-buy { background: var(--panel); padding-top: 84px; padding-bottom: 84px; }

.section-sub {
  font-family: var(--font-label);
  font-size: 20px;
  color: var(--muted);
  margin-top: 20px;
}
.section-foot {
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
  max-width: 792px;
  margin-top: 96px;
}
.section-foot-tight { margin-top: 28px; margin-bottom: 64px; }
.section-left { align-items: flex-start; text-align: left; }
.section-foot-left { max-width: 570px; }

/* ============ TICKET CHECKER ============ */
.ticket-search {
  display: flex;
  gap: 6px;
  margin-top: 90px;
  width: min(791px, 100%);
  flex-wrap: wrap;
  justify-content: center;
}
.ticket-search input {
  flex: 1;
  min-width: 240px;
  height: 72px;
  background: var(--panel);
  border: 0;
  border-radius: 8px;
  padding: 0 25px;
  font-family: var(--font-label);
  font-size: 20px;
  color: var(--white);
  outline: none;
}
.ticket-search input::placeholder { color: var(--muted); }
.ticket-search input:focus { outline: 1px solid var(--line-2); }
.ticket-search .btn { padding: 0 40px; }

.ticket-error {
  margin-top: 20px;
  font-family: var(--font-label);
  font-size: 16px;
  color: #e06666;
}

.ticket-result { margin-top: 64px; width: min(900px, 100%); }
.found-line {
  font-family: var(--font-label);
  font-size: 20px;
  color: var(--muted);
}
.found-line .found-num { color: var(--muted-2); }
.tr-status {
  display: inline-block;
  margin-left: 14px;
  font-size: 16px;
}
.tr-status.eligible { color: var(--green); }
.tr-status.not-eligible { color: var(--muted); }
.tr-range {
  margin-top: 14px;
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--bright);
}
.ticket-stubs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}
.stub {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--bright);
}
.stub-more { color: var(--muted); border-style: dashed; }
.tr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  border-top: 1px solid #333;
  padding-top: 32px;
}
.tr-stat span {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  color: var(--white);
  word-break: break-all;
}
.tr-stat label {
  font-family: var(--font-label);
  font-size: 13px;
  color: var(--muted);
}
.tr-note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}

/* ============ LIVE DRAW ============ */
.draw-machine {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 96px;
  width: 100%;
}
.dm-chamber {
  position: relative;
  width: min(657px, 100%);
  height: 292px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 40px;
  overflow: hidden;
}
.dm-ball {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3d3d3d;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.dm-ball-red { background: #565656; color: var(--white); }
.dm-chamber.shaking .dm-ball { animation: bounce 0.7s infinite alternate ease-in-out; }
@keyframes bounce {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(var(--dx, 20px), var(--dy, -60px)) rotate(160deg); }
}
@media (prefers-reduced-motion: reduce) {
  .dm-chamber.shaking .dm-ball { animation: none; }
}

.dm-ticket-label { margin-top: 40px; color: var(--white); }
.dm-slots {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.dm-slot {
  width: 118px;
  height: 118px;
  background-image: url("assets/ball-slot.svg");
  background-size: 118px 118px;
  background-repeat: no-repeat;
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.dm-slot.revealed { color: var(--white); transform: scale(1.04); }
.dm-slot.spinning { color: var(--line-2); }

.dm-winner {
  margin-top: 44px;
  min-height: 28px;
  font-family: var(--font-label);
  font-size: 20px;
  line-height: 1.5;
  color: var(--white);
  padding: 0 16px;
  max-width: 700px;
}
.dm-winner .dim { color: var(--muted); }
.dm-winner .win-amount { color: var(--green); }
.dm-winner code { font-family: inherit; color: var(--white); }
.draw-machine .btn { margin-top: 44px; min-width: 313px; }

/* ============ CARDS (how it works / tokenomics) ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: min(1185px, 100%);
}
.card {
  background: var(--panel);
  border-radius: 8px;
  padding: 27px 28px 34px;
  text-align: left;
}
.badge {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
  margin-bottom: 36px;
}
.badge img { display: block; width: 44px; height: 44px; }
.badge i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  color: #000;
}
.card h3 {
  font-family: var(--font-label);
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
}
.card p {
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

/* ============ TOKENOMICS FEE BAR ============ */
.fee-bar {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 40px;
}
.fee-seg {
  height: 72px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 24px);
  color: #000;
  white-space: nowrap;
  overflow: hidden;
}
.fee-seg-a { flex: 2; background: #dddddd; }
.fee-seg-b { flex: 1; background: #cbcbcb; }
.fee-seg-c { flex: 1; background: #adadad; }
.section-left .card-grid { width: 100%; }

/* ============ INSTANT WIN ============ */
.iv-card {
  width: min(507px, 100%);
  background: var(--panel);
  border-radius: 8px;
  padding: 28px 24px 34px;
  margin-top: 54px;
}
.iv-wallet { font-size: 20px; color: var(--white); margin-top: 14px; }
.iv-line {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}
.iv-result { font-size: 20px; color: var(--white); letter-spacing: 0.04em; }
.iv-prize { font-size: 20px; color: var(--white); margin-top: 12px; }

.check-list {
  list-style: none;
  margin: 64px 0 0;
  text-align: left;
}
.check-list li {
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
  margin-bottom: 4px;
}
#instant .btn { margin-top: 80px; min-width: 313px; }

/* ============ RECENT WINNERS ============ */
.winners-panel {
  width: min(1234px, 100%);
  background: var(--panel);
  border-radius: 32px;
  margin-top: 48px;
  padding: 20px 40px;
  overflow-x: auto;
}
.winners-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 16px;
}
.winners-table th {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 22px 16px;
  border-bottom: 2px solid #3a3a3a;
}
.winners-table td {
  padding: 26px 16px;
  text-align: left;
  color: var(--muted-2);
  border-bottom: 2px solid #3a3a3a;
  font-family: var(--font-label);
}
.winners-table tr:last-child td { border-bottom: 0; }
.empty-cell {
  text-align: center !important;
  color: var(--muted) !important;
  padding: 48px 16px !important;
}
.prize-cell, .winners-table td:first-child { font-variant-numeric: tabular-nums; }
.badge-draw, .badge-instant {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--bright);
}
.badge-instant { background: #333; }
.prize-cell { color: var(--green) !important; }
.tx-link { color: var(--muted); text-decoration: none; }
.tx-link:hover { color: var(--white); }

/* ============ BUY ============ */
.ca-box {
  width: min(791px, 100%);
  background: var(--panel-2);
  border-radius: 8px;
  margin-top: 74px;
  padding: 8px 8px 8px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ca-text {
  font-family: var(--font-label);
  font-size: 20px;
  color: var(--bright);
  word-break: break-all;
  text-align: left;
}
.ca-text code { font-family: var(--font-mono); font-size: 16px; color: var(--white); }
.btn-copy { height: 56px; padding: 0 28px; }
.buy-actions {
  display: flex;
  gap: 42px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.buy-actions .btn { min-width: 235px; }
.section-buy .section-foot { margin-top: 48px; margin-bottom: 0; }

/* ============ FAQ ============ */
.faq-list { width: min(816px, 100%); margin-top: 96px; }
.faq-item {
  background: var(--panel);
  border-radius: 20px;
  margin-bottom: 16px;
  text-align: left;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 26px 70px 26px 28px;
  font-family: var(--font-label);
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  padding: 0 28px 30px;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}
.faq-item p a { color: var(--bright); }
.faq-item p strong { color: var(--bright); font-weight: 500; }

/* ============ FOOTER ============ */
.footer {
  padding: 64px 48px 48px;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-links a {
  font-family: var(--font-label);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--white); }
.footer-legal {
  max-width: 760px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.7;
  color: #5c5c5c;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .hcard-solid { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 900px) {
  .hero { padding: 24px 24px 48px; }
  .section { padding: 96px 24px; }
  .hero-top { flex-direction: column-reverse; margin-top: 40px; }
  .hero-art { width: 100%; }
  .hero-cards { grid-template-columns: 1fr; margin-top: 56px; }
  .hcard { min-height: 0; padding-bottom: 32px; }
  .last-digits-box { margin: 36px auto 28px; }
  .countdown { margin-bottom: 36px; }
  .hcard-note { margin-top: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .tr-stats { grid-template-columns: 1fr 1fr; }
  .fee-bar { flex-direction: column; }
  .fee-seg { width: 100% !important; }
  .dm-slots { gap: 12px; }
  .dm-slot { width: 72px; height: 72px; background-size: 72px 72px; font-size: 28px; }
  .section-foot { margin-top: 56px; }

  .nav-burger { display: block; }
  .nav-links { display: none; }
  .nav.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-1);
    border: 1px solid var(--line);
    z-index: 20;
  }
  .nav.nav-open .nav-pill { border: 0; border-bottom: 1px solid #333; height: 52px; margin: 0; }
}
