:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --gold-primary: #d4af37;
  --gold-light: #fef0c7;
  --border-light: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 48px rgba(212, 175, 55, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.hero-screen {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  background: radial-gradient(circle at top, #ffffff 0%, #f1f5f9 100%);
  overflow: hidden;
}

.top-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  z-index: 10;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--glass-bg);
  padding: 4px 8px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.lang-switch .active {
  color: var(--text-main);
  font-weight: 800;
}

.connect-btn {
  background: var(--text-main);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.connect-btn:active { transform: scale(0.96); }

.nft-showcase {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px 20px;
}

.nft-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 100%;
  max-height: 420px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.glow-bg {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 60%);
  z-index: -1;
  opacity: 0.7;
  filter: blur(24px);
}

.nft-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.glass-promo {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.promo-icon {
  font-size: 24px;
  background: linear-gradient(135deg, #fff, var(--gold-light));
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.promo-text strong {
  font-size: 14px;
  color: var(--gold-primary);
}

.promo-text span {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.3;
}

.sale-status {
  margin-bottom: 20px;
}

.status-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}

.countdown-box span, .sold-box span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.timer-num {
  font-size: 14px;
  font-weight: 800;
  color: #ef4444; 
  font-family: monospace;
}

.sold-num {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.sold-num strong {
  color: var(--text-main);
  font-size: 16px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), #eab308);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

.purchase-deck {
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  padding: 24px 24px 36px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.04);
  z-index: 10;
  border-top: 1px solid var(--border-light);
}

.deck-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.price-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.limit-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-primary);
  background: var(--gold-light);
  padding: 6px 12px;
  border-radius: 99px;
}

.buy-controls {
  display: flex;
  gap: 16px;
}

.qty-selector {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  height: 56px;
  width: 130px;
  flex-shrink: 0;
}

.qty-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-main);
  cursor: pointer;
}

.qty-input {
  width: 36px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  pointer-events: none;
}

.buy-btn {
  flex: 1;
  height: 56px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-primary), #eab308);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buy-btn:active { transform: scale(0.98); }
.buy-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.summary-box {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #475569;
  flex-wrap: wrap;
}

.summary-item strong {
  color: var(--text-main);
}

.message-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.message-box.error {
  background-color: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}
.message-box.success {
  background-color: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
}

.details-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.highlight-card {
  border-color: rgba(212, 175, 55, 0.3);
  background: linear-gradient(180deg, #ffffff, #fffcf5);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.detail-card h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.detail-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.perk-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.perk-item {
  background: var(--bg-primary);
  padding: 16px;
  border-radius: 14px;
  border-left: 4px solid var(--gold-primary);
}

.perk-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-main);
}

.perk-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- 支付成功弹窗样式 --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 90%;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border-light);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-nft-img {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--gold-light);
}

.modal-header h3 {
  color: var(--text-main);
  margin-bottom: 20px;
  font-size: 22px;
}

.modal-highlight-text {
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}

.modal-tx-text {
  color: var(--text-muted);
  font-size: 12px;
  word-break: break-all;
  margin-bottom: 24px;
  line-height: 1.5;
  background: var(--bg-primary);
  padding: 8px 12px;
  border-radius: 8px;
}

.tx-hash {
  color: var(--text-main);
  font-family: monospace;
  font-weight: 600;
}

.modal-btn {
  width: 100%;
  padding: 14px;
  background: var(--text-main);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s;
}
.modal-btn:active { transform: scale(0.96); }

/* 加载动画 (Spinner) */
.loading-spinner {
  display: inline-block;
  width: 18px; 
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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