:root {
  --bg: #0b0813;
  --panel: #131022;
  --line: rgba(255,255,255,0.07);
  --text: #eef0f6;
  --muted: #8b93a7;
  --accent: #A855F7;
  --accent2: #7C3AED;
  --rank-signal: #A855F7;
  --rank-mvp: #2DD4BF;
  --rank-vip: #1FE01F;
  --crate-battle: #55FF55;
  --crate-conquest: #55FFFF;
  --crate-tracker: #b06be8;
  --crate-titan: #ef4056;
  --crate-spawner: #FFAA00;
}

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

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2a2145;
  border-radius: 8px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-corner { background: var(--bg); }

@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: #2a2145 var(--bg); }
}

[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button { font-family: inherit; }

.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,8,19,0.94);
  border-bottom: 1px solid var(--line);
}

.nav-home {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-home:hover { opacity: 0.85; }

.nav-home img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.wordmark {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  word-spacing: -0.6em;
}

.page { display: none; flex: 1; }
.page.active { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-accent { background: var(--accent2); }
.btn-accent:hover { background: #8b4ef0; }

.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.14); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.btn-block { width: 100%; }

.hero-row {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.6rem 2rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.hero-id {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.6rem 0;
}

.hero-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  margin-bottom: 1.1rem;
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.25rem;
  letter-spacing: 2px;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.hero-online {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.ping {
  height: 12px;
  width: auto;
  image-rendering: pixelated;
}

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 22px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.72rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.ip-chip:hover { border-color: rgba(168,85,247,0.55); }
.ip-chip i { color: var(--muted); font-size: 0.95rem; }

.hero-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.home-sections {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.store-panel {
  cursor: pointer;
  transition: border-color 0.15s;
}

.panel.store-panel {
  background:
    linear-gradient(rgba(14,10,24,0.72), rgba(14,10,24,0.84)),
    url('../img/spawn1.jpg') center 30% / cover no-repeat;
}

.store-panel .panel-label { text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.store-panel .sp-name,
.store-panel .spc-name { text-shadow: 0 1px 4px rgba(0,0,0,0.9); }
.store-panel .sp-price,
.store-panel .spc-price { color: #cdd3e1; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.store-panel:hover { border-color: rgba(168,85,247,0.5); }

.store-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  margin: 0.5rem 0 1rem;
  flex: 1;
}

.sp-rank { text-align: center; }

.sp-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.15rem;
  margin-bottom: 11px;
}
.sp-vip { color: var(--rank-vip); }
.sp-mvp { color: var(--rank-mvp); }
.sp-signal { color: var(--rank-signal); }

.sp-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

.store-crates {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.9rem;
  flex: 1;
  margin-bottom: 1.05rem;
  cursor: pointer;
}

.crates-teaser { margin-top: 2.4rem; }

.panel.store-panel.crates-teaser {
  position: relative;
  overflow: hidden;
  background: var(--panel);
}

.crates-teaser::before {
  content: '';
  position: absolute;
  inset: -14px;
  background:
    linear-gradient(rgba(14,10,24,0.6), rgba(14,10,24,0.78)),
    url('../img/spawn3.jpg') center 32% / cover no-repeat;
  filter: blur(3px);
}

.crates-teaser > * {
  position: relative;
  z-index: 1;
}

.crates-teaser .store-crates {
  margin: 0.3rem 0 1.15rem;
  gap: 1.3rem 1.9rem;
}

.crates-teaser .btn {
  align-self: center;
  padding: 11px 34px;
}

.spc { text-align: center; }

.spc-name {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.spc-battle { color: var(--crate-battle); }
.spc-conquest { color: var(--crate-conquest); }
.spc-titan { color: var(--crate-titan); }
.spc-spawner { color: var(--crate-spawner); }
.spc-tracker { color: var(--crate-tracker); }

.spc-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
}

.thumb-link {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.thumb-link img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.thumb-play {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-play i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.95rem;
  padding-left: 3px;
  transition: background 0.15s;
}
.thumb-link:hover .thumb-play i { background: var(--accent2); }

.thumb-link { text-decoration: none; cursor: pointer; }

.thumb-link iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
}

.panel-label {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e3e7f0;
  margin-bottom: 1rem;
}

.join-fields {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  flex: 1;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 9px;
  padding: 18px 16px;
}

.fr-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.fr-value {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.fr-value i { color: var(--muted); font-size: 0.9rem; }

.field-row.copyable { cursor: pointer; transition: background 0.15s; }
.field-row.copyable:hover { background: rgba(255,255,255,0.1); }

.field-row.plain {
  background: none;
  padding-top: 4px;
  padding-bottom: 4px;
}

.join-xbox {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  padding: 4px 16px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.join-xbox i { font-size: 1.05rem; color: #8a93a8; flex-shrink: 0; }
.join-xbox strong { color: #cdd3e1; }

.panel-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #aeb6c9;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

.store-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.store-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 1.6rem;
}

.store-center { justify-self: center; }

.user-login {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.user-login:hover { border-color: rgba(168,85,247,0.5); color: var(--text); }
.user-login[hidden] { display: none; }

.store-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.store-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  justify-self: end;
}

.cart-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--panel);
  border: 1px solid rgba(168,85,247,0.5);
  border-radius: 12px;
  padding: 14px;
  z-index: 120;
  box-shadow: 0 14px 34px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}

.cart-pop.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cart-pop-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 0.88rem;
}

.cart-pop-title i { color: var(--rank-vip); }

.cart-pop-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 3px 0 11px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px 6px 7px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.user-chip:hover, .user-chip.active { border-color: rgba(168,85,247,0.5); }
.user-chip[hidden] { display: none; }

.user-chip img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  image-rendering: pixelated;
}

.chip-cart {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  white-space: nowrap;
}

.seg {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent2); color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.rank-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}

.rank-name {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.r-vip .rank-name { color: var(--rank-vip); }
.r-mvp .rank-name { color: var(--rank-mvp); }
.r-signal .rank-name { color: var(--rank-signal); }

.rank-price {
  font-size: 1.5rem;
  font-weight: 900;
}
.rank-price span { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-left: 2px; }

.rank-lifetime {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 1.2em;
}

.rank-perks {
  list-style: none;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 1.2rem;
}

.rank-perks li {
  font-size: 0.86rem;
  font-weight: 600;
  color: #aeb6c9;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rank-perks li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
}
.r-vip .rank-perks li::before { background: var(--rank-vip); }
.r-mvp .rank-perks li::before { background: var(--rank-mvp); }
.r-signal .rank-perks li::before { background: var(--rank-signal); }

.btn-rank { width: 100%; background: rgba(255,255,255,0.07); }
.r-vip .btn-rank:not(.in-cart):hover { background: var(--rank-vip); color: #0a2404; }
.r-mvp .btn-rank:not(.in-cart):hover { background: var(--rank-mvp); color: #04231f; }
.r-signal .btn-rank:not(.in-cart):hover { background: var(--rank-signal); color: #fff; }

.btn-life {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 9px;
  margin-bottom: 8px;
}
.btn-life:not(.in-cart):hover { color: var(--text); background: rgba(255,255,255,0.05); }

.btn.in-cart { background: rgba(168,85,247,0.13); color: var(--accent); }
.btn-life.in-cart { border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }

.btn-rank.in-cart:hover { background: rgba(239,64,86,0.13); color: #ef4056; }
.btn-life.in-cart:hover { background: rgba(239,64,86,0.1); border-color: rgba(239,64,86,0.35); color: #ef4056; }

.crate-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.crate-grid .crate-card { width: calc((100% - 28px) / 3); }

.crate-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}

.crate-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.crate-name i { font-size: 0.85rem; }
.c-battle .crate-name { color: var(--crate-battle); }
.c-conquest .crate-name { color: var(--crate-conquest); }
.c-titan .crate-name { color: var(--crate-titan); }
.c-spawner .crate-name { color: var(--crate-spawner); }
.c-tracker .crate-name { color: var(--crate-tracker); }

.crate-price {
  font-size: 1.5rem;
  font-weight: 900;
}
.crate-price span { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-left: 2px; }

.crate-desc {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.crate-rewards {
  list-style: none;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  margin-bottom: 1.2rem;
}

.crate-rewards li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #aeb6c9;
}

.crate-rewards li > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crate-rewards li > span:first-child::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.c-battle .crate-rewards li > span:first-child::before { background: var(--crate-battle); }
.c-conquest .crate-rewards li > span:first-child::before { background: var(--crate-conquest); }
.c-titan .crate-rewards li > span:first-child::before { background: var(--crate-titan); }
.c-spawner .crate-rewards li > span:first-child::before { background: var(--crate-spawner); }
.c-tracker .crate-rewards li > span:first-child::before { background: var(--crate-tracker); }

.reward-tag {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  padding: 2px 8px;
  color: var(--muted);
  white-space: nowrap;
}

.crate-buy {
  display: flex;
  gap: 8px;
}

.qty {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  flex-shrink: 0;
}

.qty-btn {
  background: none;
  border: none;
  width: 34px;
  align-self: stretch;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s, background 0.15s;
}
@media (hover: hover) {
  .qty-btn:hover { color: var(--text); background: rgba(255,255,255,0.07); }
}

.qty-val {
  min-width: 26px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.btn-crate { flex: 1; background: rgba(255,255,255,0.07); padding: 12px 10px; font-size: 0.88rem; white-space: nowrap; }
.c-battle .btn-crate:hover { background: var(--crate-battle); color: #0a2404; }
.c-conquest .btn-crate:hover { background: var(--crate-conquest); color: #042a2a; }
.c-titan .btn-crate:hover { background: var(--crate-titan); color: #fff; }
.c-spawner .btn-crate:hover { background: var(--crate-spawner); color: #2a1c04; }
.c-tracker .btn-crate:hover { background: var(--crate-tracker); color: #fff; }

.cart-inner { max-width: 720px; margin: 0 auto; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cart-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.cart-total {
  font-size: 1.05rem;
  font-weight: 900;
}

.qty-static {
  font-size: 0.9rem;
  font-weight: 800;
  padding-left: 13px;
}

.signed-in {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.si-head {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  image-rendering: pixelated;
}

.si-who { flex: 1; }

.si-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}

.si-name {
  font-size: 1.05rem;
  font-weight: 900;
}

.si-switch { padding: 9px 14px; font-size: 0.8rem; }

.cart-panel { margin-bottom: 14px; }

.cart-cols,
.cart-row {
  display: grid;
  grid-template-columns: 1fr 90px 110px 34px;
  align-items: center;
  gap: 10px;
}

.cart-cols {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cart-row { padding: 12px 0; }
.cart-row + .cart-row { border-top: 1px solid var(--line); }

.cr-name { font-size: 0.9rem; font-weight: 800; }
.cr-price { font-size: 0.9rem; font-weight: 700; color: var(--muted); }

.cart-row .qty { justify-self: start; }

.cr-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}
@media (hover: hover) {
  .cr-remove:hover { color: #ef4056; background: rgba(239,64,86,0.1); }
}

.upsell {
  padding: 1.1rem 1.4rem;
  margin-bottom: 14px;
}

.upsell-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 4px;
}

.up-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.up-row + .up-row { border-top: 1px solid var(--line); }

.up-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.up-icon {
  width: 22px;
  display: flex;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.up-name {
  font-size: 0.88rem;
  font-weight: 800;
}

.up-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.up-price {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--muted);
}

.up-add {
  padding: 8px 18px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.07);
}
@media (hover: hover) {
  .up-add:hover { background: var(--accent2); }
}

.cart-warn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 2px 0 14px;
  text-align: center;
}

.cart-warn div {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ef4056;
}

#checkoutBtn:disabled { opacity: 0.45; cursor: not-allowed; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 2.4rem 0 1.4rem;
}

.cart-empty i {
  font-size: 1.9rem;
  color: #3a3357;
  margin-bottom: 6px;
}

.cart-empty p {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.linklike {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}
.linklike:hover { text-decoration: underline; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 420px;
  max-width: 92vw;
}

.modal-inner {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
}

#userForm {
  display: flex;
  gap: 8px;
  width: 100%;
}

#userInput {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
#userInput:focus { border-color: rgba(168,85,247,0.55); }
#userInput.invalid { border-color: #ef4056; }
#userInput::placeholder { color: #626a7d; }

.modal-guest {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.modal-guest:hover { color: var(--text); text-decoration: underline; }

footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
}

.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #aeb6c9;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.footer-link:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  max-width: 1040px;
  margin: 0.9rem auto 0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-disclaimers {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-disclaimer {
  font-size: 0.74rem;
  font-weight: 600;
  color: #626a7d;
}

.footer-disclaimer a {
  color: inherit;
  text-decoration: none;
}
.footer-disclaimer a:hover { color: var(--text); text-decoration: underline; }

.footer-mail {
  font-size: 0.74rem;
  font-weight: 600;
  color: #626a7d;
  text-decoration: none;
}
.footer-mail:hover { color: var(--text); text-decoration: underline; }

.copied-icon { color: #22c55e !important; }

@media (max-width: 1100px) {
  .sp-name { font-size: 0.92rem; }
  .sp-price { font-size: 0.92rem; }
  .store-preview { gap: 2rem; }
}

@media (max-width: 900px) {
  .hero-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .hero-row { grid-template-columns: minmax(0, 1fr); }
  .panels { grid-template-columns: 1fr; }
  .store-preview { gap: 1.6rem; }
  .rank-grid { grid-template-columns: 1fr; }
  .crate-grid .crate-card { width: 100%; }
  .store-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 10px; position: relative; }
  .store-title { width: 100%; }
  .store-right { max-width: 100%; position: static; }
  .cart-pop { top: calc(100% + 6px); }
  .user-chip { min-width: 0; max-width: 100%; }
  #chipName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero-actions { flex-direction: column; width: 100%; }
  .ip-chip { justify-content: center; }
  .cart-cols { display: none; }
  .cart-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name remove" "qty price";
    row-gap: 12px;
    padding: 14px 0;
  }
  .cart-row .cr-name { grid-area: name; }
  .cart-row .cr-remove { grid-area: remove; justify-self: end; font-size: 1rem; padding: 8px 10px; }
  .cart-row .qty, .cart-row .qty-static { grid-area: qty; }
  .cart-row .qty-static { padding-left: 0; color: var(--muted); }
  .cart-row .qty-static::before { content: 'Qty '; }
  .cart-row .cr-price { grid-area: price; justify-self: end; color: var(--text); font-weight: 800; }
  .qty-btn { width: 42px; min-height: 40px; }
  .signed-in { flex-wrap: wrap; }
  .up-row { gap: 8px; }
  .up-right { gap: 10px; }
}

@media (max-width: 480px) {
  .si-switch { flex-basis: 100%; padding: 11px 14px; }
}

.success-inner { text-align: center; }

.success-check { margin-bottom: 12px; }

.success-check img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  image-rendering: pixelated;
}

.success-msg {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 4px 0 18px;
}
.success-msg span { color: var(--text); }

.success-support {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 12px;
}
.success-support a { color: var(--accent); text-decoration: none; }
.success-support a:hover { text-decoration: underline; }

.join-xbox a { color: inherit; text-decoration: none; }
.join-xbox a:hover strong { color: var(--accent); }
.join-xbox a strong { transition: color 0.15s; }

@media (max-width: 430px) {
  .sp-name { font-size: 0.72rem; }
  .sp-price { font-size: 0.8rem; }
  .store-preview { gap: 0.9rem; }
  .panel { padding: 1.3rem 1rem; }
}

@font-face {
  font-family: 'MCPixel';
  src: url('../fonts/minecraft.woff2') format('woff2'), url('../fonts/minecraft.woff') format('woff');
  font-display: swap;
}

.mc-gui {
  border-top: 1px solid var(--line);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  flex: 1;
  margin-bottom: 1.2rem;
}
.crate-rewards { display: none; }
.crate-desc { display: none; }

.mc-panel {
  background: #c6c6c6;
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555;
  padding: 10px 9px 9px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.mc-gui-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #555;
  margin: 0 0 8px 2px;
}

.mc-slots {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.mc-slot {
  position: relative;
  aspect-ratio: 1;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .mc-slot.mc-filler:hover::after { content: none; }
  .mc-slot:hover::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(255, 255, 255, 0.45);
    pointer-events: none;
  }
}

.mc-slot.mc-active::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.mc-item {
  position: relative;
  width: 81%;
  height: 81%;
}

.mc-item img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.mc-item .mc-tint {
  position: absolute;
  inset: 0;
  background: var(--tint);
  -webkit-mask: var(--overlay) center / contain no-repeat;
  mask: var(--overlay) center / contain no-repeat;
}

.mc-item.ench::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(200, 130, 255, 0.65) 45%, rgba(150, 90, 255, 0.4) 55%, transparent 75%);
  background-size: 300% 300%;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  animation: mcGlint 2.8s linear infinite;
}

@keyframes mcGlint {
  0% { background-position: 150% 150%; }
  100% { background-position: -50% -50%; }
}

.mc-count {
  position: absolute;
  right: 1px;
  bottom: 1px;
  line-height: 1;
  font-family: 'MCPixel', monospace;
  font-size: 14px;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  z-index: 2;
  pointer-events: none;
}

#mcTooltip {
  position: fixed;
  z-index: 3000;
  display: none;
  pointer-events: none;
  font-family: 'MCPixel', monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid transparent;
  border-image: linear-gradient(to bottom, rgba(80, 0, 255, 0.45), rgba(40, 0, 127, 0.45)) 1;
  padding: 4px 7px;
}

#mcTooltip .mct-line { text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.42); }
#mcTooltip .mct-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  margin-bottom: 5px;
  padding-top: 2px;
}
#mcTooltip .mct-gap { height: 7px; }
