:root {
  --bg: #07070b; --panel: #111118; --panel2: #191923; --line: #262633;
  --text: #f5f4ff; --muted: #9392a8; --accent: #7c5cff; --accent2: #b9a7ff;
  --ok: #38c172; --bad: #e05b5b; --radius: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at 15% 0%, rgba(124,92,255,.2), transparent 35%),
    radial-gradient(circle at 90% 8%, rgba(239,91,122,.1), transparent 30%),
    var(--bg);
  color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 20px 60px; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 0 12px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand span { color: var(--accent2); }
.topnav { display: flex; gap: 16px; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 42px 0 26px; }
.eyebrow { color: var(--accent2); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700; margin-bottom: 8px; }
h1 { font-size: clamp(34px, 5.5vw, 56px); line-height: .98; letter-spacing: -.045em; }
.lead { color: var(--muted); max-width: 560px; margin-top: 14px; font-size: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-art { height: 230px; border-radius: 24px; border: 1px solid var(--line); overflow: hidden; position: relative; background: linear-gradient(160deg, #171528, #0b0a12 70%); }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.b1 { width: 120px; height: 120px; background: linear-gradient(135deg,#9b83ff,#6a4ee0); left: 18%; top: 30%; box-shadow: 0 20px 40px rgba(124,92,255,.4); }
.b2 { width: 84px; height: 84px; background: linear-gradient(135deg,#ffd36b,#e09a24); left: 52%; top: 48%; }
.b3 { width: 64px; height: 64px; background: linear-gradient(135deg,#ff8ba4,#d94666); left: 72%; top: 22%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 11px; font-size: 14.5px; font-weight: 700;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); cursor: pointer;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #9b83ff); border-color: transparent; color: #fff; box-shadow: 0 12px 30px rgba(124,92,255,.3); }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 22px; font-size: 15.5px; width: 100%; }
.btn.small { padding: 6px 12px; font-size: 12.5px; margin: 0 2px; }

section h2 { margin: 34px 0 16px; font-size: 26px; letter-spacing: -.02em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.thumb { position: relative; height: 130px; background: linear-gradient(160deg, #171528, #0b0a12); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 44px; font-weight: 800; color: var(--accent2); opacity: .5; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 15.5px; }
.card-desc { color: var(--muted); font-size: 13px; flex: 1; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-weight: 800; font-size: 18px; color: var(--accent2); }
.price-now.xl { font-size: 26px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13.5px; }
.stock-low { color: #ffb14d; font-size: 12.5px; }

.product { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; padding: 36px 0; align-items: start; }
.p-thumb { position: relative; border-radius: 24px; border: 1px solid var(--line); overflow: hidden; min-height: 280px; background: linear-gradient(160deg, #171528, #0b0a12); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-info h1 { font-size: clamp(26px, 4vw, 40px); }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 10px; }
.p-desc { color: var(--muted); margin-bottom: 12px; }
.stock { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.stock-out { color: var(--bad); font-weight: 700; }
.order-form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.order-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.order-form input, .order-form textarea, .order-form select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 14px; font: inherit;
}
.order-form input:focus, .order-form textarea:focus { outline: none; border-color: var(--accent); }
.order-form .check { flex-direction: row; align-items: center; gap: 8px; }
.p-notes { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13.5px; }
.p-notes code { background: var(--panel2); padding: 2px 8px; border-radius: 6px; font-size: 12.5px; word-break: break-all; }

.order-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 40px auto; max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.order-box.narrow { max-width: 460px; }
.order-box.wide { max-width: none; }
.status { font-weight: 700; font-size: 17px; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.status.wait { color: #ffd36b; }
.order-meta { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.keys { background: var(--panel2); border: 1px dashed var(--accent); border-radius: 14px; padding: 16px; }
.keys-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.keys pre { white-space: pre-wrap; word-break: break-all; font: inherit; font-weight: 700; color: var(--ok); }

.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.s-new { background: #3b3b52; color: #cfcfe6; }
.s-paid { background: #2a5c8f; color: #cfe6ff; }
.s-delivered { background: #1f7a3d; color: #d2ffe4; }
.s-canceled, .s-failed { background: #7a2a2a; color: #ffd8d8; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.inline { display: inline; }
.admin-form { max-width: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.admin-form label { display: flex; flex-direction: column; gap: 5px; }
.admin-form .check { flex-direction: row; align-items: center; }

footer { border-top: 1px solid var(--line); margin-top: 50px; padding-top: 20px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .product { grid-template-columns: 1fr; }
  header { flex-wrap: wrap; }
}
