* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
  color: #0f172a;
}

.page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 20px 144px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 48%, #06b6d4 100%);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 220px;
  height: 220px;
  border: 38px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -90px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(24px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  outline: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-row span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.main {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: -96px auto 0;
  padding: 0 16px;
}

.coupon-card,
.rules-card {
  background: #fff;
}

.coupon-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 24px;
  box-shadow: 0 24px 70px -24px rgba(15, 55, 130, 0.38);
}

.coupon-card::before,
.coupon-card::after {
  content: "";
  position: absolute;
  top: 118px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f5f7fb;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.coupon-card::before {
  left: -12px;
}

.coupon-card::after {
  right: -12px;
}

.coupon-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px dashed #e2e8f0;
}

.amount-block {
  color: #2563eb;
}

.currency {
  font-size: 22px;
  font-weight: 700;
}

.amount {
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
}

.coupon-label {
  margin: 8px 0 0;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

.ticket-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
}

.coupon-meta {
  display: grid;
  gap: 16px;
  padding: 28px 0;
  color: #475569;
  font-size: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-item svg {
  flex: 0 0 auto;
  color: #3b82f6;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: hsl(215 90% 50%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(13, 110, 253, 0.55);
  transition: background 0.15s ease, transform 0.12s ease;
}

.primary-btn:hover {
  background: hsl(215 90% 45%);
}

.primary-btn:active {
  transform: translateY(1px);
}

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

.claim-btn svg {
  margin-right: 8px;
}

.green-btn {
  background: #059669;
  box-shadow: 0 12px 24px -14px rgba(5, 150, 105, 0.7);
}

.green-btn:hover {
  background: #047857;
}

.success-panel {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  padding: 20px;
  border: 1px solid rgba(167, 243, 208, 0.8);
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #fff, #ecfeff);
  box-shadow: 0 12px 30px -18px rgba(5, 150, 105, 0.55);
}

.success-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(5, 150, 105, 0.45);
}

.success-body {
  min-width: 0;
  padding-top: 2px;
}

.success-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.success-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.sparkles {
  color: #f59e0b;
}

.success-desc {
  margin: 4px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.success-actions {
  position: relative;
  margin-top: 16px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.copy-row svg {
  flex: 0 0 auto;
  color: #047857;
}

.login-url {
  flex: 1;
  min-width: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #059669;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.copy-btn:hover {
  background: #047857;
}

.rules-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 16px;
}

.rules-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.rules-card ol {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.rules-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

.footer-note {
  margin: 28px 0 0;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}

.dialog-card {
  width: calc(100% - 32px);
  max-width: 340px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px -30px rgba(15, 23, 42, 0.55);
}

.dialog-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
}

.phone-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
}

.phone-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
}

.claim-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

.claim-error svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.dialog-submit {
  min-height: 40px;
  margin-top: 16px;
  border-radius: 8px;
  font-size: 14px;
}

@media (min-width: 768px) {
  .hero {
    padding: 56px 20px 176px;
  }

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

  .main {
    margin-top: -128px;
  }

  .coupon-card {
    padding: 36px;
  }

  .amount {
    font-size: 60px;
  }

  .rules-card {
    padding: 28px;
  }

  .dialog-card {
    max-width: 400px;
    padding: 24px;
  }
}

@media (max-width: 374px) {
  .amount {
    font-size: 48px;
  }

  .coupon-card {
    padding: 20px 16px;
  }
}
