/* ============================================================
   Cache Club — Shared Design System
   Consumed by the Hub, Creator Cache™ and Womeown.
   Apps override the CSS variables to apply their own theme.
   ============================================================ */

:root {
  --bg-primary: #0b0b12;
  --bg-secondary: #14141f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --text-primary: #f5f5fa;
  --text-muted: #9a9ab0;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #22d3ee);
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 14px;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }

a { color: var(--accent-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: none;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  min-height: 44px; /* touch target */
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; min-height: 36px; }
.btn-danger { background: rgba(248, 113, 113, 0.15); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Cards & glass ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(139, 92, 246, 0.16); color: var(--accent);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-gold { background: rgba(251, 191, 36, 0.14); color: var(--warning); border-color: rgba(251, 191, 36, 0.35); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.input, .field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 0.95rem; outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(5, 5, 12, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; animation: fadeIn 0.2s ease;
}
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 20px; padding: 26px; box-shadow: var(--shadow);
  animation: popIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
/* Wide enough for three plan cards side by side. At 640px the grid
   wrapped to 2+1, which pushed Elite — the anchor the ₹199 price is
   judged against — below the fold. */
.modal-wide { max-width: 880px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 10px; }
.modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.4rem; line-height: 1; padding: 4px 8px; border-radius: 8px;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-card); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.92) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); }
.toast {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: 12px;
  padding: 13px 16px; font-size: 0.9rem; box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* ---------- Growth engine: promo banner ---------- */
.growth-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 44px 10px 16px; position: relative; text-align: center;
  background: var(--accent-gradient); color: #fff;
  font-size: 0.88rem; font-weight: 600; z-index: 50;
}
.growth-banner button.gb-cta {
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff; border-radius: 999px; padding: 5px 13px; font-size: 0.8rem; font-weight: 700;
  white-space: nowrap;
}
.growth-banner .gb-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255, 255, 255, 0.85); font-size: 1.15rem;
  padding: 4px 8px;
}

/* ---------- Pricing ---------- */
/* Three across, or one — never 2+1, which reads as "Elite is an
   afterthought" exactly where the anchor has to do its work. */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { position: relative; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.price-card.popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(139, 92, 246, 0.25); }
.price-card .plan-name { font-size: 1.05rem; }
.price-card .plan-price { font-size: 2rem; font-family: var(--font-display); font-weight: 800; }
.price-card .plan-price small { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.87rem; color: var(--text-muted); flex: 1; }
.price-card ul li::before { content: "✓  "; color: var(--success); font-weight: 700; }
.price-card ul li.no::before { content: "—  "; color: var(--text-muted); }
.popular-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent-gradient); color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; }

/* ---------- Mock UPI checkout ---------- */
.upi-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.upi-option {
  display: flex; align-items: center; gap: 10px; padding: 13px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.2);
  font-weight: 600; font-size: 0.9rem; color: var(--text-primary); transition: border-color 0.15s;
}
.upi-option:hover, .upi-option.selected { border-color: var(--accent); background: rgba(139, 92, 246, 0.12); }
.upi-option .upi-logo { font-size: 1.3rem; }
.checkout-summary { background: rgba(0, 0, 0, 0.25); border: 1px dashed var(--border); border-radius: 12px; padding: 14px 16px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 7px; }
.checkout-summary .row { display: flex; justify-content: space-between; }
.checkout-summary .total { font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.strike { text-decoration: line-through; color: var(--text-muted); }
.qr-box { width: 150px; height: 150px; margin: 14px auto; border-radius: 12px; background: repeating-conic-gradient(#fff 0% 25%, #111 0% 50%) 50%/22px 22px; border: 8px solid #fff; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; margin: 18px auto; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Scratch card ---------- */
.scratch-wrap { text-align: center; }
.scratch-stage { position: relative; width: 280px; height: 175px; margin: 16px auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.scratch-prize {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%), var(--accent-gradient);
  color: #fff;
}
.scratch-prize .prize-big { font-size: 1.7rem; font-weight: 800; font-family: var(--font-display); }
.scratch-prize .prize-sub { font-size: 0.85rem; opacity: 0.9; }
.scratch-stage canvas { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.scratch-hint { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Plan chip in sidebars ---------- */
.plan-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-card); font-size: 0.8rem;
}

/* ---------- Utility ---------- */
.muted { color: var(--text-muted); }
.center { text-align: center; }
/* Policy links. A payment aggregator's reviewer has to be able to find
   these from the landing page, and so does a customer looking for how
   to cancel — so they sit in the footer of every entry point, not
   buried in an account screen. */
.legal-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 22px clamp(16px, 5vw, 40px); margin-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted);
}
.legal-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.legal-foot a { color: var(--text-muted); text-decoration: none; }
.legal-foot a:hover { color: var(--text-primary); text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .modal { padding: 20px; border-radius: 16px; }
  .upi-options { grid-template-columns: 1fr; }
}
