* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
  background: #0a1628;
  color: #fff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.screen.active {
  display: flex;
}

.screen.hidden {
  display: none !important;
}

.screen-bg {
  position: fixed;
  inset: 0;
  max-width: 420px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 180, 80, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255, 200, 0, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0d1f3c 0%, #0a1628 40%, #060e1a 100%);
  z-index: 0;
}

.screen-body {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 20px 20px 0;
}

.screen-body.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.screen-footer {
  position: relative;
  z-index: 1;
  padding: 16px 20px 28px;
  text-align: center;
  width: 100%;
}

/* ── Landing ── */
.title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.title-row .promo-title {
  margin-bottom: 0;
}

.badges {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 200, 80, 0.15);
  border: 1px solid rgba(0, 200, 80, 0.4);
  color: #4ade80;
}

.promo-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.promo-sub {
  font-size: 14px;
  color: #8899aa;
  margin-bottom: 28px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 200, 80, 0.25);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}

.stat-num {
  font-size: 16px;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: #667788;
}

.tip-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 200, 0, 0.08);
  border: 1px solid rgba(255, 200, 0, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: #ccaa44;
  line-height: 1.5;
}

.tip-icon {
  flex-shrink: 0;
}

/* ── Access page ── */
.btn-back {
  background: none;
  border: none;
  color: #8899aa;
  font-size: 14px;
  cursor: pointer;
  padding: 0 0 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-sub {
  font-size: 13px;
  color: #8899aa;
  margin-bottom: 24px;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.bind-status-icon,
.phone-status-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-status-icon .bind-spinner {
  width: 28px;
  height: 28px;
  border-width: 2px;
}

.pending-icon {
  color: #667788;
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.check-item.bind-loading,
.check-item.bind-success {
  border-color: rgba(0, 200, 80, 0.6);
  background: rgba(0, 200, 80, 0.1);
}

.hidden {
  display: none !important;
}

.check-item-with-btn {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

#item-bind,
#item-phone {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#item-bind .check-item-header {
  justify-content: center;
  width: 100%;
}

#item-bind .check-text,
#item-bind .check-label,
#item-bind .btn-cta-in-card {
  width: 100%;
  text-align: center;
}

.check-item-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-cta-in-card {
  margin-top: 2px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.phone-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

#item-phone .phone-panel {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#item-phone .check-text,
#item-phone .check-label,
#item-phone .check-desc,
#item-phone .phone-value {
  width: 100%;
  text-align: center;
}

.phone-panel.hidden {
  display: none;
}

.bind-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(74, 222, 128, 0.2);
  border-top-color: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#phone-mask {
  margin-top: 4px;
  font-size: 13px;
  text-align: center;
  width: 100%;
}

#phone-status-desc .countdown-num {
  font-size: inherit;
  font-weight: 700;
  color: #4ade80;
}

.check-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.done-icon {
  background: #16a34a;
  font-size: 14px;
  font-weight: 700;
}

.check-text {
  flex: 1;
}

.check-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.check-desc {
  font-size: 12px;
  color: #667788;
}

.check-item.done {
  border-color: rgba(0, 200, 80, 0.4);
  background: rgba(0, 200, 80, 0.06);
}

.check-item.active,
.check-item.loading,
.check-item.success,
.check-item.pending {
  border-color: rgba(0, 200, 80, 0.6);
  background: rgba(0, 200, 80, 0.1);
}

.check-status {
  color: #4ade80;
  font-size: 16px;
  font-weight: 700;
}

.privacy {
  font-size: 11px;
  color: #556677;
  text-align: center;
}

/* ── Verify ── */
.verify-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
}

.phone-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-label {
  font-size: 13px;
  color: #8899aa;
}

.phone-value {
  font-size: 15px;
  font-weight: 600;
  color: #4ade80;
}

.code-input {
  width: 100%;
  padding: 16px;
  font-size: 22px;
  letter-spacing: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  outline: none;
}

.code-input:focus {
  border-color: #4ade80;
}

.code-input::placeholder {
  font-size: 14px;
  letter-spacing: 0;
  color: #445566;
}

.error-msg {
  font-size: 13px;
  color: #f87171;
  text-align: center;
  margin-top: 10px;
}

/* ── CTA Button ── */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
  transition: opacity 0.2s, transform 0.1s;
}

.btn-cta:active {
  transform: scale(0.98);
}

.btn-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 18px;
}

.bot-handle {
  text-align: center;
  font-size: 12px;
  color: #445566;
  margin-top: 12px;
}

/* ── Success ── */
.success-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.countdown-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 15px;
}

.countdown-num {
  font-size: 28px;
  font-weight: 700;
  color: #22c55e;
  min-width: 1.2em;
  text-align: center;
}

.countdown-text {
  opacity: 0.85;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 90%;
  z-index: 9999;
  text-align: center;
}

.toast.ok {
  background: rgba(22, 163, 74, 0.95);
}
