/* ============================================================
   GiftVault — "Cyber Vault" design system
   Dark blue + black, electric glow, glassmorphism, 3D depth
   ============================================================ */

:root {
  --bg:        #04060e;
  --bg-soft:   #070b18;
  --panel:     rgba(13, 23, 48, 0.55);
  --panel-2:   rgba(9, 16, 36, 0.78);
  --line:      rgba(96, 132, 255, 0.16);
  --navy:      #0a1430;
  --blue:      #2f6bff;
  --blue-bright:#4d8bff;
  --cyan:      #38e0ff;
  --glow:      #2f6bff;
  --text:      #eaf0ff;
  --muted:     #8094c4;
  --muted-2:   #586698;
  --danger:    #ff5d6c;
  --ok:        #3ddc97;
  --warn:      #ffb454;
  --radius:    18px;
  --shadow:    0 24px 60px -20px rgba(0, 8, 40, 0.9);
  --maxw:      1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Sora", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* subtle grain + vignette over the 3D canvas */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background:
    radial-gradient(120% 80% at 50% -10%, transparent 40%, rgba(0,0,0,0.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

#bg-canvas {
  position: fixed; inset: 0;
  z-index: 0;
  display: block;
}

.shell { position: relative; z-index: 2; }

h1, h2, h3, .display {
  font-family: "Unbounded", "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- Navbar ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(4,6,14,0.85), rgba(4,6,14,0.45));
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand {
  font-family: "Unbounded", sans-serif; font-weight: 800;
  font-size: 1.3rem; letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 10px;
}
.brand .dot {
  width: 13px; height: 13px; border-radius: 4px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 18px var(--glow), 0 0 4px var(--cyan);
  transform: rotate(45deg);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: rotate(45deg) scale(1.18); } }
.nav-links { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: 0.92rem;
  color: var(--muted); transition: all .2s; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: rgba(96,132,255,0.10); }
.nav-links a.active { color: var(--text); }
.bal-pill {
  font-family: "Unbounded", sans-serif; font-size: 0.82rem;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(47,107,255,0.18), rgba(56,224,255,0.08));
  color: var(--text);
}
.menu-toggle { display: none; background: none; border: 0; color: var(--text);
  font-size: 1.5rem; cursor: pointer; margin-left: auto; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: all .18s; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  background: var(--panel-2); color: var(--text); border-color: var(--line);
}
.btn:hover { transform: translateY(-2px); border-color: rgba(96,132,255,0.4); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1b46d6);
  border: 0; color: #fff;
  box-shadow: 0 10px 30px -8px rgba(47,107,255,0.7), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(47,107,255,0.9); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------------- Hero ---------------- */
.hero { padding: 110px 0 80px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan); padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(56,224,255,0.05);
  margin-bottom: 28px;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--cyan), var(--blue-bright) 60%, #b9caff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 1.18rem; max-width: 560px;
  margin: 26px auto 38px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.stat-row { display: flex; gap: 44px; justify-content: center; margin-top: 72px;
  flex-wrap: wrap; }
.stat .num { font-family: "Unbounded", sans-serif; font-size: 2.1rem;
  background: linear-gradient(120deg, var(--cyan), var(--blue-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted-2); font-size: 0.85rem; letter-spacing: 0.05em; }

/* fade-up on load */
.reveal { opacity: 0; transform: translateY(28px); animation: rise .9s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1{animation-delay:.05s}.d2{animation-delay:.18s}.d3{animation-delay:.32s}
.d4{animation-delay:.46s}.d5{animation-delay:.6s}

/* ---------------- Section heads ---------------- */
.sec { padding: 70px 0; }
.sec-head { margin-bottom: 38px; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.sec-head p { color: var(--muted); margin-top: 10px; }

/* ---------------- Glass panels ---------------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

/* ---------------- Product grid + 3D tilt cards ---------------- */
.grid { display: grid; gap: 22px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }

.card {
  position: relative; border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0; overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow .3s, border-color .3s;
  will-change: transform;
}
.card:hover { border-color: rgba(96,132,255,0.45);
  box-shadow: 0 30px 70px -25px rgba(47,107,255,0.55); }
.card .shine {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,50%),
    rgba(96,132,255,0.22), transparent 45%);
  transition: opacity .3s; transform: translateZ(40px);
}
.card:hover .shine { opacity: 1; }
.card .thumb {
  height: 150px; display: flex; align-items: center; justify-content: center;
  font-family: "Unbounded", sans-serif; font-size: 1.5rem; letter-spacing: .04em;
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(47,107,255,0.35), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(56,224,255,0.22), transparent 55%),
    var(--navy);
  position: relative; overflow: hidden; transform: translateZ(20px);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .tag {
  position: absolute; top: 12px; left: 12px; font-family: "Sora", sans-serif;
  font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); background: rgba(4,6,14,0.6); padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--line); }
.card .body { padding: 18px 20px 22px; transform: translateZ(30px); }
.card .body h3 { font-size: 1.12rem; margin-bottom: 6px; }
.card .body .desc { color: var(--muted); font-size: 0.88rem; min-height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.card .meta { display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; }
.card .price { font-family: "Unbounded", sans-serif; font-size: 1.35rem; }
.card .stock { font-size: 0.78rem; color: var(--muted-2); }
.card .stock.out { color: var(--danger); }
.card .stock.in { color: var(--ok); }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; color: var(--muted);
  margin-bottom: 7px; letter-spacing: 0.02em; }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: rgba(4,8,20,0.7); border: 1px solid var(--line);
  color: var(--text); font-family: "Sora", sans-serif; font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47,107,255,0.18);
}
textarea { resize: vertical; min-height: 90px; }

.auth-wrap { max-width: 430px; margin: 70px auto; padding: 40px 36px; }
.auth-wrap h1 { font-size: 2rem; margin-bottom: 8px; }
.auth-wrap .sub { color: var(--muted); margin-bottom: 28px; }
.auth-wrap .alt { text-align: center; margin-top: 20px; color: var(--muted);
  font-size: 0.9rem; }
.auth-wrap .alt a { color: var(--blue-bright); font-weight: 600; }

/* ---------------- Toast / alerts ---------------- */
.toast-host { position: fixed; bottom: 26px; right: 26px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 18px; border-radius: 12px; min-width: 260px; max-width: 360px;
  background: var(--panel-2); border: 1px solid var(--line);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  font-size: 0.9rem; animation: rise .35s; border-left: 3px solid var(--blue);
}
.toast.err { border-left-color: var(--danger); }
.toast.ok  { border-left-color: var(--ok); }

/* ---------------- Modal ---------------- */
.modal-host { position: fixed; inset: 0; z-index: 150; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(2,4,10,0.78); backdrop-filter: blur(6px); }
.modal-host.open { display: flex; }
.modal { width: 100%; max-width: 540px; padding: 30px 32px; max-height: 88vh;
  overflow-y: auto; animation: rise .3s; }
.modal h2 { font-size: 1.5rem; margin-bottom: 4px; }
.modal .close { position: absolute; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; }
.x-btn { background: none; border: 1px solid var(--line); color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1.1rem; }
.x-btn:hover { color: var(--text); }

/* ---------------- Tables ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; color: var(--muted-2); font-weight: 600;
  font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px; border-bottom: 1px solid rgba(96,132,255,0.07);
  vertical-align: middle; }
.table tr:hover td { background: rgba(96,132,255,0.04); }

.badge { font-size: 0.72rem; padding: 4px 10px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.03em; }
.badge.completed { background: rgba(61,220,151,0.14); color: var(--ok); }
.badge.pending   { background: rgba(255,180,84,0.14); color: var(--warn); }
.badge.needs_attention { background: rgba(255,93,108,0.14); color: var(--danger); }

.code-box { font-family: "JetBrains Mono", ui-monospace, monospace;
  background: rgba(4,8,20,0.8); border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px 14px; margin: 6px 0; font-size: 0.86rem; color: var(--cyan);
  word-break: break-all; }

/* ---------------- Stars ---------------- */
.stars { display: inline-flex; gap: 3px; }
.star { cursor: pointer; font-size: 1.25rem; color: var(--muted-2); transition: .15s; }
.star.on { color: var(--warn); text-shadow: 0 0 10px rgba(255,180,84,0.6); }

.vouch { padding: 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(4,8,20,0.4); margin-bottom: 12px; }
.vouch .top { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; }
.vouch .who { font-weight: 600; }
.vouch .when { color: var(--muted-2); font-size: 0.78rem; }
.vouch .txt { color: var(--muted); font-size: 0.9rem; }

/* ---------------- Misc layout ---------------- */
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 18px; } .mt2 { margin-top: 30px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr));
  gap: 16px; }
.stat-card { padding: 22px; }
.stat-card .v { font-family: "Unbounded", sans-serif; font-size: 1.9rem; }
.stat-card .k { color: var(--muted-2); font-size: 0.82rem; margin-top: 4px; }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 10px 18px; border-radius: 11px; cursor: pointer; color: var(--muted);
  border: 1px solid transparent; font-weight: 500; }
.tab.active { color: var(--text); background: var(--panel); border-color: var(--line); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted-2); }

/* ---------------- Payment: QR + copy + live stepper ---------------- */
.pay { padding: 22px; }
.pay-grid { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.pay-qr { background: #fff; padding: 10px; border-radius: 14px; line-height: 0;
  box-shadow: var(--shadow); align-self: flex-start; }
.pay-qr img, .pay-qr canvas { display: block; border-radius: 6px; }
.pay-info { flex: 1; min-width: 240px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; }
.pay-k { color: var(--muted-2); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; flex-shrink: 0; }
.copy-chip { max-width: 72%; cursor: pointer; border: 1px solid var(--line);
  background: rgba(4,8,20,0.7); color: var(--text); border-radius: 10px; padding: 9px 12px;
  font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; transition: 0.15s;
  overflow: hidden; }
.copy-chip:hover { border-color: var(--blue); }
.copy-chip.mono { font-family: "JetBrains Mono", monospace; font-size: 0.76rem;
  word-break: break-all; text-align: left; }
.copy-chip span { opacity: 0.55; margin-left: auto; }
.pay-warn { font-size: 0.76rem; color: var(--warn); margin-top: 6px; line-height: 1.45; }
.stepper { display: flex; align-items: flex-start; margin: 26px 6px 8px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 0; flex: 0; }
.step .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--bg-soft); transition: 0.35s; }
.step .lbl { font-size: 0.7rem; color: var(--muted-2); white-space: nowrap; transition: 0.3s; }
.step.active .dot { border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(47,107,255,0.18); animation: dotpulse 1.3s ease-in-out infinite; }
.step.active .lbl { color: var(--text); }
.step.done .dot { background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-color: transparent; box-shadow: 0 0 14px var(--glow); }
.step.done .lbl { color: var(--muted); }
.stepper.err .step.active .dot { border-color: var(--danger);
  box-shadow: 0 0 0 5px rgba(255,93,108,0.2); animation: none; }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 9px rgba(47,107,255,0.04); } }
.bar { flex: 1; height: 2px; background: var(--line); margin: 8px 6px 0; transition: 0.4s; }
.bar.fill { background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.pay-status { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 10px; }

footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 80px;
  color: var(--muted-2); font-size: 0.85rem; text-align: center; }

/* ---------------- Responsive ---------------- */
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; background: var(--bg-soft); padding: 14px;
    border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a, .bal-pill { width: 100%; }
  .stat-row { gap: 28px; }
  .hero { padding: 70px 0 50px; }
}
