:root {
  color-scheme: light;
  --ink: #21171a;
  --muted: #6f6265;
  --paper: #fff9f0;
  --surface: #ffffff;
  --line: #ead8bf;
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --gold: #d9961a;
  --teal: #0f766e;
  --shadow: 0 24px 70px rgba(91, 31, 31, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.92), rgba(127, 29, 29, 0.86)),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255, 255, 255, 0.07) 44px 45px),
    var(--paper);
}

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  color: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #ffffff;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.lottery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: 36px;
  min-height: calc(100vh - 130px);
  padding: 42px 0;
}

.hero-copy {
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 236, 196, 0.36);
  border-radius: 999px;
  color: #ffe7b0;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: 78px;
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  max-width: 600px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.prize-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
  margin-top: 34px;
}

.prize-cell {
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(255, 236, 196, 0.28);
  border-radius: 8px;
  color: #fff7e8;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.prize-cell.main {
  border-color: rgba(255, 226, 155, 0.58);
  background: rgba(217, 150, 26, 0.24);
}

.prize-cell strong,
.prize-cell span {
  display: block;
}

.prize-cell strong {
  font-size: 22px;
}

.prize-cell span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
}

.draw-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 249, 240, 0.96);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
}

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

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 150, 26, 0.18);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 2px;
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition:
    transform 140ms ease,
    opacity 140ms ease,
    box-shadow 140ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--gold));
  box-shadow: 0 16px 34px rgba(185, 28, 28, 0.28);
}

.btn.secondary {
  color: var(--red-dark);
  background: #fff1d6;
}

.result-panel {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.result-panel.success {
  border-color: rgba(15, 118, 110, 0.36);
  background: #f0fdfa;
}

.result-panel.error {
  border-color: rgba(185, 28, 28, 0.32);
  background: #fff1f2;
}

.result-title {
  font-size: 17px;
  font-weight: 900;
}

.result-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .lottery-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    min-height: auto;
    padding: 28px 0 38px;
  }

  h1 {
    font-size: 56px;
  }

  .prize-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 16px;
  }

  .topbar {
    min-height: 48px;
  }

  .badge {
    display: none;
  }

  .summary {
    font-size: 16px;
  }

  h1 {
    font-size: 42px;
  }

  .prize-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .prize-cell {
    min-height: 78px;
    padding: 14px;
  }

  .prize-cell strong {
    font-size: 18px;
  }

  .draw-panel {
    padding: 18px;
  }

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