:root {
  --berry-950: #3b0923;
  --berry-900: #57102f;
  --berry-800: #75153b;
  --berry-700: #9d1e48;
  --coral-600: #eb4f4c;
  --coral-500: #ff6a57;
  --gold-500: #f6b93b;
  --gold-300: #ffd976;
  --cream-50: #fffaf0;
  --cream-100: #fff3dd;
  --ink: #2c1821;
  --muted: #765d68;
  --white: #fff;
  --success: #167d54;
  --shadow: 0 24px 70px rgba(63, 8, 34, 0.24);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  color-scheme: light;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "PingFang SC",
    "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--berry-950);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream-50);
  background:
    radial-gradient(circle at 10% 5%, rgba(255, 217, 118, 0.2), transparent 25rem),
    radial-gradient(circle at 90% 20%, rgba(255, 106, 87, 0.28), transparent 28rem),
    linear-gradient(150deg, #400922 0%, #7b1539 48%, #ea4c49 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

.ambient-orb {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.ambient-orb::before,
.ambient-orb::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  inset: 3.5rem;
}

.ambient-orb::after {
  inset: 7rem;
}

.ambient-orb--one {
  top: -15rem;
  right: -12rem;
}

.ambient-orb--two {
  bottom: -20rem;
  left: -16rem;
}

.site-header,
.page-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--berry-900);
  background: linear-gradient(145deg, #ffe899, var(--gold-500));
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(246, 185, 59, 0.25);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.text-button {
  padding: 10px 13px;
  color: rgba(255, 250, 240, 0.78);
  cursor: pointer;
  background: transparent;
  border-radius: 999px;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
  width: min(1080px, calc(100% - 40px));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: 30px 0 60px;
}

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

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  margin: 0 0 22px;
  color: #ffe79a;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  background: rgba(74, 8, 35, 0.28);
  border: 1px solid rgba(255, 225, 139, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  background: var(--gold-300);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 217, 118, 0.12);
}

h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(3rem, 5.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.highlight {
  display: block;
  color: #ffe69a;
  text-shadow: 0 12px 35px rgba(40, 1, 20, 0.22);
}

.hero-copy__lead {
  max-width: 430px;
  margin: 28px 0 22px;
  color: rgba(255, 250, 240, 0.8);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
}

.hero-copy__lead strong {
  color: var(--white);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 9px 12px;
  color: rgba(255, 250, 240, 0.84);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.lottery-stage {
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
}

.lottery-stage::before {
  position: absolute;
  z-index: -1;
  content: "";
  background: rgba(59, 9, 35, 0.38);
  filter: blur(30px);
  border-radius: 50%;
  inset: 11% -4% -7%;
}

.lottery-card {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 4vw, 30px);
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.75), transparent 50%),
    var(--cream-100);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.lottery-card::after {
  position: absolute;
  top: -5rem;
  right: -3rem;
  width: 11rem;
  height: 11rem;
  content: "";
  background: rgba(246, 185, 59, 0.14);
  border-radius: 50%;
}

.lottery-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.lottery-card__label {
  margin: 0 0 3px;
  color: var(--berry-800);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.lottery-card__title {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  letter-spacing: -0.04em;
}

.chance-pill {
  min-width: 78px;
  padding: 9px 12px;
  color: var(--berry-800);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  background: #fff6d8;
  border: 1px solid rgba(246, 185, 59, 0.32);
  border-radius: 14px;
}

.chance-pill strong {
  display: block;
  font-size: 1.1rem;
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 2vw, 12px);
  padding: clamp(9px, 2.5vw, 14px);
  background: linear-gradient(145deg, #9c1b43, #eb4f4c);
  border: 5px solid #ffcf68;
  border-radius: 27px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.24),
    0 16px 38px rgba(116, 20, 58, 0.24);
}

.my-prize-entry {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  margin-top: 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #fffdf7, #ffe9c2);
  border: 1px solid rgba(246, 185, 59, 0.5);
  border-radius: 17px;
  box-shadow: 0 9px 22px rgba(116, 20, 58, 0.1);
}

.my-prize-entry[hidden] {
  display: none !important;
}

.my-prize-entry__icon {
  display: grid;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
  background: #fff3cf;
  border-radius: 13px;
  place-items: center;
}

.my-prize-entry__copy {
  min-width: 0;
}

.my-prize-entry__eyebrow,
.my-prize-entry__status {
  display: block;
  color: var(--berry-700);
  font-size: 0.62rem;
  font-weight: 850;
}

.my-prize-entry__copy strong {
  display: block;
  overflow: hidden;
  margin: 2px 0;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-prize-entry__status {
  color: var(--muted);
  font-weight: 700;
}

.my-prize-entry__action {
  color: var(--berry-700);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.prize-item,
.draw-button {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: clamp(14px, 3vw, 21px);
}

.prize-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 211, 0.86));
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 -5px 12px rgba(229, 179, 77, 0.12),
    0 7px 15px rgba(60, 7, 31, 0.15);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.prize-item::after {
  position: absolute;
  content: "";
  border: 2px solid transparent;
  border-radius: inherit;
  inset: 0;
  pointer-events: none;
}

.prize-item.is-active {
  z-index: 2;
  filter: brightness(1.07);
  transform: scale(1.055);
  box-shadow:
    0 0 0 4px #fff4b3,
    0 0 0 8px rgba(255, 207, 104, 0.68),
    0 10px 20px rgba(62, 7, 31, 0.27);
}

.prize-item.is-winner {
  animation: winnerPulse 650ms ease 2;
}

.prize-item__icon {
  display: grid;
  width: clamp(36px, 9vw, 52px);
  height: clamp(36px, 9vw, 52px);
  margin-bottom: 4px;
  place-items: center;
  font-size: clamp(1.6rem, 6vw, 2.45rem);
  background: linear-gradient(145deg, #fff8e7, #ffe4ae);
  border-radius: 16px;
}

.prize-item__name {
  display: -webkit-box;
  overflow: hidden;
  color: #5e2a3e;
  font-size: clamp(0.66rem, 2.2vw, 0.82rem);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.prize-item__tag {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 3px 5px;
  color: #9a1d44;
  font-size: 0.52rem;
  font-weight: 900;
  background: #ffe69e;
  border-radius: 999px;
}

.draw-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  background:
    radial-gradient(circle at 35% 25%, #ff8b68, transparent 38%),
    linear-gradient(145deg, #ed4b49, #9a1742);
  border: 3px solid #ffe286;
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.12),
    0 9px 0 #721438,
    0 14px 24px rgba(74, 6, 34, 0.3);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.draw-button:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.14),
    0 11px 0 #721438,
    0 16px 25px rgba(74, 6, 34, 0.3);
}

.draw-button:active {
  transform: translateY(5px);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.14),
    0 4px 0 #721438,
    0 8px 16px rgba(74, 6, 34, 0.25);
}

.draw-button:focus-visible {
  outline: 4px solid rgba(255, 232, 153, 0.72);
  outline-offset: 3px;
}

.draw-button:disabled {
  cursor: wait;
  filter: saturate(0.65);
}

.draw-button__small {
  font-size: clamp(0.58rem, 1.8vw, 0.72rem);
  font-weight: 800;
  opacity: 0.8;
}

.draw-button__main {
  margin: 2px 0;
  font-size: clamp(1.25rem, 4.2vw, 1.75rem);
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.draw-button__price {
  color: #ffe69a;
  font-size: clamp(0.58rem, 1.8vw, 0.7rem);
  font-weight: 900;
}

.disclosure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 4px 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.disclosure__icon {
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--berry-700);
  font-size: 0.68rem;
  font-weight: 900;
  border: 1px solid rgba(157, 30, 72, 0.24);
  border-radius: 50%;
}

.site-footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 24px;
  color: rgba(255, 250, 240, 0.5);
  font-size: 0.72rem;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  display: grid;
  padding: 18px;
  overflow-y: auto;
  visibility: hidden;
  background: rgba(36, 3, 20, 0.68);
  opacity: 0;
  backdrop-filter: blur(12px);
  place-items: center;
  inset: 0;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.modal-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.modal {
  position: relative;
  width: min(100%, 470px);
  max-height: calc(100vh - 36px);
  padding: clamp(23px, 5vw, 36px);
  overflow-y: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, #fff0b8, transparent 55%),
    var(--cream-50);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(38, 2, 21, 0.42);
  transform: translateY(18px) scale(0.97);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  color: #745865;
  cursor: pointer;
  background: rgba(116, 88, 101, 0.08);
  border-radius: 50%;
  place-items: center;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--ink);
  background: rgba(116, 88, 101, 0.14);
  outline: none;
}

.winner-art {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  place-items: center;
  font-size: 3.8rem;
  background: linear-gradient(145deg, #fff8da, #ffd67a);
  border: 3px solid var(--white);
  border-radius: 29px;
  box-shadow:
    0 14px 30px rgba(193, 112, 31, 0.2),
    0 0 0 7px rgba(255, 215, 118, 0.21);
  animation: giftBounce 900ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.modal__kicker {
  margin: 0 0 5px;
  color: var(--berry-700);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-align: center;
}

.modal__title {
  margin: 0;
  font-size: clamp(1.55rem, 6vw, 2.15rem);
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.04em;
}

.modal__subtitle {
  margin: 10px auto 20px;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.fee-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  margin: 18px 0;
  background: var(--white);
  border: 1px solid #f0e1cd;
  border-radius: var(--radius-md);
}

.fee-box__label {
  color: var(--muted);
  font-size: 0.8rem;
}

.fee-box__amount {
  color: var(--berry-800);
  font-size: 1.5rem;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.form-grid {
  display: grid;
  gap: 13px;
  margin: 18px 0;
}

.form-grid--two {
  grid-template-columns: 1fr 1fr;
}

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

.field label {
  color: #60444f;
  font-size: 0.74rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #e7d4c0;
  border-radius: 13px;
  outline: none;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--berry-700);
  box-shadow: 0 0 0 3px rgba(157, 30, 72, 0.1);
}

.payment-methods {
  display: grid;
  gap: 9px;
  margin: 17px 0;
}

.payment-option {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px;
  cursor: pointer;
  background: var(--white);
  border: 1px solid #eadac7;
  border-radius: 15px;
}

.payment-option:has(input:checked) {
  border-color: var(--berry-700);
  box-shadow: 0 0 0 3px rgba(157, 30, 72, 0.09);
}

.payment-option input {
  accent-color: var(--berry-700);
}

.payment-option__copy {
  flex: 1;
}

.payment-option__copy strong {
  display: block;
  font-size: 0.85rem;
}

.payment-option__copy span {
  color: var(--muted);
  font-size: 0.7rem;
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 14px 18px;
  font-weight: 900;
  cursor: pointer;
  border-radius: 15px;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--coral-500), var(--berry-700));
  box-shadow: 0 10px 24px rgba(157, 30, 72, 0.22);
}

.primary-button:hover {
  filter: brightness(1.04);
}

.primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.5);
  opacity: 0.7;
}

.secondary-button {
  margin-top: 8px;
  color: var(--muted);
  background: transparent;
}

.secondary-button:hover {
  color: var(--ink);
  background: rgba(116, 88, 101, 0.06);
}

.status-panel {
  padding: 16px;
  margin: 18px 0;
  color: #375f4f;
  background: #eef9f3;
  border: 1px solid #cde9da;
  border-radius: var(--radius-md);
}

.status-panel strong {
  display: block;
  margin-bottom: 4px;
}

.payment-qr {
  display: grid;
  gap: 9px;
  margin: 16px 0;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.payment-qr img {
  width: min(210px, 72%);
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--white);
  border: 10px solid var(--white);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(62, 31, 44, 0.12);
}

.virtual-code {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  margin-top: 11px;
  background: var(--white);
  border: 1px dashed #81b89f;
  border-radius: 12px;
}

.virtual-code code {
  flex: 1;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.mini-button {
  padding: 7px 10px;
  color: var(--success);
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
  background: #e4f5ec;
  border-radius: 9px;
}

.fine-print {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 90;
  bottom: 24px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(45, 15, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(30, 3, 16, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti-layer {
  position: fixed;
  z-index: 70;
  overflow: hidden;
  pointer-events: none;
  inset: 0;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  animation: confettiFall 1900ms linear forwards;
}

.skeleton {
  color: transparent !important;
  background: linear-gradient(90deg, #fff0d4 25%, #fff8e8 50%, #fff0d4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.rules-content {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.72;
}

.rules-content h3 {
  margin: 20px 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.rules-content ol {
  padding-left: 20px;
}

@keyframes winnerPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1) rotate(-1deg);
  }
}

@keyframes giftBounce {
  0% {
    opacity: 0;
    transform: translateY(25px) scale(0.65) rotate(-8deg);
  }
  75% {
    transform: translateY(-5px) scale(1.06) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin));
  }
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

@media (max-width: 820px) {
  .site-header {
    width: min(100% - 28px, 570px);
    padding: 18px 0 4px;
  }

  .header-actions .text-button:first-child {
    display: none;
  }

  .page-shell {
    display: flex;
    flex-direction: column;
    gap: 26px;
    width: min(100% - 24px, 570px);
    min-height: 0;
    padding: 28px 0 45px;
  }

  .hero-copy {
    text-align: center;
  }

  .eyebrow {
    margin-bottom: 16px;
  }

  h1 {
    font-size: clamp(2.65rem, 13vw, 4.3rem);
  }

  .hero-copy__lead {
    margin: 18px auto;
    font-size: 0.93rem;
  }

  .trust-row {
    justify-content: center;
  }

  .lottery-stage {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .site-header {
    width: calc(100% - 24px);
  }

  .brand {
    font-size: 0.72rem;
  }

  .page-shell {
    width: calc(100% - 16px);
    padding-top: 22px;
  }

  .lottery-card {
    padding: 14px;
    border-radius: 26px;
  }

  .lottery-card__top {
    padding: 2px 3px;
  }

  .prize-grid {
    gap: 7px;
    padding: 8px;
    border-width: 4px;
    border-radius: 23px;
  }

  .prize-item,
  .draw-button {
    border-radius: 14px;
  }

  .form-grid--two {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
