/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-2: linear-gradient(135deg, #06b6d4, #6366f1);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Particles Canvas ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Loader ===== */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  padding: 40px;
}

.loader-orbit {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.loader-ring-2 {
  inset: 10px;
  border-top-color: #8b5cf6;
  animation-duration: 0.8s;
  animation-direction: reverse;
}

.loader-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.loader-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.loader-progress {
  width: 240px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 12px;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-1);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loader-status {
  font-size: 13px;
  color: var(--text-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.modal-icon.success {
  background: var(--success-bg);
  color: var(--success);
}

.modal-icon.error {
  background: var(--error-bg);
  color: var(--error);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-message {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.safari-guide {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.safari-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.safari-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Facebook In-App Browser Overlay ===== */
.fb-browser-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}

.fb-browser-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: modalIn 0.35s ease;
}

.fb-browser-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.fb-browser-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.fb-browser-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.fb-browser-guide {
  text-align: left;
  margin-bottom: 20px;
}

.fb-browser-card .btn {
  margin-bottom: 10px;
}

.fb-browser-card .btn:last-of-type {
  margin-bottom: 0;
}

.fb-open-status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--warning);
  line-height: 1.5;
}

.fb-debug-info {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.4;
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 6px;
}

.fb-browser-card a.btn {
  display: flex;
  text-decoration: none;
  margin-bottom: 10px;
}

body.fb-browser-blocked {
  overflow: hidden;
}

body.fb-browser-blocked main,
body.fb-browser-blocked .header,
body.fb-browser-blocked .footer {
  pointer-events: none;
  user-select: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  width: 100%;
  margin-bottom: 12px;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
}

.logo-icon {
  color: var(--accent-light);
  font-size: 22px;
}

.logo-badge {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav a:hover {
  color: var(--text-primary);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.stat-dot.live {
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  backdrop-filter: blur(8px);
}

.hero-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 72px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Token Grid ===== */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.token-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.token-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--token-color, var(--gradient-1));
  opacity: 0;
  transition: var(--transition);
}

.token-card:hover,
.token-card.selected {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.token-card:hover::before,
.token-card.selected::before {
  opacity: 1;
}

.token-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.token-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.token-name {
  font-size: 18px;
  font-weight: 700;
}

.token-symbol {
  font-size: 13px;
  color: var(--text-muted);
}

.token-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.token-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.token-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--success);
}

.token-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  font-weight: 600;
}

.token-chains {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.chain-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Claim Section ===== */
.claim-section {
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.04), transparent);
}

.claim-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.claim-info-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.claim-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.claim-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.feature-icon {
  width: 22px;
  height: 22px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.claim-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #fbbf24;
  line-height: 1.5;
}

.notice-icon {
  flex-shrink: 0;
}

.claim-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group select:focus,
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.input-wrapper {
  position: relative;
}

.address-status {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.address-status.valid { color: var(--success); }
.address-status.invalid { color: var(--error); }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-hint.error {
  color: var(--error);
}

.chain-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.chain-tab {
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.chain-tab:hover {
  border-color: var(--border-hover);
}

.chain-tab.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.chain-tab-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.chain-tab-type {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.selected-token-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}

.preview-token-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.preview-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.preview-amount {
  display: block;
  font-size: 13px;
  color: var(--success);
  margin-top: 2px;
}

.form-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.step-number {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Activity Feed ===== */
.activity-feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.4s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.activity-text strong {
  color: var(--text-primary);
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav { display: none; }
  .claim-wrapper { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .chain-tabs { grid-template-columns: 1fr; }
  .claim-form { padding: 24px 20px; }
}
