:root {
  --bg: #141416;
  --tile: #1c1c1f;
  --tile-2: #222226;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.08);
  --brand: #5ec8ff;
  --brand-deep: #2aa8ef;
  --accent: #ff5a6a;
  --radius: 28px;
  --font: "Outfit", system-ui, sans-serif;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(900px 500px at 50% -10%, #2a2a32 0%, transparent 55%), var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  border: 0;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
}

/* —— Welcome bento (Donut-style) —— */
.welcome {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.bento {
  width: min(var(--max), 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.45fr) minmax(0, 0.95fr);
  grid-template-rows: minmax(220px, 260px) minmax(200px, 240px);
  grid-template-areas:
    "brand store discord"
    "stats join  discord";
  gap: 14px;
  align-items: stretch;
}

.bento__brand {
  grid-area: brand;
  display: grid;
  gap: 12px;
  grid-template-rows: 1fr auto;
  min-width: 0;
  max-width: 100%;
  z-index: 1;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}

a.tile:hover,
.ip-pill:hover,
.cat-tile:hover,
.product-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.tile--logo {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #7ad7ff 0%, #3bb4f0 55%, #1f8fd0 100%);
  animation: rise 0.7s ease both;
}

.logo-mark {
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.04em;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.logo-ring {
  position: absolute;
  inset: 18%;
  border-radius: 36%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  animation: spin 14s linear infinite;
}

.ip-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  max-width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 999px;
  background: #111114;
  color: #fff;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  animation: rise 0.75s 0.05s ease both;
}

.ip-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile--store {
  grid-area: store;
  animation: rise 0.8s 0.08s ease both;
}

.tile--discord {
  grid-area: discord;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #232329, #18181b);
  animation: rise 0.85s 0.1s ease both;
}

.tile--discord .discord-icon {
  color: #8ea1ff;
  margin-bottom: 0.4rem;
}

.tile--discord strong {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.tile--discord span {
  color: var(--muted);
  font-weight: 600;
}

.tile--discord small {
  margin-top: 0.4rem;
  color: #71717a;
  font-size: 0.85rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.35rem;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.tile--stats {
  grid-area: stats;
  animation: rise 0.9s 0.12s ease both;
}

.tile--join {
  grid-area: join;
  padding: 1.35rem 1.4rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  background: linear-gradient(160deg, #1f1f24, #151518);
  animation: rise 0.95s 0.14s ease both;
}

.tile h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1.2rem 1.3rem 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tile__hint {
  position: absolute;
  left: 1.3rem;
  bottom: 1.2rem;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 0.92rem;
}

.tile__art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
}

.tile__art--store {
  background:
    linear-gradient(120deg, rgba(20, 20, 24, 0.55), rgba(20, 20, 24, 0.15)),
    radial-gradient(circle at 70% 40%, rgba(94, 200, 255, 0.35), transparent 40%),
    radial-gradient(circle at 30% 70%, rgba(255, 90, 106, 0.28), transparent 35%),
    linear-gradient(135deg, #2a3344, #12151c);
}

.tile__art--store::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: 120px;
  height: 120px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, #7dd3fc, #0284c7),
    #38bdf8;
  transform: rotate(18deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.tile__art--stats {
  background:
    linear-gradient(120deg, rgba(20, 20, 24, 0.6), rgba(20, 20, 24, 0.2)),
    radial-gradient(circle at 60% 50%, rgba(255, 180, 80, 0.25), transparent 40%),
    linear-gradient(145deg, #2b2430, #141218);
}

.tile__art--stats::after {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 16%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #fbbf24, #f97316, #ef4444, #fbbf24);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.tile--join h2 {
  padding: 0;
  font-size: 1.4rem;
}

.tile--join label {
  display: grid;
  gap: 0.35rem;
}

.tile--join label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.tile--join input,
.tile--join .addr {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #0b0b0d;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  text-align: left;
}

.tile--join .addr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.82rem;
  overflow: hidden;
}

.tile--join .addr em {
  font-style: normal;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}

/* —— Store —— */
.store-page {
  min-height: 100vh;
  padding: 1.25rem;
}

.store-top {
  width: min(var(--max), 100%);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.back,
.back-inline,
.logo-mini {
  font-weight: 700;
  color: var(--muted);
}

.back:hover,
.back-inline:hover,
.logo-mini:hover {
  color: #fff;
}

.logo-mini {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.store-wrap {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.store-wrap > h1,
.products-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.store-lead {
  margin: 0.4rem 0 1.4rem;
  color: var(--muted);
}

.products-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.cat-bento,
.product-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cat-tile,
.product-tile {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--tile-2);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cat-tile h2,
.product-tile h3 {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cat-tile p,
.product-tile p {
  margin: 0;
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.4;
}

.cat-tile span {
  margin-top: auto;
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: var(--brand);
}

.cat-tile__glow {
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
}

.cat-tile--vip .cat-tile__glow {
  background: #fbbf24;
}
.cat-tile--spawner .cat-tile__glow {
  background: #22c55e;
}
.cat-tile--key .cat-tile__glow {
  background: #38bdf8;
}
.cat-tile--pack .cat-tile__glow {
  background: #fb7185;
}
.cat-tile--other .cat-tile__glow {
  background: #a78bfa;
}

.product-tile__badge {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.product-tile__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-tile__foot strong {
  font-size: 1.2rem;
  color: var(--brand);
}

.product-tile__foot button,
.btn-buy {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 800;
}

.product-tile__foot button:hover,
.btn-buy:hover {
  background: var(--brand);
  color: #041018;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(16px);
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 40;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.modal__panel {
  width: min(420px, 100%);
  background: #1a1a1e;
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
}

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-size: 1.5rem;
  color: var(--muted);
}

.modal h3 {
  margin: 0.2rem 0 0;
  font-size: 1.4rem;
}

.modal p {
  color: var(--muted);
  line-height: 1.45;
}

.modal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.modal__meta strong {
  font-size: 1.4rem;
  color: var(--brand);
}

.modal__note {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .bento {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "brand store"
      "discord discord"
      "stats stats"
      "join join";
  }

  .tile--store,
  .tile--discord,
  .tile--stats,
  .tile--join {
    min-height: 200px;
  }

  .cat-bento,
  .product-bento {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "store"
      "discord"
      "stats"
      "join";
  }

  .tile--logo {
    min-height: 180px;
  }

  .cat-bento,
  .product-bento {
    grid-template-columns: 1fr;
  }

  .store-top {
    flex-wrap: wrap;
  }
}

/* —— Donut-style Tebex store —— */
.tebex-store {
  --shop-bg: #0d0d0d;
  --shop-card: #151515;
  --shop-blue: #3d6cff;
  --shop-blue-text: #8eb6ff;
  --shop-purple: #c084fc;
  --shop-green: #22c55e;
  min-height: 100vh;
  background: var(--shop-bg);
  padding: 2.5rem 1.25rem 3rem;
}

.shop-hero {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: rise 0.6s ease both;
}

.shop-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #9ae6ff, #3bb4f0 55%, #1d7eb8);
  box-shadow: 0 12px 40px rgba(59, 180, 240, 0.35);
}

.shop-logo span {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
  color: #fff;
}

.shop-logo--sm {
  width: 36px;
  height: 36px;
}

.shop-logo--sm span {
  font-size: 0.75rem;
}

.shop-main {
  width: min(980px, 100%);
  margin: 0 auto;
}

.shop-section {
  margin-bottom: 3.2rem;
}

.shop-section h2 {
  margin: 0 0 1.4rem;
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.rank-card {
  background: var(--shop-card);
  border-radius: 16px;
  padding: 1.4rem 1.25rem 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  animation: rise 0.7s ease both;
}

.rank-card h3 {
  margin: 0 0 1rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
  text-align: center;
}

.rank-card ul {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  flex: 1;
}

.rank-card li {
  position: relative;
  padding-left: 1.1rem;
  color: #e5e5e5;
  font-size: 0.95rem;
  line-height: 1.35;
}

.rank-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dd3fc;
}

.rank-card button {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  background: #1a2a5c;
  color: var(--shop-blue-text);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.rank-card button:hover {
  background: var(--shop-blue);
  color: #fff;
}

.shard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.shard-card {
  position: relative;
  background: var(--shop-card);
  border-radius: 16px;
  padding: 1.5rem 1rem 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  min-height: 260px;
  animation: rise 0.75s ease both;
}

.shard-badge {
  position: absolute;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--shop-green);
  color: #04140a;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 2;
}

.shard-art {
  width: 110px;
  height: 110px;
  margin-top: 0.6rem;
  position: relative;
  filter: drop-shadow(0 10px 20px rgba(168, 85, 247, 0.35));
}

.shard-art::before,
.shard-art::after {
  content: "";
  position: absolute;
  inset: 18% 28%;
  background: linear-gradient(160deg, #f0abfc, #a855f7 45%, #6b21a8);
  clip-path: polygon(50% 0%, 90% 35%, 72% 100%, 28% 100%, 10% 35%);
}

.shard-art::after {
  inset: 28% 18% 8% 42%;
  opacity: 0.85;
  transform: rotate(28deg) scale(0.75);
}

.shard-art--1 {
  transform: scale(0.75);
}
.shard-art--2 {
  transform: scale(0.85);
}
.shard-art--3 {
  transform: scale(0.95);
}
.shard-art--4 {
  transform: scale(1.05);
}
.shard-art--5 {
  transform: scale(1.12);
}
.shard-art--6 {
  transform: scale(1.2);
}
.shard-art--4::before,
.shard-art--5::before,
.shard-art--6::before {
  box-shadow: 22px 10px 0 -4px #c084fc, -20px 14px 0 -8px #9333ea;
}

.shard-card h3 {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--shop-purple);
  text-align: center;
}

.shard-old {
  color: #71717a;
  text-decoration: line-through;
  font-size: 0.58rem;
}

.shard-card button {
  width: min(100%, 160px);
  min-height: 42px;
  margin-top: auto;
  border-radius: 10px;
  background: #1a2a5c;
  color: #fff;
  font-weight: 700;
}

.shard-card button:hover {
  background: var(--shop-blue);
}

.shop-footer {
  width: min(980px, 100%);
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.shop-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.shop-footer__brand strong {
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.shop-footer p {
  margin: 0 0 1rem;
  color: #71717a;
  font-size: 0.85rem;
}

.shop-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.2rem;
}

.shop-footer a {
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shop-footer a:hover {
  color: #93c5fd;
}

@media (max-width: 900px) {
  .rank-grid,
  .shard-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .shard-grid {
    grid-template-columns: 1fr 1fr;
  }
}
