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

:root {
  --bg:     #07080e;
  --card:   #0d0f1a;
  --card2:  #131525;
  --border: #1c1f38;
  --blue:   #5b8df8;
  --purple: #9f5cf7;
  --text:   #eef0fb;
  --sub:    #7a85ab;
  --muted:  #3a3f60;
  --gold:   #f5a623;
  --green:  #22c55e;
  --danger: #f04040;
  --grad: linear-gradient(135deg, #5b8df8, #9f5cf7);
}

html { font-size: 15px; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }

/* ─── NAV ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,8,14,.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 60px; display: flex; align-items: center; padding: 0 28px; gap: 20px;
}
.nav-logo {
  font-size: 18px; font-weight: 900; letter-spacing: -.5px; flex-shrink: 0;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { flex: 1; display: flex; gap: 2px; }
.nav-links a {
  color: var(--sub); font-size: 14px; padding: 6px 12px; border-radius: 7px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-basket {
  display: flex; align-items: center; gap: 8px;
  background: rgba(91,141,248,.1); border: 1px solid rgba(91,141,248,.25);
  color: var(--blue); font-size: 14px; font-weight: 700;
  padding: 7px 16px; border-radius: 9px; flex-shrink: 0;
  transition: background .15s;
}
.nav-basket:hover { background: rgba(91,141,248,.2); color: var(--blue); }
.nav-basket .count {
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 900;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── HERO ─── */
.store-hero {
  position: relative; overflow: hidden; min-height: 480px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 90px 28px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.5) saturate(.9);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(7,8,14,.15) 0%,
    rgba(7,8,14,.45) 50%,
    rgba(7,8,14,1) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(91,141,248,.12); border: 1px solid rgba(91,141,248,.3);
  color: var(--blue); padding: 5px 16px; border-radius: 20px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 22px;
}
.store-hero h1 {
  font-size: clamp(44px, 8vw, 80px); font-weight: 900;
  line-height: 1; letter-spacing: -3px; margin-bottom: 16px; color: #fff;
}
.store-hero h1 .g {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.store-hero > .hero-inner > p {
  color: rgba(255,255,255,.6); font-size: 16px; max-width: 440px; margin: 0 auto 36px;
}
.hero-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: center;
}
.hero-pill {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  padding: 9px 22px; border-radius: 30px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 8px;
}
.hero-pill strong { color: #fff; font-size: 17px; font-weight: 900; }

/* ─── MAIN ─── */
.store-main { max-width: 1200px; margin: 0 auto; padding: 44px 28px 100px; }

/* ─── CATEGORY TABS ─── */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 44px; }
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--sub); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.cat-tab:hover { background: var(--card2); border-color: rgba(91,141,248,.35); color: var(--text); }
.cat-tab.active {
  background: rgba(91,141,248,.12); border-color: rgba(91,141,248,.45); color: var(--blue);
}
.tab-count {
  background: rgba(255,255,255,.06); color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 6px;
}
.cat-tab.active .tab-count { background: rgba(91,141,248,.18); color: var(--blue); }

/* ─── SECTION HEADER ─── */
.cat-section { margin-bottom: 60px; }
.cat-section-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
}
.cat-section-header h2 { font-size: 17px; font-weight: 800; white-space: nowrap; color: var(--text); }
.cat-section-header .line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* ─── GRID ─── */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ─── CARD ─── */
.pkg-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pkg-card:hover {
  transform: translateY(-5px);
  border-color: rgba(91,141,248,.45);
  box-shadow: 0 20px 50px rgba(91,141,248,.12);
}
.pkg-card.tier-gold:hover  { border-color: rgba(245,166,35,.45); box-shadow: 0 20px 50px rgba(245,166,35,.12); }
.pkg-card.tier-purple:hover{ border-color: rgba(159,92,247,.45); box-shadow: 0 20px 50px rgba(159,92,247,.12); }
.pkg-card.tier-cyan:hover  { border-color: rgba(34,211,238,.45); box-shadow: 0 20px 50px rgba(34,211,238,.12); }

/* ─── BANNER ─── */
.pkg-banner {
  height: 150px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pkg-banner.tier-blue   { background: linear-gradient(150deg,#060d2a 0%,#0d2580 100%); }
.pkg-banner.tier-purple { background: linear-gradient(150deg,#0d0520 0%,#3b0d82 100%); }
.pkg-banner.tier-cyan   { background: linear-gradient(150deg,#010f16 0%,#044d6b 100%); }
.pkg-banner.tier-gold   { background: linear-gradient(150deg,#130c00 0%,#5a3200 100%); }
.pkg-banner.tier-red    { background: linear-gradient(150deg,#130202 0%,#5a0a0a 100%); }
.pkg-banner.tier-green  { background: linear-gradient(150deg,#021008 0%,#0a4e1c 100%); }
.pkg-banner.tier-default{ background: linear-gradient(150deg,#080a18 0%,#121840 100%); }

.pkg-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 14px;
}
.pkg-banner-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(0,0,0,.0), rgba(0,0,0,.4));
  pointer-events: none;
}
.pkg-icon { font-size: 54px; line-height: 1; filter: drop-shadow(0 4px 18px rgba(0,0,0,.8)); }
.pkg-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 5px;
}
.pkg-badge.sale { background: rgba(240,64,64,.2); color: #ff8888; border: 1px solid rgba(240,64,64,.35); }
.pkg-badge.top  { background: rgba(245,166,35,.18); color: var(--gold); border: 1px solid rgba(245,166,35,.35); }
/* bottom fade */
.pkg-banner::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px;
  background: linear-gradient(transparent, var(--card)); pointer-events: none; z-index: 1;
}

/* ─── CARD BODY ─── */
.pkg-body { padding: 14px 16px 8px; flex: 1; }
.pkg-name { font-size: 15px; font-weight: 800; margin-bottom: 5px; }
.pkg-desc {
  font-size: 12.5px; color: var(--sub); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ─── CARD FOOTER ─── */
.pkg-footer {
  padding: 11px 16px 15px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.04);
}
.pkg-price-row { display: flex; align-items: baseline; gap: 8px; }
.pkg-price-orig { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.pkg-price-main { font-size: 24px; font-weight: 900; letter-spacing: -.5px; color: var(--text); }
.pkg-price-main.sale { color: var(--gold); }

.btn-add {
  width: 100%; padding: 11px 0; border-radius: 9px; border: none;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 800;
  font-family: inherit; cursor: pointer; letter-spacing: .02em;
  transition: opacity .15s, transform .1s;
}
.btn-add:hover { opacity: .85; transform: scale(1.02); }
.btn-add:active { transform: scale(.97); }

/* ─── ALERTS ─── */
.alert { padding: 13px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 22px; }
.alert-success { background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.2); color: #7ee8a2; }
.alert-info    { background: rgba(91,141,248,.07); border: 1px solid rgba(91,141,248,.2); color: #93b4fc; }
.alert-danger  { background: rgba(240,64,64,.07);  border: 1px solid rgba(240,64,64,.2);  color: #ff9090; }

/* ─── TRUST BAR ─── */
.trust-bar { border-top: 1px solid var(--border); background: var(--card); padding: 44px 28px; }
.trust-inner {
  max-width: 900px; margin: 0 auto; display: flex;
  flex-wrap: wrap; gap: 48px; justify-content: center; text-align: center;
}
.trust-item { display: flex; flex-direction: column; align-items: center; }
.trust-icon { font-size: 26px; margin-bottom: 8px; }
.trust-title { font-size: 13px; font-weight: 700; }
.trust-desc  { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ─── FOOTER ─── */
.footer {
  background: #040507; border-top: 1px solid var(--border);
  padding: 26px; text-align: center; color: var(--muted); font-size: 13px;
}
.footer a { color: var(--sub); }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 10px; }

/* ─── CATEGORY OVERVIEW GRID ─── */
.cat-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.cat-overview-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  color: var(--text);
}
.cat-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(91,141,248,.45);
  box-shadow: 0 20px 50px rgba(91,141,248,.12);
  color: var(--text);
}
.cat-ov-banner {
  height: 160px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cat-ov-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 22px; opacity: .85;
}
.cat-ov-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--card) 100%);
  pointer-events: none;
}
.cat-ov-icon { font-size: 60px; line-height: 1; filter: drop-shadow(0 4px 18px rgba(0,0,0,.8)); }
.cat-ov-body {
  padding: 16px 18px 14px;
  display: flex; align-items: center; justify-content: space-between; flex: 1;
}
.cat-ov-name { font-size: 17px; font-weight: 800; }
.cat-ov-count {
  font-size: 12px; color: var(--sub); font-weight: 600;
  background: rgba(255,255,255,.06); padding: 3px 10px; border-radius: 8px;
}
.cat-ov-arrow {
  padding: 0 18px 16px; font-size: 18px; color: var(--muted);
  transition: color .15s, transform .15s;
}
.cat-overview-card:hover .cat-ov-arrow { color: var(--blue); transform: translateX(4px); }

/* ─── EMPTY ─── */
.empty-store { text-align: center; padding: 90px 0; }
.empty-store .icon { font-size: 60px; margin-bottom: 20px; opacity: .3; }
.empty-store h3 { font-size: 20px; font-weight: 800; color: var(--sub); }
.empty-store p { color: var(--muted); margin-top: 8px; }

/* ─── BASKET ─── */
.basket-page { max-width: 680px; margin: 52px auto; padding: 0 24px 90px; }
.basket-page h1 { font-size: 26px; font-weight: 900; letter-spacing: -.5px; margin-bottom: 28px; }
.basket-empty { text-align: center; padding: 70px 0; color: var(--sub); }
.basket-empty .icon { font-size: 60px; margin-bottom: 18px; opacity: .3; }
.basket-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 10px;
}
.b-icon { font-size: 26px; min-width: 38px; text-align: center; }
.b-info { flex: 1; }
.b-name { font-weight: 700; }
.b-price { font-size: 18px; font-weight: 900; }
.btn-remove {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 16px; padding: 5px 8px; border-radius: 6px;
}
.btn-remove:hover { color: var(--danger); background: rgba(240,64,64,.08); }
.order-summary {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; margin-top: 20px;
}
.order-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  font-size: 14px; color: var(--sub);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.order-row:last-of-type { border-bottom: none; }
.order-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; font-size: 22px; font-weight: 900;
}
.btn-checkout {
  display: block; width: 100%; margin-top: 16px;
  background: var(--grad); color: #fff; font-weight: 900; font-size: 16px;
  padding: 15px; border-radius: 11px; border: none; cursor: pointer;
  font-family: inherit; transition: opacity .15s;
}
.btn-checkout:hover { opacity: .85; }

/* ─── USERNAME FORM ─── */
.username-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; max-width: 440px;
}
.username-card p { color: var(--sub); font-size: 14px; margin-bottom: 22px; line-height: 1.65; }
.form-label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.form-input {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 15px; color: var(--text);
  font-size: 15px; outline: none; font-family: inherit; transition: border-color .2s;
}
.form-input:focus { border-color: var(--blue); }
.form-input::placeholder { color: var(--muted); }

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  .store-main { padding: 28px 16px 70px; }
  .store-hero { padding: 70px 18px 60px; }
  .nav { padding: 0 16px; }
  .pkg-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) { .pkg-grid { grid-template-columns: 1fr; } }
