:root {
  --obsidian: #120c0b;
  --obsidian-2: #1c1210;
  --obsidian-3: #241713;
  --ash: #cabfb4;
  --ash-dim: #8d7f74;
  --lava: #ff5a1f;
  --lava-deep: #b8280c;
  --ember: #f2a65a;
  --purple: #a35fe8;
  --focus-ring: #ffb37a;
  --error: #f2a3a3;
  --gold: #d9ad4e;
  --silver: #b9c2cc;
  --bronze: #c17a4a;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background-color: var(--obsidian);
  color: var(--ash);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(18, 12, 11, 0.55) 0%, rgba(18, 12, 11, 0.75) 45%, rgba(18, 12, 11, 0.94) 100%),
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 90, 31, 0.12), transparent),
    url('/images/bg.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.ember-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(2px 2px at 10% 20%, var(--ember), transparent),
    radial-gradient(2px 2px at 80% 60%, var(--lava), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, var(--ember), transparent),
    radial-gradient(1.5px 1.5px at 65% 15%, var(--lava), transparent),
    radial-gradient(2px 2px at 25% 55%, var(--ember), transparent);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 -30px, 0 -22px, 0 -18px, 0 -26px, 0 -20px; }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
  padding: 1.1rem 2rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(18, 12, 11, 0.92);
  backdrop-filter: blur(6px);
  overflow-x: auto;
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.brand-logo { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.brand-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.3rem;
  color: #fff;
}
.brand-sub { color: #fff; font-weight: 700; font-size: 0.95rem; }

.main-nav { display: flex; gap: 0.5rem; margin-left: 1.5rem; flex-shrink: 0; }
.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ash-dim);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.nav-tab:hover { color: var(--ash); }
.nav-tab.active {
  background: var(--lava-deep);
  color: #fff;
  border-color: var(--lava);
}

.auth-area { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; margin-left: auto; flex-shrink: 0; }
.auth-balance {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 90, 31, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--ember);
  font-weight: 600;
  white-space: nowrap;
}
.auth-id { color: var(--ash-dim); white-space: nowrap; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--lava), var(--lava-deep));
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255, 90, 31, 0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--ash);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); }

/* ── Main / Tabs ────────────────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Home ───────────────────────────────────────────────────────────────── */
.hero { padding: 2rem 0 2.5rem; }
.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #fff;
}
.hero-accent {
  background: linear-gradient(90deg, var(--lava), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { color: var(--ash-dim); font-size: 1.05rem; margin: 0; max-width: 52ch; }

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.how-card {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--lava-deep);
  color: #fff;
  font-weight: 700;
  font-family: 'Oswald', sans-serif;
  margin-bottom: 0.9rem;
}
.how-card h3 { margin: 0 0 0.5rem; color: #fff; font-family: 'Oswald', sans-serif; font-size: 1.05rem; }
.how-card p { margin: 0; color: var(--ash-dim); font-size: 0.9rem; line-height: 1.5; }

.home-note {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
}
.home-note p { margin: 0; font-size: 0.9rem; color: var(--ash-dim); line-height: 1.5; }
.home-note strong { color: var(--ash); }

/* ── Daily Lucky Wheel ──────────────────────────────────────────────────── */
.wheels-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; align-items: start; }
.wheel-section { margin-top: 0; }

.wheel-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0 0.5rem;
}

.wheel-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 0.4rem;
}

.wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 3px solid var(--lava-deep);
  box-shadow: 0 0 22px rgba(255, 90, 31, 0.35), inset 0 0 16px rgba(0, 0, 0, 0.5);
  transition: transform 4s cubic-bezier(0.15, 0.65, 0.25, 1);
  background: var(--obsidian-2);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  color: var(--ember);
  z-index: 6;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--lava);
  box-shadow: 0 0 14px rgba(255, 90, 31, 0.55);
  z-index: 5;
}
.wheel-hub img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wheel-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 0.62rem;
  text-align: center;
  width: 42px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
.wheel-label.jackpot { color: #e0b3ff; font-size: 0.54rem; line-height: 1.15; }

.spin-status { color: var(--ash-dim); font-size: 0.85rem; text-align: center; margin: 0; }

.vip-wheel-section { margin-top: 0; }
.vip-wheel-disc { border-color: var(--purple); box-shadow: 0 0 22px rgba(163, 95, 232, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.5); }

@media (max-width: 720px) {
  .wheels-row { grid-template-columns: 1fr; }
}

.home-feeds-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.feed-card {
  background: rgba(20, 10, 8, 0.55);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
}
.feed-card-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.1rem; margin: 0 0 1.1rem; }
.feed-list { display: flex; flex-direction: column; gap: 1rem; }
.feed-item { display: flex; gap: 0.7rem; }
.feed-item-emoji { font-size: 1.2rem; line-height: 1.3; flex-shrink: 0; }
.feed-item-body { flex: 1; }
.feed-item-title { color: #fff; font-weight: 700; font-size: 0.92rem; margin: 0 0 0.2rem; }
.feed-item-date { color: var(--ash-dim); font-size: 0.72rem; font-weight: 400; margin-left: 0.5rem; }
.feed-item-desc { color: var(--ash); font-size: 0.85rem; margin: 0; line-height: 1.5; }

@media (max-width: 720px) {
  .home-feeds-row { grid-template-columns: 1fr; }
}

/* ── Shop ───────────────────────────────────────────────────────────────── */
.shop-section { margin-bottom: 2.5rem; }
.section-title {
  font-family: 'Oswald', sans-serif;
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title-icon { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.section-sub { color: var(--ash-dim); font-size: 0.9rem; margin: 0 0 1.25rem; max-width: 60ch; }

.login-gate {
  background: var(--obsidian-2);
  border: 1px dashed rgba(255, 90, 31, 0.3);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.login-gate p { margin: 0; color: var(--ash); }

.promo-box {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.25rem;
  max-width: 420px;
}
.promo-box label { display: block; font-size: 0.85rem; font-weight: 600; color: #fff; margin-bottom: 0.6rem; }
.promo-input-row { display: flex; gap: 0.6rem; }
.promo-input-row input {
  flex: 1;
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.promo-input-row input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: transparent; }
.promo-feedback { font-size: 0.82rem; margin: 0.6rem 0 0; min-height: 1.1em; }
.promo-feedback.success { color: #7fe0a0; }
.promo-feedback.error { color: var(--error); }

.packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.package-card {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.package-card:hover { border-color: rgba(255, 90, 31, 0.4); transform: translateY(-2px); }
.package-card.featured { border-color: var(--lava); box-shadow: 0 0 24px rgba(255, 90, 31, 0.15); }
.package-image-wrap { width: 100%; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; background: #000; }
.package-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── VIP promo card (Buy Coins tab) ─────────────────────────────────────── */
.vip-promo-card {
  border-color: rgba(255, 105, 180, 0.4);
  box-shadow: 0 0 24px rgba(255, 105, 180, 0.15);
  overflow: hidden;
}
.vip-ribbon {
  position: absolute;
  top: 16px;
  right: -38px;
  background: #ff5fa2;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 5px 42px;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.vip-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.vip-benefits li { font-size: 0.88rem; color: var(--ash); line-height: 1.4; }
.vip-cta {
  margin: 0.3rem 0 0;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 105, 180, 0.12);
  border: 1px solid rgba(255, 105, 180, 0.35);
  border-radius: 8px;
  color: #ff9fc7;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
}

.package-badge {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: var(--lava);
  color: #1a0d05;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.package-label { font-family: 'Oswald', sans-serif; font-size: 1.1rem; color: #fff; font-weight: 600; }
.package-coins { font-size: 1.6rem; font-weight: 700; color: var(--ember); }
.package-coins small { font-size: 0.9rem; color: var(--ash-dim); font-weight: 400; }
.package-bonus {
  display: inline-block;
  background: rgba(80, 200, 120, 0.15);
  color: #7fe0a0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  width: fit-content;
}
.package-total { font-size: 0.78rem; color: var(--ash-dim); }
.package-price { color: var(--ash-dim); font-size: 0.95rem; }
.paypal-button-container { min-height: 45px; margin-top: auto; }

.auth-balance { cursor: pointer; transition: background 0.15s ease; }
.auth-balance:hover { background: rgba(255, 90, 31, 0.12); }
.coin-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(242, 166, 90, 0.6);
  vertical-align: middle;
}
.coin-icon-sm {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(242, 166, 90, 0.6);
  vertical-align: middle;
  margin-left: 0.25em;
}

.catalog-categories { display: flex; flex-direction: column; gap: 1.75rem; }

#chaosDinosCategories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
#chaosDinosCategories .catalog-category-group[data-category-label="Breedpairs"] { grid-column: 1 / -1; }

#bossFightsAscensionRow { margin-bottom: 1.75rem; }
#bossFightsAscensionRow .catalog-category-group { max-width: 260px; }

#bossFightsCategories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
#bossFightsCategories .catalog-category-group { display: flex; flex-direction: column; }
#bossFightsCategories .tier-grid { flex: 1; }
#bossFightsCategories .chest-card-flip { height: 100%; }

.catalog-category-group { display: flex; flex-direction: column; gap: 0.9rem; }
.tier-grid { display: grid; gap: 1.25rem; }
.catalog-group-header { display: flex; align-items: center; gap: 0.7rem; }
.catalog-group-icon { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: #000; flex-shrink: 0; }
.catalog-category-emoji { font-size: 1.4rem; }
.catalog-category-label { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.1rem; margin: 0; }

.catalog-back-note { font-size: 0.8rem; color: var(--ash-dim); line-height: 1.55; margin: 0 0 1rem; }
.catalog-back-note strong { color: var(--ash); }
.catalog-back-contents { font-size: 0.88rem; color: var(--ash); line-height: 1.65; margin: 0 0 1rem; flex: 1; }

.catalog-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.catalog-tier {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.catalog-tier-name { font-size: 0.85rem; color: var(--ash); line-height: 1.4; min-height: 2.6em; }
.catalog-tier-cost { color: var(--ember); font-weight: 700; font-size: 1rem; }
.catalog-buy-btn { font-size: 0.85rem; padding: 0.5rem 1rem; margin-top: auto; }

/* ── Shop category tiles (click in, then use Back to return) ──────────────── */
.shop-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.shop-group-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.5rem;
  cursor: pointer;
  color: var(--ash);
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.shop-group-tile:hover { border-color: var(--lava); transform: translateY(-2px); }
.shop-group-tile img { width: 100%; aspect-ratio: 1/1; border-radius: 10px; object-fit: cover; }

.back-btn {
  background: transparent;
  border: none;
  color: var(--ash-dim);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.1rem;
  display: inline-block;
}
.back-btn:hover { color: var(--ember); }

.sub-panel { display: none; }
.sub-panel.active { display: block; animation: fadeIn 0.2s ease; }

/* ── Sale pricing (strikethrough original + highlighted sale price) ───────── */
.price-original { text-decoration: line-through; color: var(--ash-dim); font-size: 0.85em; margin-right: 0.4em; }
.price-sale { color: #7fe0a0; font-weight: 700; }
.sale-badge {
  display: inline-block;
  background: var(--lava);
  color: #1a0d05;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Combo Packs ────────────────────────────────────────────────────────── */
.combo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.combo-card {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.combo-image-wrap { aspect-ratio: 1 / 1; overflow: hidden; background: #000; }
.combo-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.combo-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.combo-name { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.1rem; margin: 0; }
.combo-contents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.combo-contents li { font-size: 0.82rem; color: var(--ash-dim); padding-left: 1rem; position: relative; }
.combo-contents li::before { content: '+'; position: absolute; left: 0; color: var(--ember); font-weight: 700; }
.combo-cost { font-size: 1.05rem; font-weight: 700; color: var(--ember); }
.combo-buy-btn { margin-top: auto; }

/* ── Admin panel ────────────────────────────────────────────────────────── */
.admin-link {
  background: none;
  border: none;
  color: var(--ash-dim);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.5;
}
.admin-link:hover { opacity: 1; }

.modal.privacy-modal { max-width: 820px; text-align: left; max-height: 68vh; display: flex; flex-direction: column; }
.privacy-body { overflow-y: auto; padding-right: 0.4rem; flex: 1; min-height: 0; }
.privacy-updated { color: var(--ash-dim); font-size: 0.8rem; margin-top: -0.5rem; }
.privacy-body h4 { color: var(--ember); font-family: 'Oswald', sans-serif; font-size: 1rem; margin: 1.2rem 0 0.4rem; }
.privacy-body h4:first-of-type { margin-top: 0; }
.privacy-body p { color: var(--ash); font-size: 0.88rem; line-height: 1.6; margin: 0 0 0.5rem; }
.privacy-body ul { margin: 0 0 0.5rem; padding-left: 1.2rem; }
.privacy-body li { color: var(--ash); font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.4rem; }
.privacy-body strong { color: #fff; }

.modal.admin-panel-modal {
  max-width: 2880px;
  width: 95vw;
  text-align: left;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-panel-search { margin-bottom: 1rem; flex-shrink: 0; }
.admin-panel-search input {
  width: 100%;
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.9rem;
}
.admin-panel-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.3rem;
}
.admin-panel-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  flex-wrap: wrap;
}
.admin-panel-row.has-sale { border-color: rgba(255, 90, 31, 0.4); background: rgba(255, 90, 31, 0.06); }
.admin-row-label { flex: 1; min-width: 160px; font-size: 0.85rem; color: var(--ash); }
.admin-row-price { font-size: 0.78rem; color: var(--ash-dim); }
.admin-row-input {
  width: 60px;
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.85rem;
}
.admin-row-btn { font-size: 0.75rem; padding: 0.35rem 0.7rem; }

.admin-panel-tabs { display: flex; gap: 0.6rem; margin: 0.8rem 0 1rem; flex-shrink: 0; }
.admin-panel-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ash-dim);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.admin-panel-tab.active { background: var(--lava-deep); color: #fff; border-color: var(--lava); }
.admin-panel-tabpanel { display: none; }
.admin-panel-tabpanel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.admin-account-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  flex-wrap: wrap;
}
.admin-account-name { font-weight: 600; color: var(--ash); min-width: 140px; }
.admin-account-id { font-family: monospace; font-size: 0.78rem; color: var(--ash-dim); flex: 1; min-width: 160px; }
.admin-account-coins { font-weight: 700; color: var(--ember); white-space: nowrap; }
.admin-account-rank { font-size: 0.75rem; color: var(--ash-dim); white-space: nowrap; }
.admin-account-date { font-size: 0.75rem; color: var(--ash-dim); white-space: nowrap; }
.admin-account-vip { font-size: 0.7rem; background: var(--purple); color: #fff; padding: 0.1rem 0.5rem; border-radius: 999px; }
.admin-account-excluded-badge { font-size: 0.7rem; background: rgba(255, 255, 255, 0.08); color: var(--ash-dim); padding: 0.1rem 0.5rem; border-radius: 999px; }
.admin-account-row.excluded { opacity: 0.6; }

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}
.analytics-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.analytics-stat-value { font-family: 'Oswald', sans-serif; font-size: 1.5rem; color: var(--ember); display: block; }
.analytics-stat-label { font-size: 0.75rem; color: var(--ash-dim); }
.analytics-subheading { color: var(--ash); font-family: 'Oswald', sans-serif; font-size: 0.95rem; margin: 1.2rem 0 0.6rem; flex-shrink: 0; }
.analytics-subheading:first-of-type { margin-top: 0; }

.discord-api-status {
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  margin: 0 0 1rem;
}
.discord-api-status:empty { display: none; }
.discord-api-status.ok { background: rgba(60, 200, 100, 0.12); border: 1px solid rgba(60, 200, 100, 0.3); color: #8ee6a8; }
.discord-api-status.warn { background: rgba(255, 190, 60, 0.12); border: 1px solid rgba(255, 190, 60, 0.3); color: #ffd27a; }

.analytics-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
}
.analytics-row-rank { color: var(--ash-dim); font-size: 0.8rem; width: 1.5rem; flex-shrink: 0; }
.analytics-row-name { font-weight: 600; color: var(--ash); flex: 1; }
.analytics-row-value { color: var(--ember); font-weight: 700; white-space: nowrap; }
.analytics-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }

/* ── Announcement admin tab ─────────────────────────────────────────────── */
.announcement-textarea {
  width: 100%;
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 1rem;
}
.announcement-textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: transparent; }
.announcement-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.announcement-toggle-label { display: flex; align-items: center; gap: 0.6rem; color: var(--ash); font-size: 0.9rem; cursor: pointer; }
.announcement-toggle-label input { width: 18px; height: 18px; accent-color: var(--lava); cursor: pointer; }

/* ── Announcement popup (shown to every player) ────────────────────────────── */
.announcement-modal { max-width: 440px; text-align: center; }
.announcement-modal-text { color: var(--ash); font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; margin: 0.5rem 0 1.5rem; }
.signup-bonus-image { width: 140px; height: 140px; object-fit: cover; border-radius: 16px; margin: 0 auto 1rem; display: block; box-shadow: 0 0 24px rgba(255, 175, 60, 0.35); }

/* ── Chests (flip cards) ────────────────────────────────────────────────── */
.chests-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.chests-grid::-webkit-scrollbar { height: 8px; }
.chests-grid::-webkit-scrollbar-thumb { background: rgba(255, 90, 31, 0.3); border-radius: 999px; }
.chests-grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }

.chest-card-flip {
  perspective: 1200px;
  min-height: 420px;
  flex: 0 0 260px;
  scroll-snap-align: start;
}
.chest-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.chest-card-flip.flipped .chest-card-inner { transform: rotateY(180deg); }

.chest-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chest-face.gold { border-color: rgba(242, 166, 90, 0.3); }
.chest-face.purple { border-color: rgba(163, 95, 232, 0.3); }
.chest-face.red { border-color: rgba(255, 60, 40, 0.35); }
.chest-face.origin { border-color: rgba(255, 200, 60, 0.4); }
.chest-face.nightmare { border-color: rgba(200, 20, 20, 0.45); }
.chest-face.combo { border-color: rgba(255, 90, 31, 0.35); }
.chest-face.flyer { border-color: rgba(120, 190, 255, 0.35); }
.chest-face.land { border-color: rgba(200, 140, 50, 0.4); }
.chest-face.water { border-color: rgba(40, 190, 220, 0.4); }
.chest-face.angelicdemonic { border-color: rgba(220, 220, 230, 0.4); }
.chest-face.spiritchaos { border-color: rgba(255, 20, 40, 0.45); }

.chests-row-title {
  color: var(--ember, #ff5a1f);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.75rem;
}
.chests-row-title:first-of-type { margin-top: 0.5rem; }

.chest-face-back {
  transform: rotateY(180deg);
  padding: 1.4rem;
  justify-content: flex-start;
}

.chest-image-wrap { aspect-ratio: 1 / 1; overflow: hidden; background: #000; position: relative; }
.chest-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chest-details-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(3px);
}
.chest-details-btn:hover { background: rgba(0, 0, 0, 0.75); }

.chest-body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.chest-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.15rem; margin: 0; }
.chest-cost { font-size: 1.1rem; font-weight: 700; }
.chest-face.gold .chest-cost { color: var(--ember); }
.chest-face.purple .chest-cost { color: var(--purple); }
.chest-face.red .chest-cost { color: var(--lava); }
.chest-face.origin .chest-cost { color: #ffc83c; }
.chest-face.nightmare .chest-cost { color: #ff3c3c; }
.chest-face.combo .chest-cost { color: var(--ember); }
.chest-face.flyer .chest-cost { color: #78beff; }
.chest-face.land .chest-cost { color: #c88c32; }
.chest-face.water .chest-cost { color: #28bedc; }
.chest-face.angelicdemonic .chest-cost { color: #e8e8f0; }
.chest-face.spiritchaos .chest-cost { color: #ff2838; }
.chest-open-btn { margin-top: auto; }

.chest-back-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.05rem; margin: 0 0 0.9rem; }
.chest-back-scroll-hint { font-family: inherit; font-size: 0.7rem; font-weight: 400; color: var(--ember, #ff5a1f); white-space: nowrap; }
.chest-back-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; overflow-y: auto; }
.chest-back-list::-webkit-scrollbar { width: 6px; }
.chest-back-list::-webkit-scrollbar-thumb { background: rgba(255, 90, 31, 0.4); border-radius: 999px; }
.chest-back-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
.chest-back-list li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; color: var(--ash); }
.chest-back-emoji { font-size: 1.1rem; flex-shrink: 0; }
.chest-back-thumb { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #000; }
.chest-back-btn { align-self: flex-start; }

/* ── Chest opening — dramatic reveal sequence ──────────────────────────── */
#openingOverlay { background: rgba(0, 0, 0, 0.92); }
.opening-stage {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opening-chest-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  position: relative;
  z-index: 2;
  animation: chestShake 0.35s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255, 140, 40, 0.5));
}
.opening-chest-img.crack {
  animation: chestBurst 0.5s ease-out forwards;
}

@keyframes chestShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-4px) rotate(-1.5deg); }
  75% { transform: translateX(4px) rotate(1.5deg); }
}
@keyframes chestBurst {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0; }
}

.opening-rays {
  position: absolute;
  inset: -60px;
  z-index: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 170, 60, 0.35), transparent 30%);
  opacity: 0;
  animation: raysSpin 6s linear infinite;
}
.opening-rays.show { opacity: 1; }
@keyframes raysSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.opening-flash {
  position: absolute;
  inset: -200px;
  z-index: 3;
  background: radial-gradient(circle, rgba(255, 235, 200, 0.95) 0%, rgba(255, 150, 50, 0.4) 35%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.opening-flash.burst { animation: flashBurst 0.6s ease-out forwards; }
@keyframes flashBurst {
  0% { opacity: 0; transform: scale(0.3); }
  30% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.6); }
}

.opening-particles { position: absolute; inset: -80px; z-index: 2; pointer-events: none; }
.opening-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  opacity: 0;
}
.opening-particle.fly { animation: particleFly 0.9s ease-out forwards; }
@keyframes particleFly {
  0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--px), var(--py)) scale(0.3); }
}

/* ── Opening animation V2 — escalating tension + shockwave (Tier 1 test) ── */
.opening-stage.screen-shake { animation: screenShake 0.4s ease-out; }
@keyframes screenShake {
  0% { transform: translate(0, 0); }
  15% { transform: translate(-10px, 6px); }
  30% { transform: translate(9px, -7px); }
  45% { transform: translate(-8px, -5px); }
  60% { transform: translate(7px, 6px); }
  75% { transform: translate(-4px, -3px); }
  100% { transform: translate(0, 0); }
}

.opening-chest-img.shake-slow { animation: chestShakeSlow 0.5s ease-in-out infinite; }
.opening-chest-img.shake-medium { animation: chestShakeMedium 0.28s ease-in-out infinite; }
.opening-chest-img.shake-intense {
  animation: chestShakeIntense 0.12s ease-in-out infinite;
  filter: drop-shadow(0 0 45px rgba(255, 200, 80, 0.85)) drop-shadow(0 0 80px rgba(255, 140, 40, 0.5));
}
@keyframes chestShakeSlow {
  0%, 100% { transform: scale(1) translateX(0) rotate(0deg); }
  50% { transform: scale(1.02) translateX(-2px) rotate(-0.8deg); }
}
@keyframes chestShakeMedium {
  0%, 100% { transform: scale(1.05) translateX(0) rotate(0deg); }
  25% { transform: scale(1.06) translateX(-5px) rotate(-2deg); }
  75% { transform: scale(1.06) translateX(5px) rotate(2deg); }
}
@keyframes chestShakeIntense {
  0%, 100% { transform: scale(1.1) translateX(0) rotate(0deg); }
  25% { transform: scale(1.14) translate(-7px, 3px) rotate(-3.5deg); }
  75% { transform: scale(1.14) translate(7px, -3px) rotate(3.5deg); }
}

.opening-shockwave {
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 210, 120, 0.9);
  opacity: 0;
  pointer-events: none;
}
.opening-shockwave.expand { animation: shockwaveExpand 0.7s cubic-bezier(0.1, 0.6, 0.3, 1) forwards; }
@keyframes shockwaveExpand {
  0% { width: 40px; height: 40px; opacity: 1; border-width: 6px; }
  100% { width: 520px; height: 520px; opacity: 0; border-width: 1px; }
}

.opening-particle.spark { font-size: 14px; background: none; line-height: 1; }
.opening-particle.spark.fly { animation: particleFlySpin 1.1s ease-out forwards; }
@keyframes particleFlySpin {
  0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--px), var(--py)) scale(0.4) rotate(200deg); }
}

.result-modal { animation: resultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes resultPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.result-emoji { animation: emojiGlow 1.6s ease-in-out infinite; }
@keyframes emojiGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 170, 60, 0.4)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 170, 60, 0.8)); }
}

/* ── Modals ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--ash-dim);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-close:hover { color: #fff; }

.modal-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.modal-tab {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ash-dim);
  font-family: inherit;
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}
.modal-tab.active { background: var(--lava-deep); color: #fff; border-color: var(--lava); }

.auth-form { display: none; flex-direction: column; gap: 0.4rem; }
.auth-form.active { display: flex; }
.auth-form label { font-size: 0.85rem; font-weight: 600; color: #fff; margin-top: 0.5rem; }
.auth-form input {
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.95rem;
}
.auth-form input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: transparent; }
.auth-form .hint { font-size: 0.76rem; color: var(--ash-dim); margin: 0.2rem 0 0; }
.auth-form .btn-primary { margin-top: 1.1rem; }
.form-error { color: var(--error); font-size: 0.85rem; margin: 0.6rem 0 0; min-height: 1.2em; }

.result-modal { text-align: center; max-width: 340px; }

.confirm-modal { max-width: 360px; text-align: center; }
.confirm-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.15rem; margin: 0 0 0.9rem; }
.confirm-message { color: var(--ash); font-size: 0.95rem; line-height: 1.5; margin: 0 0 1.4rem; }
.confirm-buttons { display: flex; gap: 0.75rem; justify-content: center; }
.confirm-buttons .btn-ghost,
.confirm-buttons .btn-primary { flex: 1; max-width: 130px; }
.result-label { color: var(--ash-dim); margin: 0 0 0.5rem; font-size: 0.9rem; }
.result-emoji { font-size: 3.5rem; margin-bottom: 0.5rem; }
.result-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 auto 0.75rem;
  display: block;
  box-shadow: 0 0 24px rgba(255, 170, 60, 0.35);
}
.result-name { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.2rem; margin: 0 0 0.75rem; }
.result-note { color: var(--ash-dim); font-size: 0.82rem; margin: 0 0 1.4rem; line-height: 1.5; }

/* ── Toast feedback ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.9rem 1.4rem;
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.success { border-color: rgba(80, 200, 120, 0.4); color: #a8e6b8; }
.toast.error { border-color: rgba(220, 60, 60, 0.4); color: var(--error); }

/* ── My Items ───────────────────────────────────────────────────────────── */
.items-filter { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.items-filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ash-dim);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.items-filter-btn:hover { color: var(--ash); }
.items-filter-btn.active { background: var(--lava-deep); color: #fff; border-color: var(--lava); }

.items-list { display: flex; flex-direction: column; gap: 0.7rem; }

.item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.item-row.redeemed { opacity: 0.45; }

.item-emoji { font-size: 1.6rem; flex-shrink: 0; }
.item-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #000; }
.item-info { flex: 1; min-width: 0; }
.item-name { color: #fff; font-weight: 600; font-size: 0.95rem; margin: 0 0 0.15rem; }
.item-meta { color: var(--ash-dim); font-size: 0.78rem; margin: 0; }

.item-status {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.item-status.active { background: rgba(80, 200, 120, 0.15); color: #7fe0a0; }
.item-status.redeemed { background: rgba(255, 255, 255, 0.06); color: var(--ash-dim); }

.item-quicksell-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.items-empty { color: var(--ash-dim); text-align: center; padding: 2rem 0; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.profile-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
.profile-card {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.5rem 1.5rem;
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--ash-dim); font-size: 0.9rem; }
.profile-value { color: #fff; font-weight: 600; text-align: right; }
.profile-id { font-family: monospace; font-size: 0.9rem; color: var(--ember); user-select: all; }

/* ── Discord activity tier progress ────────────────────────────────────── */
.tier-progress-card {
  background: var(--obsidian-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
}
.tier-progress-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.05rem; margin: 0 0 0.9rem; }
.tier-current-label { color: var(--ash); font-size: 0.9rem; margin: 0 0 0.4rem; }
.tier-current-label strong { color: var(--ember); }
.tier-next-label { color: var(--ash); font-size: 0.9rem; margin: 0 0 0.9rem; }
.tier-next-label strong { color: var(--ash); }

.tier-progress-bar-track {
  position: relative;
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 60, 40, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 1rem;
}
.tier-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff2b1f, #ff5a1f);
  box-shadow: 0 0 10px 2px rgba(255, 40, 20, 0.75), 0 0 20px 4px rgba(255, 40, 20, 0.4);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.tier-progress-bar-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 40, 20, 0.9), 0 1px 2px rgba(0, 0, 0, 0.6);
}

.tier-hint { color: var(--ash-dim); font-size: 0.8rem; line-height: 1.5; margin: 0; }

.profile-edit-group { display: flex; align-items: center; gap: 0.6rem; }
.profile-name-synced { font-size: 0.72rem; color: var(--ash-dim); white-space: nowrap; }
.profile-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.badges-card {
  background: rgba(20, 10, 8, 0.55);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.badges-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.05rem; margin: 0 0 1rem; }
.badges-list { display: flex; flex-wrap: wrap; gap: 1rem; }
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 200px;
}
.badge-item img { width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); }
.badge-item span { font-size: 0.75rem; color: var(--ash); text-align: center; }

.edit-name-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0 1rem;
  flex-wrap: wrap;
}
.edit-name-form input {
  flex: 1;
  min-width: 140px;
  background: var(--obsidian);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--ash);
  font-family: inherit;
  font-size: 0.9rem;
}
.edit-name-form input:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: transparent; }
.edit-name-form .btn-primary,
.edit-name-form .btn-ghost { font-size: 0.85rem; padding: 0.5rem 1rem; }
.edit-name-form .form-error { width: 100%; margin: 0.4rem 0 0; }

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--ash-dim);
  font-size: 0.8rem;
  padding: 2rem 0 3rem;
}

/* ── Spotlight tab — trophy room ────────────────────────────────────────── */
.spotlight-card {
  background: rgba(20, 10, 8, 0.55);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.spotlight-card-title { font-family: 'Oswald', sans-serif; color: #fff; font-size: 1.15rem; margin: 0 0 0.2rem; }
.spotlight-card-sub { color: var(--ash-dim); font-size: 0.82rem; margin: 0 0 1.25rem; }
.spotlight-empty { color: var(--ash-dim); font-size: 0.88rem; text-align: center; padding: 1rem 0; margin: 0; }

.spotlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* The podium — the one bold move on this page. Three risers of different
   heights, #1 tallest and centered, medal-style, like an actual ceremony. */
.spotlight-podium-card { max-width: none; }
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  min-height: 320px;
  margin-bottom: 1rem;
}
.podium-loading { color: var(--ash-dim); align-self: center; }
.podium-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 190px;
}
.podium-medal { font-size: 1.8rem; margin-bottom: 0.4rem; }
.podium-badge-wrap { position: relative; width: 140px; margin-bottom: 0.6rem; }
.podium-badge { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55)); }
.podium-badge-medal {
  position: absolute;
  bottom: -10px;
  right: -12px;
  font-size: 2rem;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}
.podium-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}
.podium-tier { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.75rem; }
.podium-riser {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.6rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: rgba(0, 0, 0, 0.55);
}
.podium-spot--1 { order: 2; }
.podium-spot--2 { order: 1; }
.podium-spot--3 { order: 3; }
.podium-spot--1 .podium-riser { height: 120px; background: linear-gradient(180deg, var(--gold), #a9782a); box-shadow: 0 0 32px rgba(217, 173, 78, 0.45); }
.podium-spot--2 .podium-riser { height: 84px; background: linear-gradient(180deg, var(--silver), #7d858d); }
.podium-spot--3 .podium-riser { height: 60px; background: linear-gradient(180deg, var(--bronze), #8a5230); }
.podium-spot--1 .podium-tier { color: var(--gold); }
.podium-spot--2 .podium-tier { color: var(--silver); }
.podium-spot--3 .podium-tier { color: var(--bronze); }

.podium-rest { display: flex; flex-direction: column; gap: 0.5rem; }
.podium-rest-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.podium-rest-place { color: var(--ash-dim); font-weight: 700; width: 1.4rem; }
.podium-rest-name { color: #fff; font-weight: 600; flex: 1; }
.podium-rest-tier { color: var(--ember); font-weight: 600; font-size: 0.85rem; }

/* Hall of Fame + Biggest Win lists */
.spotlight-list { display: flex; flex-direction: column; gap: 0.7rem; }
.spotlight-list-row { display: flex; align-items: center; gap: 0.7rem; }
.spotlight-list-medal { width: 1.6rem; text-align: center; }
.spotlight-list-name { color: #fff; font-weight: 600; flex: 1; }
.spotlight-list-value { color: var(--ember); font-weight: 700; font-size: 0.88rem; }

.win-hero { text-align: center; padding: 0.5rem 0; }
.win-hero-name { color: #fff; font-weight: 700; font-size: 1.05rem; margin: 0 0 0.3rem; }
.win-hero-amount { color: var(--gold); font-family: 'Oswald', sans-serif; font-size: 1.9rem; font-weight: 700; }
.win-hero-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(217, 173, 78, 0.15);
  color: var(--gold);
  border: 1px solid rgba(217, 173, 78, 0.4);
}

/* VIP showcase — chip wall */
.vip-showcase { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.vip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(163, 95, 232, 0.12);
  border: 1px solid rgba(163, 95, 232, 0.35);
  color: var(--ash);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Recent activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.activity-row:last-child { border-bottom: none; }
.activity-row:first-child { animation: activityPulse 1.6s ease-out; }
@keyframes activityPulse {
  0% { background: rgba(255, 90, 31, 0.16); }
  100% { background: transparent; }
}
.activity-dot { color: var(--lava); font-size: 0.7rem; }
.activity-text { color: var(--ash); font-size: 0.9rem; flex: 1; }
.activity-text strong { color: #fff; }
.activity-text em { color: var(--ember); font-style: normal; font-weight: 600; }
.activity-time { color: var(--ash-dim); font-size: 0.78rem; white-space: nowrap; }

@media (max-width: 720px) {
  .spotlight-grid { grid-template-columns: 1fr; }
  .podium { gap: 0.5rem; }
  .podium-spot { width: 110px; }
  .podium-badge-wrap { width: 90px; }
}

@media (max-width: 640px) {
  .site-header { padding: 1rem; }
  main { padding: 1rem 1rem 3rem; }
  .site-bg { background-attachment: scroll; }
  .combo-grid { grid-template-columns: 1fr; }
  .profile-top-row { grid-template-columns: 1fr; }
  #chaosDinosCategories { grid-template-columns: 1fr; }
  #bossFightsCategories { grid-template-columns: 1fr; }
  .item-row { flex-wrap: wrap; }
  .item-quicksell-btn { margin-left: auto; }
}
