:root {
  --bg: #0a0b10;
  --bg-2: #10121b;
  --panel: #151826;
  --panel-2: #1b1f30;
  --line: #262b40;
  --text: #eef0f7;
  --muted: #99a0b8;
  --brand: #7b61ff;
  --brand-2: #3aa9ff;
  --accent: #f4c542;
  --danger: #ff5d5d;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name { font-family: "Sora", sans-serif; }

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

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; }
.brand-mark { color: var(--brand); font-size: 1.1rem; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.94rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-weight: 600; cursor: pointer; font-size: 0.9rem;
  transition: border-color 0.15s, transform 0.1s;
}
.cart-btn:hover { border-color: var(--brand); }
.cart-count {
  background: var(--brand); color: #fff; border-radius: 999px;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}

/* HERO */
.hero { position: relative; overflow: hidden; padding: 92px 22px 70px; }
.hero-glow {
  position: absolute; inset: -30% 0 auto 0; height: 620px;
  background: radial-gradient(60% 60% at 30% 0%, rgba(123, 97, 255, 0.28), transparent 70%),
              radial-gradient(50% 50% at 85% 15%, rgba(58, 169, 255, 0.22), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero-content { position: relative; max-width: 900px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-block; color: var(--brand-2); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.74rem;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.7rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(100deg, var(--brand), var(--brand-2) 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 20px auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; margin-top: 46px; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: "Sora"; font-size: 1.7rem; }
.hero-stats span { color: var(--muted); font-size: 0.82rem; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; padding: 13px 22px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 10px 30px rgba(123, 97, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 38px rgba(123, 97, 255, 0.5); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-block { width: 100%; }

/* SHOP */
.shop { max-width: 1200px; margin: 0 auto; padding: 30px 22px 60px; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.shop-head h2 { font-size: 1.8rem; }
.filters { display: flex; gap: 10px; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: 0.86rem;
  transition: all 0.15s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 20px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: #33395a; box-shadow: var(--shadow); }
.card-art {
  height: 175px; display: flex; align-items: center; justify-content: center;
  font-size: 4.2rem; position: relative; overflow: hidden;
}
.card-svg { width: 100%; height: 100%; display: block; }
.card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12); color: #fff;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.card-stock {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
  background: rgba(0,0,0,0.45); padding: 5px 10px; border-radius: 999px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-set { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.card-name { font-family: "Sora"; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.card-cond { color: var(--brand-2); font-size: 0.78rem; font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.card-price { font-family: "Sora"; font-weight: 800; font-size: 1.15rem; }
.add-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s;
}
.add-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* TRUST */
.trust { max-width: 1200px; margin: 0 auto; padding: 30px 22px 70px; }
.trust h2 { font-size: 1.8rem; text-align: center; margin-bottom: 34px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.trust-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
}
.trust-ico { font-size: 2rem; display: block; margin-bottom: 12px; }
.trust-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.trust-card p { color: var(--muted); font-size: 0.9rem; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 34px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.footer .brand { justify-content: center; }
.footer a { color: var(--brand-2); }
.footer small { color: var(--muted); font-size: 0.78rem; max-width: 560px; }

/* CART DRAWER */
.drawer-overlay, .modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 50;
}
.drawer-overlay.open, .modal-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(410px, 92vw);
  background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.25s; z-index: 60;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 1.05rem; }
.cart-total strong { font-family: "Sora"; font-size: 1.3rem; }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px; border-radius: 8px; }
.icon-btn:hover { color: var(--text); background: var(--panel); }

.cart-line { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cart-line-art { width: 46px; height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 600; font-size: 0.88rem; line-height: 1.2; }
.cart-line-price { color: var(--muted); font-size: 0.82rem; }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 700; }
.qty span { min-width: 18px; text-align: center; font-size: 0.85rem; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* MODAL */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%);
  width: min(520px, 94vw); max-height: 90vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; z-index: 70; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal h3 { font-size: 1.4rem; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 0.95rem; font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--brand); }

.coin-select { display: flex; gap: 10px; margin-bottom: 18px; }
.coin-opt {
  flex: 1; text-align: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 8px; cursor: pointer; font-weight: 600; transition: all 0.15s;
}
.coin-opt:hover { border-color: var(--brand); }
.coin-opt.active { border-color: var(--brand); background: rgba(123,97,255,0.14); }
.coin-opt small { display: block; color: var(--muted); font-weight: 500; font-size: 0.72rem; margin-top: 2px; }

.pay-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 16px; }
.pay-box img { width: 168px; height: 168px; border-radius: 10px; background: #fff; padding: 8px; margin: 0 auto 12px; display: block; }
.pay-addr { font-family: monospace; font-size: 0.82rem; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--brand-2); }
.copy-btn { margin-top: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 0.82rem; }
.copy-btn:hover { border-color: var(--brand); }
.pay-amount { font-family: "Sora"; font-size: 1.5rem; font-weight: 800; margin: 4px 0 2px; }
.order-summary { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.order-summary .row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 4px 0; color: var(--muted); }
.order-summary .row.total { color: var(--text); font-weight: 700; font-size: 1rem; padding-top: 8px; }
.success { text-align: center; padding: 10px 0; }
.success .check { font-size: 3rem; }
.success .ref { font-family: monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; display: inline-block; margin-top: 8px; color: var(--accent); }
.note { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 60px 18px 50px; }
  .hero-stats { gap: 26px; }
}
