/* ═══════════════════════════════════════════
   CASE ENGINE — wheel.css v6 (Full Edition)
   Glass-morphism · Deep Space Aesthetic
   Responsive Case Opener Layout
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: pointer; }

*:not(input):not(textarea):not(select) {
  user-select: none;
}

input, textarea, select {
  user-select: text;
  cursor: pointer;
}

:root {
  --bg: #07080f;
  --header-bg: #0d0f1c;
  --panel-bg: #0f1120;
  --surface: #151828;
  --surface-2: #1a1e32;
  --border: #222540;
  --border-hi: #323660;
  --text: #e2e4f6;
  --text-dim: #7880aa;
  --muted: #4a5070;
  --accent: #7c6bff;
  --accent-hi: #a89fff;
  --danger: #ff4560;
  --r-common: #6b7db3;
  --r-uncommon: #4caf8a;
  --r-rare: #4e90e8;
  --r-epic: #9b59f7;
  --r-legendary: #f5a623;
  --r-mythic: #ff4fa3;
}

* { scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent; }

body {
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(124, 107, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(78, 144, 232, 0.05) 0%, transparent 40%);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

#app {
  display: grid;
  grid-template-rows: 1fr;
  min-height: 100vh;
  z-index: 1;
  position: relative;
}

/* ══════════ HEADER ══════════ */
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: none;
  align-items: center; justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 12px;
  user-select: none;
}

.logo-gem {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #7c6bff, #b39dff);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  box-shadow: 0 0 15px rgba(124,107,255,0.5);
  animation: gem-pulse 3s infinite;
}

@keyframes gem-pulse { 
  0%, 100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 15px rgba(124,107,255,0.5); }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 25px rgba(124,107,255,0.8); }
}

.wheel-tabs { display: flex; gap: 5px; background: var(--surface); padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
.wheel-tab {
  background: none; border: none; color: var(--muted); padding: 6px 16px; border-radius: 6px;
  font-size: 11px; cursor: pointer; transition: 0.2s; font-family: 'DM Mono';
}
.wheel-tab.active { background: rgba(124,107,255,0.15); color: var(--text); border: 1px solid rgba(124,107,255,0.3); }

.header-right { display: flex; gap: 10px; }
.nav-btn {
  background: none; border: none; color: var(--muted); font-family: 'DM Mono'; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; padding: 8px 16px; transition: 0.2s;
}
.nav-btn.active { color: var(--accent); background: rgba(124,107,255,0.05); border-radius: 6px; }

/* ══════════ HOME SCREEN ══════════ */
.home-screen {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px;
}

.home-screen.hidden { display: none; }

.home-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.home-head { margin-bottom: 20px; }

.home-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  font-size: 42px;
  color: #f0f4ff;
  text-shadow: 0 4px 18px rgba(95, 146, 255, 0.18);
}

.home-sub {
  color: #99a8cb;
  font-size: 13px;
}

.home-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.home-case-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(26, 30, 50, 0.95), rgba(15, 17, 32, 0.95));
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(220px 70px at 10% 0%, rgba(129, 174, 255, 0.15), transparent 70%),
    repeating-linear-gradient(-30deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 14px);
  opacity: 0.55;
  pointer-events: none;
}

.home-case-card:hover {
  transform: translateY(-4px) rotateX(1.2deg);
  border-color: #86aef7;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.home-case-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 6px;
  color: #ebf3ff;
}

.home-case-meta {
  color: #9aabd1;
  font-size: 12px;
}

.home-engagement {
  display: block;
  margin-bottom: 18px;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.overview-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid #2a2f4a;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(22, 26, 44, 0.9), rgba(12, 16, 28, 0.9));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.overview-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(200px 60px at 15% 0%, rgba(94, 224, 186, 0.15), transparent 65%);
  pointer-events: none;
  opacity: 0.5;
}

.overview-tile:hover {
  transform: translateY(-3px);
  border-color: #5ecdc0;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
}

.overview-label {
  display: block;
  color: #8796bd;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.overview-value {
  display: block;
  color: #f2f6ff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.03em;
  word-break: break-word;
}

.overview-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #9ccfb2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-live-feed {
  border: 1px solid #2a3250;
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(17, 21, 35, 0.95), rgba(11, 14, 25, 0.95));
  padding: 14px;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a9b7d9;
  margin-bottom: 10px;
}

.feed-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(95, 231, 131, 0.32);
  background: rgba(36, 80, 47, 0.28);
  color: #a6e6b5;
}

.feed-list {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #cfdbf5;
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-item-user {
  max-width: 44%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-prize {
  max-width: 56%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #8fb1ff;
}

.hero-live-value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #43d764;
  box-shadow: 0 0 14px rgba(67, 215, 100, 0.8);
  animation: live-dot-pulse 1.4s infinite;
  flex-shrink: 0;
}

@keyframes live-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.72); opacity: 0.6; }
}

.hero-stat-text {
  font-size: 26px;
  line-height: 1.05;
}

.hero-stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hero-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 50px at 20% 0%, rgba(255, 186, 124, 0.13), transparent 70%);
  pointer-events: none;
  opacity: 0.55;
}

.hero-stat-card:hover {
  transform: translateY(-3px);
  border-color: #6e87bc;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
}

#home-total-spins,
#home-biggest-win,
#home-best-item {
  color: #f6d560;
}

#home-biggest-winner {
  color: #8bd8ff;
}

#home-biggest-win-time,
#home-most-recent-open {
  color: #9ef0b1;
}

.about-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.about-media-card,
.about-message-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #2c3756;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(20, 26, 44, 0.94), rgba(11, 15, 27, 0.95));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

.about-media-card {
  padding: 12px;
}

.about-image-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #394f79;
  min-height: 220px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 183, 222, 0.3), rgba(77, 124, 211, 0.25));
}

.about-image-wrap.about-image-fallback::after {
  content: 'YummySAB';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 64px;
  letter-spacing: 0.04em;
  color: rgba(248, 235, 255, 0.86);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-badge {
    margin-bottom: 10px;
    border: 1px solid rgb(112 255 123 / 45%);
    border-radius: 8px;
    padding: 10px;
    background: rgb(2 223 0 / 20%);
    color: #12e92f;
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-message-card {
  padding: 16px;
}

.about-message-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  letter-spacing: 0.03em;
  color: #f2f7ff;
  margin-bottom: 10px;
}

.about-message-text {
  color: #b8c8e8;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.about-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #3a4f78;
  border-radius: 10px;
  padding: 12px;
  text-decoration: none;
  color: #d8e6ff;
  background: linear-gradient(150deg, rgba(26, 34, 57, 0.92), rgba(13, 18, 34, 0.95));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.about-link-card:hover {
  transform: translateY(-2px);
  border-color: #85a9eb;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.about-link-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 16px;
}

.about-link-text {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.admin-access-strip {
  margin-top: 22px;
  border: 1px solid #2a3050;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(16, 20, 36, 0.9), rgba(11, 14, 24, 0.9));
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-access-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8ea0c7;
}

.admin-access-copy {
  color: #9eadcd;
  font-size: 12px;
  flex: 1;
}

.admin-access-btn {
  border: 1px solid #3e5f9f;
  background: linear-gradient(135deg, #152c53, #1d3e72);
  color: #d8ecff;
  border-radius: 8px;
  padding: 9px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-access-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(29, 62, 114, 0.4);
}

#home-best-tier[data-rarity="common"] { color: var(--r-common); }
#home-best-tier[data-rarity="uncommon"] { color: var(--r-uncommon); }
#home-best-tier[data-rarity="rare"] { color: var(--r-rare); }
#home-best-tier[data-rarity="epic"] { color: var(--r-epic); }
#home-best-tier[data-rarity="legendary"] { color: var(--r-legendary); }
#home-best-tier[data-rarity="mythic"] { color: var(--r-mythic); }

@media (min-width: 1025px) {
  .home-shell {
    max-width: 1320px;
  }

  .home-screen {
    padding: 34px 34px 40px;
  }

  /* Hide collapsible headers on desktop */
  .section-header {
    display: none !important;
  }

  /* Show content on desktop */
  .collapsible-section {
    max-height: 10000px !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  .collapsible-section.collapsed {
    max-height: 10000px !important;
    opacity: 1 !important;
  }

  .home-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 18px;
    border-radius: 18px;
    border: 1px solid #2f364f;
    padding: 28px;
    margin-bottom: 26px;
    overflow: hidden;
    background:
      radial-gradient(1000px 260px at 90% -10%, rgba(64, 168, 255, 0.14), transparent 55%),
      radial-gradient(700px 230px at -10% 110%, rgba(255, 186, 92, 0.12), transparent 58%),
      linear-gradient(145deg, rgba(20, 24, 40, 0.98), rgba(10, 13, 24, 0.98));
    box-shadow: 0 28px 46px rgba(0, 0, 0, 0.35);
  }

  .home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
      -35deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 16px
    );
    pointer-events: none;
    opacity: 0.35;
  }

  .home-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-hero-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #9ab2d4;
    margin-bottom: 12px;
  }

  .home-hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 72px;
    line-height: 0.9;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    color: #eef4ff;
    text-shadow: 0 4px 24px rgba(12, 16, 29, 0.75);
  }

  .home-hero-sub {
    color: #9ba8c3;
    font-size: 13px;
    margin-bottom: 18px;
    max-width: 520px;
  }

  .home-hero-btn {
    width: fit-content;
    border: 1px solid #4c7ac0;
    color: #d8ecff;
    background: linear-gradient(135deg, #17335f, #23467d);
    border-radius: 10px;
    padding: 12px 18px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  }

  .home-hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(25, 66, 124, 0.45);
    filter: brightness(1.08);
  }

  .home-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: center;
  }

  .home-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(106px, 1fr));
    gap: 14px;
  }

  .hero-stat-card {
    border: 1px solid #2f4567;
    border-radius: 12px;
    padding: 14px 16px;
    background: linear-gradient(165deg, rgba(16, 24, 40, 0.9), rgba(10, 16, 28, 0.9));
  }

  .hero-stat-label {
    display: block;
    color: #8ba4c7;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 7px;
  }

  .hero-stat-value {
    display: block;
    color: #f0f5ff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0.03em;
  }

  .home-head {
    margin-bottom: 14px;
  }

  .home-title {
    margin-top: 4%;
    font-size: 36px;
  }

  .home-case-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  .home-case-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-color: #2a3250;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .home-case-name {
    margin-bottom: 10px;
  }

  .home-case-meta {
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .home-case-open {
    color: #9ec6ff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
  }

  .about-section {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .view-chances-btn,
  .mobile-only {
    display: none !important;
  }
}

/* ══════════ MAIN SCENE ══════════ */
#wheel-area {
  display: none;
  grid-template-columns: 1fr 320px;
  overflow: hidden;
  position: relative;
}

#wheel-area.show { display: grid; }

.case-toolbar {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 120;
}

.return-btn {
  background: rgba(21, 24, 40, 0.95);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.return-btn:hover { border-color: var(--accent-hi); }

.case-opening-scene {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; position: relative;
}

.case-viewport-wrapper {
  position: relative; width: 100%; max-width: 1000px;
  margin-bottom: 50px;
}

.case-glow-atmosphere {
  position: absolute; inset: -50px;
  background: radial-gradient(ellipse at center, rgba(124,107,255,0.15) 0%, transparent 70%);
  filter: blur(40px); opacity: 0.5; transition: opacity 0.5s;
}

.case-viewport {
  position: relative; height: 180px; width: 100%;
  background: rgba(13, 15, 28, 0.8);
  border: 1px solid var(--border-hi); border-radius: 12px;
  overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.selector-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: var(--accent); z-index: 100; transform: translateX(-50%);
  box-shadow: 0 0 20px var(--accent);
}

.case-reel {
  display: flex; position: absolute; left: 0; top: 0; height: 100%;
  align-items: center; will-change: transform;
}

.case-item {
  width: 150px; height: 150px; margin: 0 10px; flex-shrink: 0;
  background: var(--surface); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 15px; border-bottom: 5px solid var(--muted);
  transition: transform 0.3s;
}

.case-item .item-rarity { font-size: 9px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.case-item .item-name { font-family: 'Bebas Neue'; font-size: 20px; text-align: center; color: var(--text); line-height: 1.1; }

/* Rarity Variations */
.case-item.common { border-color: var(--r-common); }
.case-item.uncommon { border-color: var(--r-uncommon); }
.case-item.rare { border-color: var(--r-rare); }
.case-item.epic { border-color: var(--r-epic); }
.case-item.legendary { border-color: var(--r-legendary); }
.case-item.mythic { border-color: var(--r-mythic); box-shadow: inset 0 0 20px rgba(255, 79, 163, 0.15); }

/* ══════════ INTERACTION ══════════ */
.interaction-zone { text-align: center; width: 100%; max-width: 450px; }
.wheel-name-display { font-family: 'Bebas Neue'; font-size: 42px; letter-spacing: 0.05em; margin-bottom: 5px; color: var(--text); }
.wheel-name-sub { color: var(--muted); font-size: 12px; margin-bottom: 30px; }

.view-chances-btn {
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  margin-bottom: 20px;
}

.view-chances-btn:hover {
  border-color: var(--accent);
  background: rgba(124, 107, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 107, 255, 0.2);
}

.view-chances-btn:active {
  transform: translateY(0);
}

.controls-card {
  background: var(--header-bg); border: 1px solid var(--border);
  padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.key-input-wrapper { display: flex; gap: 10px; margin-bottom: 12px; }
.key-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border-hi);
  padding: 14px; border-radius: 8px; color: #fff; font-family: 'DM Mono'; font-size: 14px;
  transition: border-color 0.2s;
}
.key-input:focus { border-color: var(--accent); outline: none; }

.validate-btn {
  background: var(--accent); border: none; padding: 0 20px; border-radius: 8px;
  color: #fff; font-family: 'Bebas Neue'; font-size: 16px; cursor: pointer; transition: 0.2s;
}
.validate-btn:hover { background: var(--accent-hi); }
.validate-btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

.key-status { font-size: 11px; color: var(--muted); display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; min-height: 16px; }
.key-status.ok { color: var(--r-uncommon); }
.key-status.err { color: var(--danger); }

.spin-btn {
  width: 100%; padding: 20px; border-radius: 12px; border: 1px solid var(--border-hi);
  background: var(--surface); color: var(--muted); font-family: 'Bebas Neue';
  font-size: 28px; letter-spacing: 0.1em; cursor: not-allowed; transition: all 0.3s;
}
.spin-btn.ready {
  background: linear-gradient(135deg, var(--accent), #4a3cb8);
  color: #fff; cursor: pointer; border: none;
  box-shadow: 0 0 30px rgba(124,107,255,0.3);
}
.spin-btn.ready:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(124,107,255,0.5); }

/* ══════════ SIDEBAR ══════════ */
.prize-sidebar {
  background: var(--panel-bg); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-header { padding: 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.block-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); font-weight: 500; }
.stats-mini { font-size: 10px; color: var(--muted); }
.prizes-scroll { flex: 1; overflow-y: auto; padding: 15px; }

.prize-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--surface); border-radius: 8px; margin-bottom: 6px;
  border: 1px solid transparent; transition: 0.2s;
}
.prize-item:hover { border-color: var(--border-hi); background: var(--surface-2); }
.prize-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.prize-name { flex: 1; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prize-pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ══════════ ADMIN PANEL ══════════ */
#admin-panel {
  display: none; position: fixed; inset: 0;
  background: var(--bg); z-index: 500; overflow-y: auto; padding: 40px;
}
#admin-panel.show { display: block; }

.admin-analytics-row {
  max-width: 1400px;
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 14px;
}

.admin-analytics-card {
  background: linear-gradient(165deg, rgba(14, 17, 32, 0.96), rgba(10, 13, 24, 0.96));
  border: 1px solid #2a3150;
  border-radius: 14px;
  padding: 14px;
  min-height: 220px;
}

.admin-analytics-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.admin-analytics-label {
  color: #8a9ec8;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-analytics-value {
  color: #f3f6ff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 68px;
  line-height: 1;
}

.admin-analytics-foot {
  color: #7d8db4;
  font-size: 12px;
}

.admin-analytics-head {
  color: #c8d9ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.admin-chart-wrap {
  position: relative;
  min-height: 180px;
  height: calc(100% - 24px);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-history-card {
  grid-column: 1 / -1;
}

.admin-card {
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
}

.admin-card-title {
  font-family: 'Bebas Neue';
  font-size: 20px;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.admin-card-title span { font-size: 11px; color: var(--muted); font-family: 'DM Mono'; letter-spacing: 0.05em; font-weight: 400; }

/* Admin Form Elements */
.form-row { display: flex; gap: 8px; margin-bottom: 12px; }
.form-input { 
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: 6px; 
  color: var(--text); font-family: 'DM Mono'; font-size: 12px; padding: 10px; outline: none; transition: border-color 0.2s; width: 100%;
}
.form-input:focus { border-color: var(--accent); }

/* Admin Lists */
.admin-list, .key-list, .wheel-manager-list {
  list-style: none; max-height: 330px; overflow-y: auto; 
  border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.2);
}
.admin-list li, .key-list li, .wheel-manager-list li {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; font-size: 12px;

}
.admin-list li:last-child, .key-list li:last-child, .wheel-manager-list li:last-child { border-bottom: none; }

.wheel-manager-list li { cursor: pointer; transition: background 0.2s; }
.wheel-manager-list li:hover { background: var(--surface); }
.wheel-manager-list li.active-wheel { border-left: 3px solid var(--accent); background: rgba(124, 107, 255, 0.1); }

.wheel-name-chip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 74%;
}

.wheel-actions {
  display: inline-flex;
  gap: 6px;
}

.admin-inline-meta {
  color: #6e7ba4;
}

/* Admin Buttons */
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border-hi);
  background: var(--surface-2); color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s;
}
.icon-btn.add { border-color: rgba(76, 175, 138, 0.4); color: var(--r-uncommon); }
.icon-btn.add:hover { background: var(--r-uncommon); color: #fff; border-color: var(--r-uncommon); }
.icon-btn.del { border-color: rgba(255, 69, 96, 0.4); color: var(--danger); }
.icon-btn.del:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.form-row .icon-btn.add {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  height: 40px;
}

.gen-row { display: flex; gap: 10px; margin-bottom: 10px; }
.gen-btn {
  flex: 1; background: transparent; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 6px; padding: 10px; font-family: 'Bebas Neue'; font-size: 16px;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s;
}
.gen-btn:hover { background: var(--accent); color: #fff; box-shadow: 0 0 15px rgba(124, 107, 255, 0.3); }

.admin-cases-card .gen-btn {
  margin-top: 10px;
}

.key-list-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.key-action-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-family: 'DM Mono';
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2%;
}

.key-action-btn:hover {
  background: var(--accent);
  color: #fff;
}

.key-action-btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.key-action-btn.danger:hover {
  background: var(--danger);
  color: #fff;
}

.key-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  margin: 4%;
}

.key-card:hover {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(124, 107, 255, 0.15);
}

.key-card.key-valid:hover {
  box-shadow: 0 4px 12px rgba(67, 215, 100, 0.15);
}

.key-card.key-used {
  opacity: 0.75;
}

.key-card.key-used:hover {
  box-shadow: 0 4px 12px rgba(255, 69, 96, 0.15);
}

.key-code {
  font-family: 'DM Mono', monospace;
  color: #d6e3ff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.key-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.key-badge.valid {
  background: rgba(67, 215, 100, 0.2);
  color: #43d764;
  border: 1px solid rgba(67, 215, 100, 0.5);
}

.key-badge.used {
  background: rgba(255, 69, 96, 0.2);
  color: #ff4560;
  border: 1px solid rgba(255, 69, 96, 0.5);
}

.key-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-container {
  width: 100%;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.leaderboard-table tbody tr {
  display: grid;
  grid-template-columns: 40px 1fr 60px;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover {
  background: rgba(124, 107, 255, 0.05);
}

.lb-rank {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.lb-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-count {
  color: var(--accent);
  font-weight: 600;
  text-align: right;
}

.leaderboard-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.session-log {
  background: #05060a; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; height: 120px; overflow-y: auto; font-size: 11px; color: var(--muted); line-height: 1.6; margin-top: 10px;
}

/* ══════════ RESULT OVERLAY ══════════ */
#result-overlay {
  position: fixed; inset: 0; background: rgba(5, 7, 13, 0.95);
  display: none; align-items: center; justify-content: center; z-index: 1000;
  backdrop-filter: blur(8px);
}
#result-overlay.show { display: flex; }

.result-card {
  background: #0d0f1e; padding: 60px; border-radius: 24px; text-align: center;
  border: 1px solid var(--border-hi); max-width: 500px; width: 90%;
  animation: card-pop 0.5s cubic-bezier(0.17, 0.89, 0.32, 1.27);
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}
@keyframes card-pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.result-eyebrow { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.3em; margin-bottom: 20px; }
.result-rarity { display: inline-block; padding: 5px 15px; border-radius: 20px; font-size: 11px; font-weight: bold; margin-bottom: 15px; text-transform: uppercase; background: rgba(255,255,255,0.05); }
.result-prize-name { font-family: 'Bebas Neue'; font-size: 60px; line-height: 1; margin-bottom: 40px; color: var(--text); }

.warning-text { font-size: 10px; color: var(--danger); margin-bottom: 15px; opacity: 0.8; }
.anon-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 12px;
}

.anon-toggle input {
  accent-color: #43d764;
}

.claim-btn {
  width: 100%; padding: 18px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-family: 'Bebas Neue';
  font-size: 20px; cursor: pointer; transition: 0.2s;
}
.claim-btn:hover { background: var(--accent-hi); }
.claim-btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

.close-result {
  display: block; width: 100%; padding: 15px; background: transparent; border: 1px solid var(--border-hi);
  border-radius: 12px; color: var(--text-dim); font-family: 'DM Mono'; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.14em; cursor: pointer; transition: all 0.2s; margin-top: 20px;
}
.close-result:hover { background: var(--surface); color: var(--text); }

/* ══════════ APP MODAL ══════════ */
.app-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(4px); }
.app-modal.show { display: flex; }
.app-modal-card { background: #0d1020; border: 1px solid var(--border-hi); border-radius: 14px; padding: 25px; width: 420px; max-width: 90vw; box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
.app-modal-title { font-family: 'Bebas Neue'; font-size: 24px; margin-bottom: 10px; color: var(--text); }
.app-modal-message { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }
.app-modal-input { width: 100%; background: var(--surface); border: 1px solid var(--border-hi); padding: 12px; border-radius: 6px; color: #fff; margin-bottom: 20px; font-family: 'DM Mono'; outline: none; }
.app-modal-input:focus { border-color: var(--accent); }
.app-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.app-modal-btn { padding: 10px 20px; border-radius: 6px; border: none; cursor: pointer; font-family: 'Bebas Neue'; font-size: 16px; transition: 0.2s; }
#app-modal-ok { background: var(--accent); color: #fff; }
#app-modal-ok:hover { background: var(--accent-hi); }
#app-modal-cancel { background: var(--surface-2); color: var(--muted); }
#app-modal-cancel:hover { background: var(--surface); color: var(--text-dim); }

/* ══════════ CHANCE MODAL ══════════ */
.chance-modal-content {
  max-height: 400px;
  overflow-y: auto;
  padding: 5px 0;
}

.chance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.chance-table thead {
  position: sticky;
  top: 0;
  background: rgba(21, 24, 40, 0.9);
  z-index: 1;
}

.chance-table thead th {
  padding: 10px 8px;
  text-align: left;
  color: #9ba8c3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.chance-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.chance-row:hover {
  background: rgba(124, 107, 255, 0.08);
}

.chance-row td {
  padding: 10px 8px;
  color: var(--text);
}

.chance-name {
  font-weight: 500;
  color: #eef4ff;
}

.chance-rarity {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.chance-percent {
  text-align: right;
  color: #f6d560;
  font-weight: 600;
}

/* Rarity-specific row colors */
.chance-common .chance-rarity { color: #6b7db3; }
.chance-uncommon .chance-rarity { color: #4caf8a; }
.chance-rare .chance-rarity { color: #4e90e8; }
.chance-epic .chance-rarity { color: #9b59f7; }
.chance-legendary .chance-rarity { color: #f5a623; }
.chance-mythic .chance-rarity { color: #ff4fa3; }

/* ══════════ COLLAPSIBLE SECTIONS ══════════ */
.section-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 12px;
  margin-bottom: 12px;
  user-select: none;
  border: 1px solid #2a3353;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(21, 26, 43, 0.9), rgba(13, 17, 30, 0.9));
}

.section-header h3 {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0;
}

.section-header:hover h3 {
  color: #dce9ff;
}

.section-toggle-pill {
  min-width: 62px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #3c568a;
  color: #bcd7ff;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(25, 49, 88, 0.45);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.section-toggle-pill[data-state="expanded"] {
  border-color: #55b88b;
  color: #bcf9d8;
  background: rgba(22, 89, 59, 0.35);
}

.collapsible-section {
  max-height: 10000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.collapsible-section.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ══════════ SKELETON LOADER ══════════ */
.app-skeleton {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3500;
  background:
    radial-gradient(circle at 15% 10%, rgba(90, 141, 255, 0.12), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(63, 208, 170, 0.1), transparent 42%),
    #07080f;
  padding: 22px;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-skeleton.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.app-loading #app,
body.app-loading #admin-panel,
body.app-loading #result-overlay,
body.app-loading .app-modal {
  pointer-events: none;
}

body.app-loading .skeleton-target {
  position: relative;
  overflow: hidden;
  border-color: rgba(74, 92, 142, 0.52) !important;
  box-shadow: inset 0 0 0 1px rgba(103, 131, 199, 0.14);
}

body.app-loading .skeleton-target::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(105deg, rgba(22, 27, 48, 0.96) 20%, rgba(64, 86, 145, 0.82) 38%, rgba(20, 25, 46, 0.96) 60%),
    radial-gradient(circle at 18% 16%, rgba(131, 189, 255, 0.22), transparent 42%);
  background-size: 230% 100%, 100% 100%;
  animation: skeleton-shimmer 1s linear infinite;
  z-index: 4;
}

body.app-loading .skeleton-target,
body.app-loading .skeleton-target * {
  color: transparent !important;
  text-shadow: none !important;
}

body.app-loading .skeleton-target > * {
  opacity: 0 !important;
}

body.content-reveal .skeleton-target {
  animation: content-settle-in 560ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

body.app-loading .home-case-grid.skeleton-target {
  min-height: 180px;
  border: 1px solid #2e3554;
  border-radius: 12px;
}

body.app-loading .admin-list.skeleton-target,
body.app-loading .key-list.skeleton-target,
body.app-loading .wheel-manager-list.skeleton-target {
  min-height: 180px;
}

.skeleton-home-wrap,
.skeleton-wheel-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.skeleton-home-wrap {
  grid-template-columns: 1fr;
}

.skeleton-wheel-wrap {
  max-width: 980px;
  margin-top: 24px;
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.skeleton-block {
  border-radius: 12px;
  border: 1px solid #2e3554;
  background: linear-gradient(105deg, rgba(22, 28, 48, 0.95) 20%, rgba(64, 86, 145, 0.82) 38%, rgba(20, 25, 46, 0.95) 60%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1s linear infinite;
}

.skeleton-hero { height: 260px; }
.skeleton-card { height: 126px; }
.skeleton-stat { height: 100px; }
.skeleton-toolbar { width: 140px; height: 38px; }
.skeleton-reel { height: 190px; }
.skeleton-title { width: 330px; height: 54px; }
.skeleton-controls { height: 188px; }

@keyframes skeleton-shimmer {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

@keyframes content-settle-in {
  0% {
    opacity: 0.35;
    transform: translateY(8px) scale(0.995);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ══════════ MOBILE ADAPTATIONS ══════════ */
@media (max-width: 1024px) {
  #wheel-area { grid-template-columns: 1fr; }
  .prize-sidebar { display: none; }
  .case-viewport { height: 140px; }
  .case-item { width: 120px; height: 120px; }
  .interaction-zone { padding: 0 10px; }
  .admin-analytics-row { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .case-opening-scene { padding: 10px 12px 20px; }
  .controls-card { padding: 18px; }
  .home-screen { padding: 16px; }
  .home-title { font-size: 30px; }
  .case-toolbar { top: 10px; left: 10px; }
  .home-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #2f364f;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    background:
      radial-gradient(700px 240px at 90% -10%, rgba(64, 168, 255, 0.14), transparent 58%),
      radial-gradient(560px 200px at -10% 120%, rgba(255, 186, 92, 0.12), transparent 58%),
      linear-gradient(145deg, rgba(20, 24, 40, 0.98), rgba(10, 13, 24, 0.98));
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  }
  .home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
      -35deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 16px
    );
    pointer-events: none;
    opacity: 0.32;
  }
  .home-hero-copy { position: relative; z-index: 1; }
  .home-hero-title { font-size: 44px; line-height: 0.92; margin-bottom: 8px; }
  .home-hero-sub { font-size: 12px; margin-bottom: 12px; }
  .home-hero-btn { width: 100%; padding: 12px; border: 1px solid #3f629e; border-radius: 10px; }
  .home-hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .hero-stat-card { border: 1px solid #2f4567; padding: 10px 12px; border-radius: 10px; background: linear-gradient(165deg, rgba(16, 24, 40, 0.85), rgba(10, 16, 28, 0.85)); }
  .hero-stat-value { font-size: 24px; }
  .hero-stat-text { font-size: 20px; }
  .home-overview-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .overview-tile { padding: 10px; border-radius: 10px; }
  .overview-value { font-size: 24px; }
  .about-section { grid-template-columns: 1fr; gap: 10px; }
  .about-message-title { font-size: 30px; }
  
  /* Collapsible sections on mobile */
  .section-header { display: flex; }
  .home-case-grid { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #2a2f4a; }
  .home-engagement { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #2a2f4a; }
  .about-section { margin-top: 12px; }
  
  /* Ensure about-section displays correctly inside collapsible */
  #about-section .about-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .about-links { grid-template-columns: 1fr; }

  .skeleton-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wheel-name-display { font-size: 32px; }
  .wheel-name-sub { font-size: 11px; margin-bottom: 18px; }
  .key-input-wrapper { flex-direction: column; }
  .validate-btn { min-height: 42px; }
  .spin-btn { font-size: 22px; padding: 16px; }
  .case-viewport { height: 120px; }
  .case-item { width: 100px; height: 100px; margin: 0 8px; padding: 10px; }
  .case-item .item-name { font-size: 16px; }
  .home-case-grid { grid-template-columns: 1fr; }
  .home-overview-grid { grid-template-columns: 1fr; }
  .home-hero {
    border-width: 1px;
    border-radius: 15px;
    padding: 14px;
  }
  .home-hero-kicker {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #9ab2d4;
    margin-bottom: 8px;
    display: block;
  }
  .home-hero-title { 
    font-size: 56px;
    line-height: 0.9;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    color: #eef4ff;
    text-shadow: 0 2px 12px rgba(12, 16, 29, 0.6);
  }
  .home-hero-sub { 
    font-size: 12px;
    margin-bottom: 12px;
    color: #9ba8c3;
    line-height: 1.4;
  }
  .home-hero-btn {
    width: 100%;
    border: 1px solid #4c7ac0;
    color: #d8ecff;
    background: linear-gradient(135deg, #17335f, #23467d);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    font-weight: 500;
  }
  .home-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(25, 66, 124, 0.4);
    filter: brightness(1.1);
  }
  .home-hero-btn:active {
    transform: translateY(0);
  }
  .home-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  .hero-stat-label {
    display: block;
    color: #7a8ead;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    font-weight: 500;
  }
  .hero-stat-value {
    display: block;
    color: #f6d560;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0.02em;
  }
  .hero-stat-value.hero-stat-text { font-size: 22px; }
  .hero-stat-value.hero-live-value { color: #9ef0b1; }
  .home-case-card { padding: 14px; }
  .feed-item { font-size: 11px; }
  .about-badge { font-size: 11px; }
  
  /* Mobile-specific collapsible section spacing */
  .home-case-grid { 
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  .home-engagement {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  
  /* Hide descriptive headers on mobile (replaced by collapsible headers) */
  .section-header + .collapsible-section {
    margin-top: -8px;
  }
  
  /* Mobile chances modal */
  .app-modal-card {
    width: 95vw;
    max-width: 95vw;
    padding: 16px;
  }
  
  .app-modal-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .chance-modal-content {
    max-height: 300px;
  }
  
  .chance-table {
    font-size: 11px;
  }
  
  .chance-table thead th {
    padding: 8px 6px;
    font-size: 9px;
  }
  
  .chance-row td {
    padding: 8px 6px;
  }
  
  .mobile-only.view-chances-btn {
    font-size: 10px;
    padding: 6px 12px;
    margin-bottom: 16px;
  }

  .admin-access-strip {
    padding: 12px;
  }

  .admin-access-copy {
    width: 100%;
    flex: initial;
  }

  .skeleton-hero { height: 210px; }
  .skeleton-title { width: 220px; }
  .skeleton-row { grid-template-columns: 1fr; }
}

/* ══════════ CONFETTI ══════════ */
.confetti-piece { position: fixed; pointer-events: none; z-index: 2000; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
