:root {
  --bg: #120d1f;
  --surface: #1c1530;
  --surface-2: #261d40;
  --line: #3a2f5c;
  --text: #f3efff;
  --muted: #a79cc7;
  --accent: #8b5cf6;
  --accent-2: #c4a7ff;
  --ok: #6ee7a8;
  --warn: #ffd166;
  --ink: #120d1f;
  --radius: 14px;
}
[data-theme="light"] {
  --bg: #f6f3ff;
  --surface: #ffffff;
  --surface-2: #efeaff;
  --line: #ddd4f5;
  --text: #1d1433;
  --muted: #6b6391;
  --accent: #6d3ff0;
  --accent-2: #5a2fd6;
  --ink: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.status { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); min-width: 0; }
.status #status-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(110,231,168,.2); }
.dot.offline { background: #f87171; }
.tools { display: flex; gap: 8px; }
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; position: relative;
}
.badge {
  display: inline-block; min-width: 1.4em; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700;
}

.hero { padding: 28px 16px 12px; max-width: 1100px; margin: 0 auto; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 5vw, 2.4rem); }
.hero p { margin: 0 0 14px; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--muted); }
.trust span { color: var(--ok); }
.trust span { color: var(--muted); }
.trust span::first-letter { color: var(--ok); }

.catalog, .reviews, .faq, .orders, .discord { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.controls { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .controls { grid-template-columns: 2fr 1fr 1fr; } }
input[type="search"], input[type="text"], select {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: none; }
.chip {
  flex: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--muted);
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; position: relative;
}
.product:hover { border-color: var(--accent); }
.product .kind { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.product h3 { margin: 0; font-size: 1.05rem; }
.product p { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.product .price { font-weight: 800; font-size: 1.2rem; margin-top: 6px; }
.tag {
  position: absolute; top: 10px; right: 10px; font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: var(--warn); color: #241a00;
}
.tag.new { background: var(--ok); color: #05261a; }
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 10px;
  padding: 11px 16px; cursor: pointer; text-align: center; text-decoration: none; font-weight: 600;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.full { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.product .btn { margin-top: 8px; padding: 9px 12px; font-size: .9rem; }

.reviews h2, .faq h2, .orders h2, .discord h2 { font-size: 1.3rem; margin: 0 0 10px; }
.discord { text-align: center; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 8px 0 0; font-size: .95rem; }
.order-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.order-list li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
}
.order-list button { font-size: .85rem; }

.cart {
  position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); padding: 18px;
  display: flex; flex-direction: column; gap: 12px; z-index: 40;
  transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
}
.cart.open { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { margin: 0; font-size: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.cart-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cart-items li {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  background: var(--surface-2); border-radius: 10px; padding: 10px 12px;
}
.cart-items .qty { display: flex; align-items: center; gap: 6px; }
.cart-items .qty button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer;
}
.cart-items .remove { background: none; border: 0; color: var(--muted); cursor: pointer; }
.promo { display: flex; gap: 8px; }
.promo input { flex: 1; }
.promo .btn { padding: 10px 14px; }
.summary { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.summary div { display: flex; justify-content: space-between; color: var(--muted); }
.summary .total { color: var(--text); font-size: 1.1rem; }

.product-sheet {
  position: fixed; inset: auto 0 0 0; max-height: 80%; overflow-y: auto; z-index: 50;
  background: var(--surface); border-radius: 18px 18px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0,0,0,.35);
}
@media (min-width: 900px) {
  .product-sheet { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 460px; border-radius: 18px; }
}
.product-sheet h2 { margin: 0 0 6px; }
.product-sheet .price { font-size: 1.4rem; font-weight: 800; margin: 12px 0; }
.product-sheet .close { float: right; background: none; border: 0; cursor: pointer; font-size: 1.2rem; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  opacity: 0; transition: .25s; pointer-events: none; font-weight: 600; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
footer {
  border-top: 1px solid var(--line); padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--muted); font-size: .85rem; text-align: center;
}
footer p { margin: 0; }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
footer a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.legal { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }
.legal h1 { font-size: 2rem; margin: 20px 0 24px; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--accent-2); }
