:root {
  --bg: #070d1a;
  --bg2: #0d1628;
  --card: #111d33;
  --card2: #16263f;
  --line: #22385a;
  --text: #e8f1ff;
  --muted: #8ea4c4;
  --ice: #6fd3ff;
  --ice2: #3a8dff;
  --ok: #4be3a2;
  --warn: #ffc66d;
  --bad: #ff6d8a;
  --r: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: Manrope, system-ui, -apple-system, Segoe UI, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #12305e 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #0c2a4a 0%, transparent 55%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--ice); text-decoration: none; }
main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 16px 40px; flex: 1; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; max-width: 1240px; margin: 0 auto; width: 100%;
  backdrop-filter: blur(12px); background: rgba(7, 13, 26, .7); border-bottom: 1px solid rgba(111, 211, 255, .08);
}
.logo { font-weight: 800; font-size: 18px; color: var(--text); white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.off i { background: var(--bad); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer;
  font: 700 15px Manrope, sans-serif; color: #04122a;
  background: linear-gradient(135deg, var(--ice), var(--ice2));
  box-shadow: 0 6px 24px rgba(58, 141, 255, .35); transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--ice); box-shadow: none; border: 1px solid var(--line); padding: 8px 14px; font-size: 14px; }
.btn.big { width: 100%; padding: 16px; font-size: 17px; }

.input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font: 600 14px Manrope, sans-serif; outline: none;
}
.input:focus { border-color: var(--ice2); }

.hero { padding: 36px 0 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--ice), #b48cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 620px; font-size: 17px; margin: 0 0 22px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 760px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-weight: 600; font-size: 14px; }
.steps b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; background: var(--ice2); color: #fff; font-size: 13px; }

.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 14px; flex-wrap: wrap; }
.row-head h2 { margin: 0; font-size: 24px; }
.row-head .input { max-width: 300px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; margin: 24px 0; }
.back { display: inline-block; margin: 16px 0 0; font-weight: 600; }

.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.col {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px;
  color: var(--text); transition: transform .12s, border-color .12s; position: relative;
}
.col:hover { transform: translateY(-2px); border-color: var(--ice2); }
.col img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--bg2); }
.col .n { font-weight: 700; margin: 8px 0 2px; font-size: 15px; }
.col .p { color: var(--ice); font-weight: 700; font-size: 14px; }
.col .s { color: var(--muted); font-size: 12px; }
.tag { position: absolute; top: 18px; left: 18px; background: #b48cff; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }

.filters { display: grid; grid-template-columns: repeat(6, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer;
  transition: transform .12s, border-color .12s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--ice2); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg2); display: block; }
.card .b { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .t { font-weight: 800; font-size: 15px; }
.card .a { color: var(--muted); font-size: 12px; line-height: 1.5; }
.card .pr { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.card .pr b { font-size: 18px; color: var(--ice); }
.card.res { opacity: .45; pointer-events: none; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--card2); color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 7, 15, .75); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.close { position: absolute; right: 12px; top: 12px; background: var(--card); color: var(--text); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.buy { display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
.buy img { width: 100%; border-radius: 16px; aspect-ratio: 1; object-fit: cover; background: var(--card); }
.buy h3 { margin: 0 0 10px; font-size: 24px; }
.attrs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin-bottom: 16px; }
.attrs dt { color: var(--muted); }
.attrs dd { margin: 0; font-weight: 700; }
.price { font-size: 30px; font-weight: 800; color: var(--ice); margin: 4px 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.err { color: var(--bad); font-weight: 700; font-size: 14px; min-height: 20px; margin: 6px 0; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }

.order { display: grid; grid-template-columns: 320px 1fr; gap: 28px; margin-top: 28px; }
.order-gift img { width: 100%; border-radius: 18px; aspect-ratio: 1; object-fit: cover; }
.order-gift h3 { margin: 12px 0 4px; }
.order-info h2 { margin: 6px 0 18px; font-size: 28px; }
.track { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.track li { padding: 12px 14px 12px 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); position: relative; color: var(--muted); font-weight: 600; }
.track li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 2px solid var(--line); }
.track li.done { color: var(--text); }
.track li.done::before { background: var(--ok); border-color: var(--ok); }
.track li.now { color: var(--text); border-color: var(--ice2); }
.track li.now::before { border-color: var(--ice); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(111, 211, 255, .2); } }
.timer { font-size: 14px; color: var(--warn); font-weight: 700; margin: 10px 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.6; }
.box.bad { border-color: var(--bad); }
.box.ok { border-color: var(--ok); }

.loader { grid-column: 1 / -1; height: 120px; display: grid; place-items: center; }
.loader::after { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ice); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 32px; border-top: 1px solid rgba(111, 211, 255, .08); line-height: 1.6; }

@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(2, 1fr); }
  .filters .btn { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .buy, .order { grid-template-columns: 1fr; }
  .buy img { max-width: 260px; margin: 0 auto; }
  .order-gift { max-width: 320px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cols { grid-template-columns: repeat(2, 1fr); }
  .card .b { padding: 10px; }
  .card .pr b { font-size: 16px; }
  #fpLink { display: none; }
}
