*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold-50: #fff9e6;
  --gold-100: #ffe9a3;
  --gold-200: #ffd54f;
  --gold-300: #f5c518;
  --gold-400: #d4a017;
  --gold-500: #b8860b;
  --gold-600: #9a7209;
  --gold-glow: rgba(212, 160, 23, 0.35);
  --bg-dark: #0a0a0f;
  --bg-card: #14141c;
  --bg-card-inner: #1a1a26;
  --border-gold: rgba(212, 160, 23, 0.25);
  --text-primary: #f5f0e1;
  --text-secondary: #a89f8a;
  --text-muted: #6b6355;
  --radius: 16px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Ambient gold glow */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.4;
}

.bg-glow--top {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--gold-500) 0%, transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
}

.bg-glow--bottom {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--gold-400) 0%, transparent 70%);
  bottom: -100px;
  right: -50px;
  opacity: 0.25;
}

.app {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Screens */
.screen {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.screen--active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card */
.card {
  background: linear-gradient(145deg, var(--bg-card) 0%, #111118 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow:
    0 0 0 1px rgba(212, 160, 23, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px var(--gold-glow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  opacity: 0.6;
}

/* Header */
.card__header {
  text-align: center;
  margin-bottom: 28px;
}

.shield-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--gold-300);
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.shield-icon svg {
  width: 100%;
  height: 100%;
}

.title {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Captcha box */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  user-select: none;
}

.captcha-box:hover {
  border-color: rgba(212, 160, 23, 0.45);
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.08);
}

.captcha-box__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.captcha-box__check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: #0e0e14;
}

.captcha-box__tick {
  width: 14px;
  height: 14px;
  color: var(--bg-dark);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.captcha-box__input:checked + .captcha-box__check {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-color: var(--gold-400);
  box-shadow: 0 0 12px var(--gold-glow);
}

.captcha-box__input:checked + .captcha-box__check .captcha-box__tick {
  opacity: 1;
  transform: scale(1);
}

.captcha-box__text {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.captcha-box__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  color: var(--gold-400);
  text-align: right;
  line-height: 1.3;
  opacity: 0.85;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn--primary {
  background: linear-gradient(135deg, #2a2a35 0%, #1e1e28 100%);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn--primary:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 50%, var(--gold-600) 100%);
  color: #1a1000;
  border-color: var(--gold-400);
  box-shadow:
    0 4px 20px rgba(212, 160, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 28px rgba(212, 160, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--primary:not(:disabled):active {
  transform: translateY(0);
}

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

.btn--cta {
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 50%, var(--gold-600) 100%);
  color: #1a1000;
  border: 1px solid var(--gold-400);
  box-shadow:
    0 4px 24px rgba(212, 160, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn--cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn--cta:hover::after {
  left: 100%;
}

.btn--cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(212, 160, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--cta:active {
  transform: translateY(0);
}

.btn--loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn--loading::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 16, 0, 0.3);
  border-top-color: #1a1000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* Loading screen */
.card--loading {
  text-align: center;
  padding: 48px 28px;
}

.spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(212, 160, 23, 0.15);
  border-top-color: var(--gold-300);
  border-right-color: var(--gold-500);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 20px var(--gold-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--gold-400);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Reward screen */
.card--reward {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.badge--success {
  background: rgba(212, 160, 23, 0.12);
  border: 1px solid rgba(212, 160, 23, 0.4);
  color: var(--gold-200);
}

.reward-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--gold-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.reward-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

.offer-box {
  border: 2px dashed rgba(212, 160, 23, 0.45);
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 28px;
  background: linear-gradient(180deg, rgba(212, 160, 23, 0.06) 0%, transparent 100%);
  position: relative;
}

.offer-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.1), transparent);
  z-index: -1;
}

.offer-box__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.offer-box__value {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-200) 0%, var(--gold-400) 50%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(212, 160, 23, 0.4));
  margin-bottom: 8px;
}

.offer-box__limit {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 380px) {
  .card {
    padding: 24px 20px;
  }

  .offer-box__value {
    font-size: 2.5rem;
  }

  .reward-title {
    font-size: 1.35rem;
  }
}
