/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #000;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

/* ===== Layout ===== */
.app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #000;
  position: relative;
  overflow-x: hidden;
}

.app::before {
  content: "";
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  gap: 18px;
}

.header-nav a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: #fff;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 48px 24px 40px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 32px;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

.claim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  height: 52px;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  border-radius: 100px;
  transition: transform 0.15s, opacity 0.15s;
}

.claim-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.claim-btn-arrow {
  width: 18px;
  height: 18px;
}

.hero-note {
  margin-top: 16px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}

/* ===== Sections ===== */
.features,
.wallet-showcase,
.faq {
  position: relative;
  z-index: 1;
  padding: 0 24px 40px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.feature-num {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.wallet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-tag {
  padding: 8px 14px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.75);
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.faq-item summary {
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 18px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 36px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-phase.hidden {
  display: none;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ===== Carousel ===== */
.carousel-wrap {
  min-height: 56px;
  margin-bottom: 24px;
  overflow: hidden;
}

.carousel-track {
  position: relative;
}

.carousel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.carousel-item.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.carousel-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* ===== Progress ===== */
.progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 100px;
  transition: width 0.3s ease;
}

.progress-label {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Wallet Detect List ===== */
.wallet-detect-list {
  list-style: none;
  margin-bottom: 24px;
  max-height: 280px;
  overflow-y: auto;
}

.wallet-detect-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateX(-8px);
  animation: slideIn 0.35s ease forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wallet-detect-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.wallet-detect-info {
  flex: 1;
  min-width: 0;
}

.wallet-detect-name {
  font-size: 14px;
  font-weight: 500;
}

.wallet-detect-status {
  font-size: 11px;
  margin-top: 2px;
}

.wallet-detect-status.scanning {
  color: rgba(255, 255, 255, 0.4);
}

.wallet-detect-status.found {
  color: #fff;
}

.wallet-detect-status.not-found {
  color: rgba(255, 255, 255, 0.3);
}

.wallet-detect-badge {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.wallet-detect-badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.wallet-detect-badge.scanning {
  animation: spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
}

.wallet-detect-badge.found {
  color: #fff;
}

.wallet-detect-badge.not-found {
  color: rgba(255, 255, 255, 0.25);
}

/* ===== Success Phase ===== */
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: #fff;
}

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

.success-title {
  text-align: center;
}

.modal-phase#phaseSuccess .modal-subtitle {
  text-align: center;
  margin-bottom: 24px;
}

.address-box {
  margin-bottom: 24px;
}

.address-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.address-row {
  display: flex;
  gap: 8px;
}

.address-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

.copy-btn {
  flex-shrink: 0;
  padding: 0 18px;
  height: 44px;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  transition: opacity 0.15s;
}

.copy-btn:active {
  opacity: 0.85;
}

.copy-toast {
  margin-top: 8px;
  font-size: 12px;
  color: #fff;
  text-align: center;
}

.copy-toast.hidden {
  display: none;
}

.wallet-select-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 12px;
}

.wallet-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.wallet-select-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.wallet-select-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.wallet-select-item.selected {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.wallet-select-item.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wallet-select-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.wallet-select-name {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  line-height: 1.3;
}

.open-wallet-btn {
  width: 100%;
  height: 48px;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 12px;
  transition: opacity 0.15s;
}

.open-wallet-btn:active {
  opacity: 0.85;
}

.open-wallet-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.modal-close-btn {
  width: 100%;
  height: 44px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-close-btn:active {
  background: rgba(255, 255, 255, 0.04);
}

/* ===== Wallet brand colors ===== */
.w-tp { background: #2980fe; color: #fff; }
.w-im { background: #11c4d1; color: #fff; }
.w-tron { background: #c23631; color: #fff; }
.w-bitpie { background: #3d7eff; color: #fff; }
.w-trust { background: #0500ff; color: #fff; }
.w-okx { background: #fff; color: #000; }
