:root {
  color-scheme: dark;
  --bg: #12151b;
  --panel: #20252d;
  --panel-deep: #171b21;
  --panel-soft: #2a303a;
  --line: rgba(255, 255, 255, 0.13);
  --muted: #b8c0cc;
  --text: #ffffff;
  --gold: #ffd36b;
  --gold-strong: #f5b43a;
  --gold-deep: #805f1d;
  --green: #52ff9d;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 211, 107, 0.24), transparent 25rem),
    radial-gradient(circle at 16% 78%, rgba(82, 255, 157, 0.08), transparent 20rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%) 0 0 / 32px 32px,
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 34px 18px 22px;
  overflow: hidden;
  position: relative;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: rotate(16deg);
  pointer-events: none;
}

.page-shell::before {
  top: -8rem;
  left: -6rem;
}

.page-shell::after {
  right: -8rem;
  bottom: -7rem;
}

.redeem-card {
  width: 100%;
  max-width: 850px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 28%),
    var(--panel);
  box-shadow: 0 28px 90px var(--shadow);
  overflow: hidden;
}

.card-top {
  min-height: 64px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 21, 27, 0.34);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(82, 255, 157, 0.8);
}

.card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.close-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.reward-stage {
  min-height: 188px;
  display: grid;
  place-items: center;
  position: relative;
}

.reward-stage::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 211, 107, 0.38), transparent 65%);
  filter: blur(8px);
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 211, 107, 0.48);
  transform: rotate(28deg);
}

.particle-a {
  top: 36%;
  left: 28%;
}

.particle-b {
  top: 62%;
  left: 36%;
  width: 5px;
  height: 5px;
}

.particle-c {
  top: 31%;
  right: 29%;
  width: 6px;
  height: 6px;
}

.particle-d {
  top: 61%;
  right: 35%;
}

.coin {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(145deg, #ffeaa2, #be8830);
  box-shadow:
    0 0 0 8px rgba(255, 211, 107, 0.08),
    0 0 46px rgba(255, 211, 107, 0.78);
  clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%);
  position: relative;
}

.coin-inner {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d8a542, #ffd883);
  clip-path: inherit;
}

.coin-inner span,
.coin-inner span::before {
  display: block;
  width: 36px;
  height: 10px;
  border-radius: 2px;
  background: rgba(101, 76, 27, 0.58);
  content: "";
}

.coin-inner span::before {
  transform: rotate(90deg);
}

.headline-group {
  padding: 0 44px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.55rem, 4.2vw, 2.2rem);
  font-weight: 900;
}

h1 {
  max-width: 730px;
  margin: 0 auto;
  font-size: clamp(2rem, 6.4vw, 3.8rem);
  line-height: 1.03;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 strong {
  color: var(--gold);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 22px;
  padding: 0 24px;
  border: 1px solid rgba(255, 211, 107, 0.4);
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.2);
  color: #ffe7a5;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary {
  max-width: 690px;
  margin: 22px auto 0;
  color: #eef3fb;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 32px;
  padding: 36px 64px 30px;
}

.benefit {
  min-height: 42px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.benefit-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 7px;
  color: #fff;
}

.benefit-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.redeem-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin: 0 44px 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.12), rgba(255, 255, 255, 0.035));
}

.username-field label,
.redeem-note {
  margin: 0;
}

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

.username-field label {
  font-size: 1.1rem;
  font-weight: 900;
}

.username-field input {
  width: min(100%, 360px);
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 21, 27, 0.68);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  outline: 0;
  padding: 0 14px;
}

.username-field input::placeholder {
  color: rgba(232, 238, 248, 0.5);
}

.username-field input:focus {
  border-color: rgba(255, 211, 107, 0.86);
  box-shadow: 0 0 0 4px rgba(255, 211, 107, 0.14);
}

.redeem-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.redeem-button {
  min-width: 210px;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--gold), var(--gold-strong));
  color: #17120a;
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow: 0 13px 34px rgba(245, 180, 58, 0.28);
}

.redeem-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(245, 180, 58, 0.36);
}

.redeem-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.redeem-button:active {
  transform: translateY(1px);
}

.redeem-button:focus-visible,
.close-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.terms {
  margin: 0;
  padding: 0 36px 34px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
  text-align: center;
}

.site-footer {
  width: 100%;
  max-width: 850px;
  color: #c8d0db;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 720px) {
  .page-shell {
    justify-content: flex-start;
    padding: 14px 12px 18px;
  }

  .redeem-card {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-height: auto;
  }

  .site-footer {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .card-top {
    min-height: 44px;
    padding: 0 14px;
  }

  .reward-stage {
    min-height: 86px;
  }

  .coin {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .coin-inner {
    width: 44px;
    height: 44px;
  }

  .coin-inner span,
  .coin-inner span::before {
    width: 21px;
    height: 6px;
  }

  .headline-group {
    padding: 0 16px;
  }

  h1 {
    font-size: 1.66rem;
  }

  h1 strong {
    display: block;
  }

  .summary {
    margin-top: 14px;
    max-width: 310px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 22px 14px;
  }

  .benefit {
    min-height: 29px;
    gap: 9px;
    font-size: 0.83rem;
  }

  .benefit-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .redeem-panel {
    grid-template-columns: 1fr;
    margin: 0 14px 14px;
    padding: 14px;
    gap: 12px;
  }

  .redeem-button {
    width: 100%;
    min-height: 54px;
    min-width: 0;
  }

  .terms {
    padding: 0 18px 24px;
  }
}

@media (max-width: 390px) {
  .card-top p {
    font-size: 0.72rem;
  }

  .close-button {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: 1.86rem;
  }
}
