:root {
  --bg: #070b12;
  --bg-2: #0d1420;
  --panel: rgba(16, 24, 38, 0.78);
  --border: rgba(212, 167, 76, 0.22);
  --border-hi: rgba(232, 190, 100, 0.65);
  --gold: #e3b45a;
  --gold-2: #ffdf95;
  --gold-dark: #9a6a1e;
  --ice: #8cc8e8;
  --text: #e8edf5;
  --muted: #8a96a8;
  --green: #5ee08a;
  --red: #ef5b5b;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Rubik", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% -10%, #1b2a44 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Фон: замъкът (bg.js) ---------- */
#bg {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 100%;
  image-rendering: pixelated;
}
.shade {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 22%, rgba(5, 7, 14, 0.45), transparent 75%),
    linear-gradient(180deg, rgba(5, 7, 14, 0.1) 0%, rgba(5, 7, 14, 0.35) 45%, rgba(5, 7, 14, 0.8) 100%);
}
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
#bg3d {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
#bg3d.ready { opacity: 1; }
html:not([data-bg="3d"]) #bg3d { display: none; }
/* 3D фонът е дневен и светъл -> повече затъмняване за четимост */
html[data-bg="3d"] .shade {
  background:
    radial-gradient(ellipse 65% 50% at 50% 20%, rgba(5, 7, 14, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(5, 7, 14, 0.25) 0%, rgba(5, 7, 14, 0.45) 45%, rgba(5, 7, 14, 0.85) 100%);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  text-align: center;
  padding: 72px 16px 40px;
}
.runes {
  font-size: 18px; letter-spacing: 6px;
  color: var(--ice); opacity: 0.6;
  margin-bottom: 8px;
}
.logo {
  font-family: "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(48px, 11vw, 120px);
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(180deg, #ff9a86 0%, #ee3a3a 42%, #b3161d 70%, #6e0a0f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #2a0406) drop-shadow(0 0 30px rgba(238, 58, 58, 0.4));
  text-decoration: none;
}
.logo-sm { font-size: clamp(34px, 6vw, 52px); display: inline-block; }
.tagline {
  margin-top: 12px;
  font-family: "Cinzel", serif; font-weight: 600;
  color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; font-size: 13px;
}

.ip-box {
  margin-top: 32px;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  background: var(--panel);
  border: 1px solid var(--border-hi);
  border-radius: 999px;
  color: var(--text);
  font: 500 17px "Rubik", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 4px rgba(227, 180, 90, 0.06), 0 10px 30px rgba(0,0,0,0.4);
  transition: transform .15s, box-shadow .15s;
  max-width: 100%;
}
.ip-box:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(227,180,90,.15), 0 14px 34px rgba(0,0,0,.5); }
.ip-label {
  font-weight: 700; font-size: 12px; letter-spacing: .1em;
  background: var(--gold); color: #1a1205;
  padding: 4px 8px; border-radius: 6px;
}
.ip-text { font-family: ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-box.pending .ip-text { color: var(--muted); font-family: inherit; font-style: italic; }
.ip-copy { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2; flex-shrink: 0; }

/* ---------- Layout ---------- */
.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }

.links {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}

.card {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  backdrop-filter: blur(6px);
  transition: border-color .2s, transform .2s, background .2s;
  overflow: hidden;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-3px); background: rgba(22, 32, 50, 0.85); }
.card h3 { font-size: 17px; font-weight: 700; }
.card p { font-size: 13px; color: var(--muted); margin-top: 3px; }

.card-store {
  grid-row: span 2;
  flex-direction: column; justify-content: center; text-align: center;
  padding: 36px 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(227,180,90,.18), transparent 65%),
    var(--panel);
  border-color: rgba(227,180,90,.4);
}
.card-store h2 { font-family: "Cinzel", serif; font-size: 30px; font-weight: 800; color: var(--gold-2); }
.card-store p { font-size: 15px; }

.card-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(227,180,90,.1);
  border: 1px solid var(--border);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-icon.big { width: 84px; height: 84px; border-radius: 20px; }
.card-icon.big svg { width: 44px; height: 44px; }

.card.soon::after {
  content: "СКОРО";
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 3px 7px; border-radius: 5px;
  color: var(--ice); background: rgba(140,200,232,.1); border: 1px solid rgba(140,200,232,.3);
}

/* ---------- Ranks ---------- */
.ranks-section { margin-top: 64px; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-head .muted { margin-top: 10px; line-height: 1.6; font-size: 15px; }
.section-head code {
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.08); color: var(--text);
}
.section-title {
  font-family: "Cinzel", serif; font-weight: 900;
  font-size: clamp(30px, 5vw, 44px); letter-spacing: .04em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #3a2508);
}
.plat { color: var(--ice); }

.ranks { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.rank {
  position: relative;
  flex: 1 1 190px; max-width: 250px;
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.rank:hover {
  transform: translateY(-5px);
  border-color: var(--c);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--c) 22%, transparent);
}
.rank.featured {
  border-color: var(--c);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 10px 40px color-mix(in srgb, var(--c) 20%, transparent);
}
.rank-badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  color: #1a1205; background: var(--c);
}
.rank-stage {
  position: relative; height: 210px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 20px;
  background:
    radial-gradient(ellipse 60% 55% at 50% 80%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, .35));
  border-bottom: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
}
.rank-stage svg {
  position: relative; z-index: 1;
  width: 104px; height: auto;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 45%, transparent));
  transition: transform .3s;
}
.rank:hover .rank-stage svg { transform: translateY(-4px) scale(1.05); }
.pedestal {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 14px;
  background: linear-gradient(180deg, #6f665d, #3f3a35);
  border-top: 2px solid var(--c);
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
}
.rank-body { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; }
.rank-name {
  font-family: "Cinzel", serif; font-weight: 900; font-size: 24px;
  color: var(--c); text-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent);
}
.rank-price { margin-top: 4px; font-weight: 700; font-size: 16px; }
.rank-req { margin-top: 2px; font-size: 12px; color: var(--muted); }
.rank-perks { list-style: none; margin: 14px 0 18px; display: grid; gap: 6px; font-size: 13px; }
.rank-perks li { padding-left: 16px; position: relative; line-height: 1.4; }
.rank-perks li::before { content: "▸"; position: absolute; left: 0; color: var(--c); }
.rank-btn {
  margin-top: auto;
  display: block; text-align: center;
  padding: 10px; border-radius: 10px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  transition: background .2s, color .2s;
}
.rank-btn:hover { background: var(--c); color: #120d05; }
.rank-btn.primary { background: var(--c); color: #120d05; border-color: var(--c); }
.rank-btn.primary:hover { filter: brightness(1.1); }
.rank-days { color: var(--text); font-weight: 500; }
.rank-alt { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted); text-decoration: underline dotted; }
.rank-alt:hover { color: var(--c); }

/* ---------- Platinum packs ---------- */
.plat-section { margin-top: 72px; scroll-margin-top: 24px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pack {
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 20px 20px;
  background:
    radial-gradient(circle at 50% 18%, rgba(140, 200, 232, .14), transparent 55%),
    var(--panel);
  border: 1px solid rgba(140, 200, 232, .22);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.pack:hover { transform: translateY(-4px); border-color: rgba(140, 200, 232, .6); box-shadow: 0 14px 40px rgba(92, 200, 255, .12); }
.pack.best { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(227,180,90,.35), 0 10px 40px rgba(227,180,90,.15); }
.pack-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  color: var(--ice); background: rgba(140,200,232,.1); border: 1px solid rgba(140,200,232,.3);
}
.pack-ribbon {
  position: absolute; top: 12px; left: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
  color: #1a1205; background: var(--gold);
}
.pack-icon { display: flex; justify-content: center; margin: 8px 0 16px; }
.gem {
  width: 84px; height: auto;
  filter: drop-shadow(0 0 16px rgba(127, 203, 240, .45));
  animation: bob 3.2s ease-in-out infinite;
}
.pack:nth-child(2n) .gem { animation-delay: -1.6s; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.pack-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pack-title h3 { font-family: "Cinzel", serif; font-weight: 800; font-size: 19px; color: var(--ice); }
.pack-bonus {
  font-size: 11px; font-weight: 700; white-space: nowrap;
  padding: 3px 8px; border-radius: 6px;
  color: #1a1205; background: var(--gold);
}
.pack-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.pack-rate { margin-top: 2px; font-size: 12px; color: var(--muted); opacity: .8; }
.pack-price {
  margin: 18px 0 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-family: "Cinzel", serif; font-weight: 900; font-size: 32px;
  color: var(--green); text-shadow: 0 0 18px rgba(94, 224, 138, .25);
}
.pack-btn {
  margin-top: auto;
  display: block; text-align: center;
  padding: 12px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  color: #1a1205;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #c8913a);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.2);
  transition: filter .2s, transform .1s;
}
.pack-btn:hover { filter: brightness(1.08); }
.pack-btn:active { transform: translateY(1px); }

.bg-switch a { color: var(--muted); text-decoration: underline dotted; }
.bg-switch a:hover { color: var(--gold); }
.bg-switch b { color: var(--text); font-weight: 500; }
html { scroll-behavior: smooth; }

/* ---------- Topbar / account / cart ---------- */
.topbar {
  position: absolute; top: 14px; left: 16px; right: 16px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar .account-slot { margin-left: auto; }
.account-slot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.account, .cart-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px; border-radius: 12px;
  background: rgba(10, 14, 22, 0.82);
  border: 1px solid rgba(238, 58, 58, 0.35);
  backdrop-filter: blur(6px);
}
.acc-user { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; padding-right: 4px; }
.acc-user b { font-size: 14px; }
.acc-avatar { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; background: #222; }
.rank-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.rank-chip.big { font-size: 12px; padding: 5px 12px; }
.acc-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 8px;
  font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
}
.plat-chip { color: var(--ice); }
.vote-chip { color: var(--gold); }
.vote-chip svg, .acc-icon svg, .acc-login svg, .cart-btn svg, .pack-add svg, .modal-x svg, .drawer-head svg, .profile-uuid svg, .back-btn svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.gem-sm { width: 18px; height: auto; }
.acc-icon, .acc-login, .cart-btn, .back-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--text); font: 500 14px "Rubik", sans-serif; cursor: pointer;
}
.acc-icon { padding: 6px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.acc-icon:hover { color: #ff6b6b; border-color: rgba(255,107,107,.5); }
.acc-login { padding: 4px 10px; background: none; border: 0; }
.acc-login:hover, .cart-btn:hover { color: var(--gold-2); }
.cart-btn { padding: 6px 8px 6px 12px; }
.cart-count {
  min-width: 24px; text-align: center; padding: 3px 6px; border-radius: 6px;
  background: rgba(255,255,255,.07); font-size: 13px;
}
.back-btn {
  width: 40px; height: 40px; justify-content: center; border-radius: 10px; text-decoration: none;
  background: rgba(10, 14, 22, 0.82); border: 1px solid rgba(238, 58, 58, 0.35);
}
.back-btn svg { width: 20px; height: 20px; }
.back-btn:hover { color: var(--gold-2); }

/* ---------- Store page ---------- */
.store-head {
  position: relative; z-index: 1; text-align: center;
  padding: 26px 16px 22px;
  background: linear-gradient(180deg, rgba(5,7,14,.65), rgba(5,7,14,.35));
  border-bottom: 1px solid rgba(238, 58, 58, 0.25);
}
.store-head.slim { background: none; border: 0; padding-top: 70px; }
.store-head .back-btn { position: absolute; left: 16px; top: 18px; }
.store-title {
  margin-top: 6px;
  font-family: "Cinzel", serif; font-weight: 800; font-size: 20px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold);
}
.store-meta { margin-top: 6px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.store-meta .mono { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.store-meta .online { display: flex; align-items: center; gap: 6px; }
.store-meta .online b { color: var(--text); }
.store-meta .dot { width: 8px; height: 8px; }
.store-nav {
  position: sticky; top: 0; z-index: 4;
  background: rgba(7, 10, 17, 0.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(238, 58, 58, 0.25);
}
.store-nav-in {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.nav-links a:hover { background: rgba(255,255,255,.06); color: var(--gold-2); }
.notice {
  margin: 26px 0 0; padding: 12px 16px; border-radius: 10px; text-align: center; font-size: 13px;
  color: #f3d9a8; background: rgba(120, 70, 10, .28); border: 1px solid rgba(227, 180, 90, .35);
}
.store-sec {
  display: flex; align-items: center; gap: 10px;
  font-family: "Cinzel", serif; font-weight: 800; font-size: 22px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold);
}
.store-sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(227,180,90,.5), transparent); }
.store-sec-sub { margin: 6px 0 18px; font-size: 14px; }
.plat-section.first, .ranks-section.first { margin-top: 32px; }
.ranks-section { scroll-margin-top: 70px; }

/* бутони на пакетите */
.pack-actions { margin-top: auto; display: flex; gap: 8px; }
.pack-actions .pack-btn { flex: 1; margin-top: 0; }
.pack-add {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; border-radius: 10px; cursor: pointer;
  font: 700 13px "Rubik", sans-serif; color: var(--text);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
}
.pack-add:hover { border-color: var(--ice); color: var(--ice); }

/* ---------- Modal & drawer ---------- */
.modal, .drawer {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(3, 5, 10, .7); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.open, .drawer.open { opacity: 1; pointer-events: auto; }
.modal { display: grid; place-items: center; padding: 16px; }
.modal-box {
  position: relative; width: min(380px, 100%);
  padding: 28px 24px 24px; text-align: center;
  background: #0f1622; border: 1px solid rgba(238,58,58,.4); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.modal-box h2 { font-family: "Cinzel", serif; font-weight: 900; font-size: 26px; margin-top: 12px; color: var(--gold-2); }
.modal-box p { margin-top: 6px; font-size: 14px; line-height: 1.5; }
.modal-head { display: flex; justify-content: center; }
.modal-avatar { width: 72px; height: 72px; image-rendering: pixelated; border-radius: 10px; border: 2px solid rgba(238,58,58,.5); background: #222; }
.modal-box input[type="text"] {
  width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  font: 500 16px "Rubik", sans-serif; color: var(--text);
  background: #070b12; border: 1px solid rgba(255,255,255,.15); outline: none;
}
.modal-box input[type="text"]:focus { border-color: var(--gold); }
.pay-agree input { width: 16px; height: 16px; flex-shrink: 0; }
.modal-err { min-height: 18px; color: #ff7a7a; font-size: 13px !important; }
.modal-ok {
  width: 100%; margin-top: 6px; padding: 12px; border: 0; border-radius: 10px; cursor: pointer;
  font: 700 15px "Rubik", sans-serif; color: #1a1205;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #c8913a);
}
.modal-x {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.modal-x:hover { color: var(--text); }
.drawer-box {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%);
  display: flex; flex-direction: column;
  background: #0f1622; border-left: 1px solid rgba(238,58,58,.35);
  transform: translateX(100%); transition: transform .25s;
}
.drawer.open .drawer-box { transform: none; }
.drawer-head { position: relative; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.drawer-head h2 { display: flex; align-items: center; gap: 8px; font-family: "Cinzel", serif; font-size: 20px; color: var(--gold-2); }
.drawer-head .modal-x { top: 14px; right: 14px; }
.drawer-list { flex: 1; overflow-y: auto; padding: 14px 20px; display: grid; gap: 10px; align-content: start; }
.drawer-empty { text-align: center; padding: 40px 0; display: grid; gap: 10px; justify-items: center; }
.drawer-empty .gem { width: 64px; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.cart-item .gem-sm { width: 28px; }
.cart-info { flex: 1; display: grid; gap: 2px; font-size: 14px; }
.cart-info .muted { font-size: 12px; }
.cart-qty { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cart-qty button {
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  color: var(--text); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: 16px; line-height: 1;
}
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.drawer-total b { font-family: "Cinzel", serif; font-size: 26px; color: var(--green); }
.drawer-plat { font-size: 13px; }
.drawer-pay { border: 0; cursor: pointer; font-family: "Rubik", sans-serif; }
.drawer-pay:disabled { opacity: .45; cursor: not-allowed; }
.drawer-note { font-size: 11px; text-align: center; }

/* ---------- Payment ---------- */
.pay-box { width: min(460px, 100%); text-align: left; max-height: calc(100vh - 32px); overflow-y: auto; }
.pay-box h2 { margin-top: 0; text-align: center; }
.pay-who { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 8px; font-size: 14px; color: var(--muted); }
.pay-who b { color: var(--text); }
.pay-sum { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); display: grid; gap: 6px; font-size: 14px; }
.pay-sum div { display: flex; justify-content: space-between; gap: 10px; }
.pay-total { padding-top: 8px; margin-top: 2px; border-top: 1px solid rgba(255,255,255,.08); }
.pay-total b { color: var(--green); font-size: 18px; }
.pay-label { margin: 16px 0 8px !important; font-size: 12px !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.pay-methods { display: grid; gap: 8px; }
.pm {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12);
  transition: border-color .15s, background .15s;
}
.pm:hover { border-color: rgba(255,255,255,.3); }
.pm.on { border-color: var(--gold); background: rgba(227,180,90,.08); }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm-radio { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); }
.pm.on .pm-radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 0 4px, transparent 5px); }
.pm-text { flex: 1; display: grid; gap: 2px; }
.pm-text b { font-size: 15px; }
.pm-text small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pm-logos { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pm-visa {
  font: italic 900 13px/1 Arial, sans-serif; letter-spacing: .02em; color: #fff;
  background: #1a1f71; padding: 5px 7px; border-radius: 4px;
}
.pm-mc { width: 34px; height: 22px; background: #fff; border-radius: 4px; padding: 2px; }
.pm-revolut { font: 700 13px/1 "Rubik", sans-serif; color: #fff; background: #191c1f; border: 1px solid #444; padding: 5px 8px; border-radius: 4px; }
.pm-easypay { font: 700 13px/1 "Rubik", sans-serif; color: #fff; background: #d6202a; padding: 5px 8px; border-radius: 4px; }
.pm-easypay b { color: #ffd84d; }
.pay-tebex {
  display: grid; gap: 10px; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12);
}
.pay-tebex .pm-logos { flex-wrap: wrap; }
.pay-tebex small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.pay-tebex small b { color: var(--text); }
.pm-paypal { font: italic 800 13px/1 Arial, sans-serif; color: #003087; background: #fff; padding: 5px 7px; border-radius: 4px; }
.pm-paypal b { color: #009cde; }
.pm-wallet { font: 600 12px/1 "Rubik", sans-serif; color: #fff; background: #000; border: 1px solid #555; padding: 5px 8px; border-radius: 4px; }
.pay-agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.pay-agree input { margin-top: 3px; accent-color: var(--gold); }
.pay-secure { text-align: center; font-size: 12px !important; }
.modal-ok:disabled { opacity: .6; cursor: wait; }
@media (max-width: 420px) { .pm { flex-wrap: wrap; } .pm-logos { margin-left: 30px; } }

/* ---------- Profile page ---------- */
.profile { max-width: 940px; padding-top: 10px; }
.profile-head { text-align: center; display: grid; justify-items: center; gap: 10px; margin-bottom: 30px; }
.profile-frame {
  padding: 12px; border-radius: 14px;
  background: rgba(10, 14, 22, .85); border: 2px solid rgba(238, 58, 58, .45);
  box-shadow: 0 0 30px rgba(238, 58, 58, .15);
}
.profile-avatar { display: block; width: 128px; height: 128px; image-rendering: pixelated; border-radius: 6px; background: #222; }
.profile-name { font-family: "Cinzel", serif; font-weight: 900; font-size: 36px; margin-top: 6px; }
.profile-uuid {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  font: 500 12px "Rubik", sans-serif; color: var(--muted); background: none; border: 1px solid rgba(255,255,255,.12);
}
.profile-uuid:hover { color: var(--text); }
.profile-seen { font-size: 13px; }
.profile-login { max-width: 420px; margin: 20px auto; text-align: center; display: grid; justify-items: center; gap: 10px; }
.profile-login .profile-avatar { width: 96px; height: 96px; }
.profile-login .panel-title { border: 0; margin: 4px 0 0; padding: 0; }
.profile-login .pack-btn { width: 100%; border: 0; cursor: pointer; font-family: "Rubik", sans-serif; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.stat {
  grid-column: span 2;
  display: flex; gap: 14px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid rgba(238, 58, 58, .25);
  backdrop-filter: blur(6px);
}
.stat:nth-child(4), .stat:nth-child(5) { grid-column: span 3; }
.stat-icon {
  width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: var(--gold);
}
.stat-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon .gem-stat { width: 28px; height: auto; }
.stat h3 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.stat-val { margin-top: 4px; font-family: "Cinzel", serif; font-weight: 900; font-size: 26px; }
.stat p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.s-plat .stat-val { color: var(--ice); }
.s-gold .stat-val { color: var(--gold-2); }
.s-green .stat-val { color: var(--green); }
.s-red .stat-val { color: #ff6b6b; }
.s-green .stat-icon { color: var(--green); }
.s-red .stat-icon { color: #ff6b6b; }
.profile-note { text-align: center; margin-top: 20px; font-size: 13px; }

/* ---------- Panels ---------- */
.panels {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.panel p { line-height: 1.6; font-size: 14px; }
.panel p + p { margin-top: 8px; }
.panel-title {
  font-family: "Cinzel", serif; font-weight: 800;
  font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.muted { color: var(--muted); }

.status { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 10px var(--red); }
.players { margin-top: 18px; font-family: "Cinzel", serif; font-weight: 900; font-size: 44px; color: var(--gold-2); }
.players small { font-size: 22px; color: var(--muted); }

.steps { padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.steps li::marker { color: var(--gold); font-weight: 700; }

/* ---------- Footer / toast ---------- */
.footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 10;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; border-radius: 10px;
  background: #1a2335; border: 1px solid var(--border-hi);
  font-weight: 500; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .links { grid-template-columns: 1fr 1fr; }
  .card-store { grid-column: span 2; grid-row: auto; }
  .panels { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat:nth-child(4), .stat:nth-child(5) { grid-column: auto; }
  .stat:first-child { grid-column: span 2; }
  .hero { padding-top: 96px; }
}
@media (max-width: 480px) {
  .links { grid-template-columns: 1fr; }
  .card-store { grid-column: auto; }
  .rank { max-width: none; }
  .packs { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .cart-btn > span, .acc-login > span { display: none; }
  .account { gap: 6px; }
  .acc-user b { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .store-nav-in { justify-content: center; }
  .store-nav { position: relative; }
  .stats { grid-template-columns: 1fr; }
  .stat:first-child { grid-column: auto; }
  .hero { padding-top: 48px; }
}