/* ============================================================================
   PantheraHive — Homepage Styles
   ============================================================================ */

:root {
  --bg-primary:   #0a0e17;
  --bg-secondary: #111827;
  --bg-surface:   #1a2235;
  --bg-hover:     #243049;
  --border:       #2d3a52;
  --border-active:#6366f1;
  --text-primary: #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --accent:       #6366f1;
  --accent-hover: #818cf8;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --cyan:         #06b6d4;
  --purple:       #a855f7;
  --pink:         #ec4899;
  --radius:       10px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text-primary); text-decoration: none;
}
.nav-brand svg { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-wallet {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 8px;
  background: var(--bg-surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-muted); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; font-weight: 600; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--text-muted); }
.btn-outline:hover { background: var(--bg-surface); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 160px 24px 80px; text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 17px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; justify-content: center; gap: 16px; margin-bottom: 48px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 36px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }

/* ─── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 80px 24px; max-width: 1280px; margin: 0 auto; }
.section-dark { background: var(--bg-secondary); max-width: 100%; padding-left: 24px; padding-right: 24px; }
.section-dark > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-secondary); font-size: 15px; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }
.loading-text { text-align: center; color: var(--text-muted); padding: 40px; }

/* ─── Apps Grid ────────────────────────────────────────────────────────────── */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.app-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.app-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.1); }
.app-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.app-card-icon { font-size: 32px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(99,102,241,0.1); }
.app-card-meta { flex: 1; }
.app-card-name { font-size: 16px; font-weight: 600; }
.app-card-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.app-card-status {
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.status-green  { background: rgba(34,197,94,0.15); color: var(--success); }
.status-yellow { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-red    { background: rgba(239,68,68,0.15); color: var(--danger); }
.status-gray   { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.app-card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.app-card-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.feature-tag {
  padding: 3px 8px; border-radius: 6px; font-size: 11px;
  background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border);
}
.feature-tag .cost { color: var(--warning); font-weight: 600; margin-left: 4px; }
.app-card-footer { display: flex; justify-content: space-between; align-items: center; }
.app-card-tools { font-size: 12px; color: var(--text-muted); }
.app-card-url { font-size: 11px; color: var(--text-muted); text-overflow: ellipsis; overflow: hidden; max-width: 160px; white-space: nowrap; }

/* ─── Top-up Packs ─────────────────────────────────────────────────────────── */
.payment-toggle {
  display: flex; justify-content: center; gap: 0; margin-bottom: 36px;
  background: var(--bg-surface); border-radius: 10px; border: 1px solid var(--border);
  overflow: hidden; max-width: 360px; margin-left: auto; margin-right: auto;
}
.toggle-btn {
  flex: 1; padding: 12px 20px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.toggle-btn.active { background: var(--accent); color: #fff; }

.packs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.pack-card {
  background: var(--bg-surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 24px; text-align: center;
  transition: border-color 0.2s, transform 0.2s; cursor: pointer; position: relative;
}
.pack-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pack-card.popular { border-color: var(--accent); }
.pack-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 2px 12px; border-radius: 12px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pack-credits { font-size: 36px; font-weight: 800; color: var(--text-primary); }
.pack-credits-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.pack-price { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.pack-per-credit { font-size: 11px; color: var(--text-muted); margin-bottom: 16px; }
.pack-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; }

.disclosure {
  max-width: 700px; margin: 0 auto; padding: 20px; font-size: 12px;
  color: var(--text-muted); background: var(--bg-surface); border-radius: 10px;
  border: 1px solid var(--border);
}
.disclosure ul { padding-left: 20px; line-height: 1.8; }

/* ─── Workflows ────────────────────────────────────────────────────────────── */
.workflow-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.workflow-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  transition: border-color 0.2s;
}
.workflow-card:hover { border-color: var(--accent); }
.workflow-card h3 { font-size: 16px; margin-bottom: 8px; }
.workflow-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.wf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.wf-icon { font-size: 20px; }
.wf-badge {
  padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: rgba(99,102,241,0.15); color: var(--accent);
}
.wf-flow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px; background: var(--bg-primary); border-radius: 8px;
  margin-bottom: 16px;
}
.wf-node {
  padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.wf-node.trigger { background: rgba(34,197,94,0.15); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.wf-node.app { background: rgba(99,102,241,0.15); color: var(--accent-hover); border: 1px solid rgba(99,102,241,0.3); }
.wf-node.gemini { background: rgba(168,85,247,0.15); color: var(--purple); border: 1px solid rgba(168,85,247,0.3); }
.wf-arrow { color: var(--text-muted); font-size: 16px; }
.wf-actions { display: flex; gap: 8px; }

/* ─── Learn ────────────────────────────────────────────────────────────────── */
.learn-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}
.learn-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px; position: relative;
}
.learn-num {
  font-size: 48px; font-weight: 800; color: rgba(99,102,241,0.15);
  position: absolute; top: 16px; right: 20px; line-height: 1;
}
.learn-card h3 { font-size: 16px; margin-bottom: 8px; padding-right: 40px; }
.learn-card > p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.learn-steps { margin-bottom: 16px; }
.learn-steps .step {
  padding: 6px 0; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid rgba(45,58,82,0.5);
}
.learn-steps .step:last-child { border-bottom: none; }
.learn-steps a { color: var(--accent-hover); }
.learn-tip {
  padding: 12px; border-radius: 8px; font-size: 12px; line-height: 1.5;
  background: rgba(99,102,241,0.08); color: var(--text-secondary);
  border: 1px solid rgba(99,102,241,0.15);
}
.learn-example { margin-bottom: 16px; }
.learn-example h4 { font-size: 13px; margin-bottom: 12px; color: var(--text-secondary); }
.chain-visual {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 16px; background: var(--bg-primary); border-radius: 8px;
}
.chain-node {
  padding: 8px 12px; border-radius: 8px; font-size: 12px; text-align: center;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  line-height: 1.4;
}
.chain-node small { display: block; font-size: 10px; color: var(--text-muted); }
.chain-arrow { color: var(--text-muted); font-size: 14px; }
.chain-cost { margin-top: 12px; color: var(--text-muted); font-size: 12px; }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 500;
}
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 12px; width: 560px; max-width: 90vw;
  max-height: 80vh; overflow-y: auto; padding: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.modal h2 { font-size: 20px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ─── Forms ────────────────────────────────────────────────────────────────── */
.form-input {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

/* ─── Nav Right ────────────────────────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 40px 24px;
  background: var(--bg-secondary);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.footer-brand svg { color: var(--accent); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ─── Toast ────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: 8px; background: var(--bg-surface);
  border: 1px solid var(--border); font-size: 13px; box-shadow: var(--shadow);
  animation: slideIn 0.2s ease-out;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Animations ───────────────────────────────────────────────────────────── */
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { gap: 24px; }
  .nav-links { display: none; }
  .apps-grid { grid-template-columns: 1fr; }
  .packs-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-grid { grid-template-columns: 1fr; }
  .learn-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .chain-visual { justify-content: center; }
}
