/* ================================================
   CryptoPay Gateway - Main Stylesheet
   ================================================ */

:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2235;
  --card: #141c2e;
  --border: #1e2d45;
  --primary: #00d4ff;
  --primary-dark: #0099bb;
  --accent: #7c3aed;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- Layout ---- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.main-content { padding: 30px 20px; min-height: calc(100vh - 140px); max-width: 1140px; margin: 0 auto; }

/* ---- Navbar ---- */
.navbar {
  background: rgba(10,14,26,0.95);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--primary); font-size: 1.2rem; font-weight: 700; text-decoration: none; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }

/* ---- Buttons ---- */
.btn-primary, .btn-outline, .btn-danger, .btn-success {
  padding: 9px 22px; border-radius: 8px; font-family: var(--font);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-block; border: none; transition: all .2s;
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #000; }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-lg { padding: 13px 32px; font-size: 1rem; }
.btn-full { width: 100%; text-align: center; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 1.2rem; font-weight: 600; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--text-dim); font-weight: 500; }
.form-control {
  width: 100%; padding: 11px 14px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-family: var(--font);
  font-size: 0.93rem; transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control select { background: var(--bg2); }
select.form-control { appearance: none; cursor: pointer; }

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 20px;
  font-size: 0.9rem; font-weight: 500;
}
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid var(--green); color: var(--green); }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--red); color: var(--red); }
.alert-warning { background: rgba(245,158,11,0.15); border: 1px solid var(--yellow); color: var(--yellow); }
.alert-info { background: rgba(0,212,255,0.12); border: 1px solid var(--primary); color: var(--primary); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: left; font-size: 0.88rem; }
table th { background: var(--bg3); color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; }
table tr { border-bottom: 1px solid var(--border); }
table tr:last-child { border-bottom: none; }
table tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- Status Badges ---- */
.badge {
  padding: 3px 10px; border-radius: 20px; font-size: 0.76rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-pending { background: rgba(245,158,11,0.15); color: var(--yellow); border: 1px solid var(--yellow); }
.badge-confirmed { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid var(--green); }
.badge-confirming { background: rgba(0,212,255,0.15); color: var(--primary); border: 1px solid var(--primary); }
.badge-expired { background: rgba(100,116,139,0.15); color: var(--text-muted); border: 1px solid var(--text-muted); }
.badge-failed { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid var(--red); }

/* ---- Hero ---- */
.hero {
  text-align: center; padding: 70px 20px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,212,255,0.15), transparent);
}
.hero h1 { font-size: 3rem; font-weight: 700; letter-spacing: -1.5px; line-height: 1.1; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-dim); font-size: 1.1rem; max-width: 540px; margin: 16px auto 32px; }

/* ---- Plans Grid ---- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 36px 0; }
.plan-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; position: relative;
  transition: border-color .2s, transform .2s;
}
.plan-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.plan-card.featured { border-color: var(--primary); background: linear-gradient(145deg, var(--card), rgba(0,212,255,0.05)); }
.plan-card.featured::before {
  content: 'POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #000; font-size: 0.7rem; font-weight: 700;
  padding: 3px 14px; border-radius: 20px; letter-spacing: 0.1em;
}
.plan-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.plan-price { font-size: 2.2rem; font-weight: 700; color: var(--primary); font-family: var(--mono); }
.plan-price span { font-size: 1rem; color: var(--text-muted); }
.plan-features { list-style: none; margin: 18px 0 24px; }
.plan-features li { padding: 6px 0; color: var(--text-dim); font-size: 0.9rem; }
.plan-features li::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ---- Payment Page ---- */
.payment-box { max-width: 580px; margin: 0 auto; }
.qr-section { text-align: center; margin: 24px 0; }
.qr-section img { border-radius: 8px; border: 4px solid var(--border); }
.wallet-addr {
  background: var(--bg2); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 12px 16px; font-family: var(--mono); font-size: 0.8rem;
  word-break: break-all; color: var(--primary); margin: 12px 0;
  cursor: pointer; position: relative;
}
.wallet-addr:hover { border-color: var(--primary); }
.copy-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.amount-display {
  background: var(--bg2); border-radius: 8px; padding: 16px;
  text-align: center; margin: 16px 0;
}
.amount-display .crypto-amount { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.amount-display .usd-amount { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }

/* Countdown Timer */
.timer-box {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px; padding: 12px 16px; text-align: center; margin: 16px 0;
}
.timer-box .timer-label { font-size: 0.8rem; color: var(--text-muted); }
.timer-box .timer-val { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--red); }

/* Status Steps */
.steps { display: flex; justify-content: space-between; margin: 24px 0; position: relative; }
.steps::before {
  content: ''; position: absolute; top: 16px; left: 12%; right: 12%;
  height: 2px; background: var(--border);
}
.step { flex: 1; text-align: center; position: relative; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700;
  margin: 0 auto 8px; border: 2px solid var(--border); background: var(--bg);
  position: relative; z-index: 1;
}
.step.active .step-dot { border-color: var(--primary); color: var(--primary); background: rgba(0,212,255,0.1); }
.step.done .step-dot { border-color: var(--green); background: var(--green); color: #000; }
.step-label { font-size: 0.75rem; color: var(--text-muted); }
.step.active .step-label { color: var(--primary); }
.step.done .step-label { color: var(--green); }

/* Crypto Selector */
.crypto-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
.crypto-opt {
  border: 2px solid var(--border); border-radius: 10px; padding: 14px;
  cursor: pointer; transition: all .2s; text-align: center;
}
.crypto-opt:hover, .crypto-opt.selected { border-color: var(--primary); background: rgba(0,212,255,0.07); }
.crypto-opt .crypto-icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.crypto-opt .crypto-name { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }
.crypto-opt.selected .crypto-name { color: var(--primary); }

/* Dashboard Stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stat-card .stat-val { font-size: 1.8rem; font-weight: 700; font-family: var(--mono); color: var(--primary); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* Footer */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 24px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem;
}
.footer-note { font-size: 0.78rem; margin-top: 4px; color: var(--border); }

/* Auth Forms */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-wrap h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.auth-wrap .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.auth-link { text-align: center; margin-top: 18px; font-size: 0.88rem; color: var(--text-muted); }
.auth-link a { color: var(--primary); text-decoration: none; }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 0.88rem; }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 12px; }
.section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Confirmed Animation */
.confirmed-icon { font-size: 3.5rem; animation: pop 0.4s ease; }
@keyframes pop { 0%{transform:scale(0)} 80%{transform:scale(1.15)} 100%{transform:scale(1)} }

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .plans-grid { grid-template-columns: 1fr; }
  .crypto-options { grid-template-columns: repeat(2,1fr); }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .nav-links .btn-outline { display: none; }
}
