*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #3ecf4a;
  --green-pump: #70e0b0;
  --green-bright: #5dff6a;
  --green-light: #9ee8b8;
  --green-dark: #1a8f28;
  --green-deep: #0b4d14;
  --gold: #ffd54a;
  --gold-deep: #c9920a;
  --bg: #060806;
  --surface: rgba(12, 18, 12, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text-muted: rgba(255, 255, 255, 0.5);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: #fff;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(11, 77, 20, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 15%, rgba(62, 207, 74, 0.035) 0%, transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(112, 224, 176, 0.012) 3px,
      rgba(112, 224, 176, 0.012) 6px
    ),
    linear-gradient(165deg, #040604 0%, var(--bg) 38%, #030403 100%);
}

.bg-brushes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: -1;
  overflow: hidden;
  opacity: 0.55;
}

.stroke-canvas {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  transform: rotate(-2deg);
}

.stroke {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stroke-1 { stroke: #3ecf4a; stroke-width: 72; opacity: 0.05; }
.stroke-2 { stroke: #1a8f28; stroke-width: 55; opacity: 0.04; }
.stroke-3 { stroke: #0b4d14; stroke-width: 64; opacity: 0.045; }
.stroke-4 { stroke: #70e0b0; stroke-width: 48; opacity: 0.035; }
.stroke-5 { stroke: #1a6b24; stroke-width: 58; opacity: 0.035; }
.stroke-6 { stroke: #5dff6a; stroke-width: 38; opacity: 0.03; }
.stroke-7 { stroke: #0b4d14; stroke-width: 44; opacity: 0.025; }

.bg-cards {
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  overflow: hidden;
}

.bg-float-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: auto;
  opacity: var(--card-opacity, 0.14);
  filter: brightness(0.82) saturate(0.9);
  transform: rotate(var(--rot, 0deg));
  animation: bg-float-drift var(--duration, 30s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

@keyframes bg-float-drift {
  0%,
  100% {
    transform: translate(0, 0) rotate(var(--rot, 0deg));
  }
  33% {
    transform: translate(var(--dx, 12px), var(--dy, -10px)) rotate(calc(var(--rot, 0deg) + 5deg));
  }
  66% {
    transform: translate(calc(var(--dx, 12px) * -0.55), calc(var(--dy, -10px) * 1.15))
      rotate(calc(var(--rot, 0deg) - 4deg));
  }
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 35% at 50% 18%, rgba(62, 207, 74, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 72%, rgba(255, 213, 74, 0.04), transparent 65%),
    radial-gradient(ellipse 110% 85% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.38) 100%);
}

/* ── Top bar ── */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: rgba(6, 8, 6, 0.92);
  backdrop-filter: blur(20px);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.chip-ca {
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(62, 207, 74, 0.35);
  background: rgba(62, 207, 74, 0.08);
  max-width: min(42vw, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.chip-ca-ready {
  cursor: pointer;
}

.chip-ca-ready:hover {
  border-color: rgba(62, 207, 74, 0.55);
  background: rgba(62, 207, 74, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

.chip-ca.is-copied {
  border-color: rgba(255, 213, 74, 0.45);
  background: rgba(255, 213, 74, 0.12);
  color: #ffd54a;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - 56px);
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 2rem;
  display: flex;
  flex-direction: column;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
}

.chip-link {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.chip-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.chip-collection {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #08120a;
  background: var(--green-light);
  border: 2px solid rgba(62, 207, 74, 0.75);
  box-shadow: 0 0 18px rgba(62, 207, 74, 0.28);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.chip-collection:hover {
  color: #061008;
  background: #c2f7d4;
  border-color: var(--green-bright);
  box-shadow: 0 0 22px rgba(93, 255, 106, 0.35);
  transform: translateY(-1px);
}

.chip-collection.chip-active {
  color: var(--gold);
  background: rgba(255, 213, 74, 0.16);
  border-color: rgba(255, 213, 74, 0.55);
  box-shadow: 0 0 16px rgba(255, 213, 74, 0.22);
}

.chip-active {
  color: var(--gold);
  border-color: rgba(255, 213, 74, 0.35);
}

.chip-wallet {
  color: var(--green-bright);
  border-color: rgba(62, 207, 74, 0.35);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  padding: 0.42rem 0.75rem;
}

.btn-wallet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid rgba(255, 213, 74, 0.45);
  background: rgba(255, 213, 74, 0.1);
  color: var(--gold);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-wallet:hover:not(:disabled) {
  background: rgba(255, 213, 74, 0.18);
  transform: translateY(-1px);
}

.btn-wallet:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-wallet.connected {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}

.btn-wallet-lg {
  font-size: 0.82rem;
  padding: 0.85rem 1.6rem;
}

.chip-live {
  color: var(--green-bright);
  border-color: rgba(62, 207, 74, 0.35);
}

.chip-live .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
  margin-right: 0.35rem;
  box-shadow: 0 0 8px var(--green-bright);
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Hero copy ── */

.hero-copy {
  position: absolute;
  top: 1.5rem;
  left: clamp(2rem, 5.5vw, 4.25rem);
  max-width: min(460px, 44vw);
  margin: 0;
  padding: 0;
  z-index: 2;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-copy.hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-copy h1 .accent {
  color: var(--green-bright);
  text-shadow: 0 0 30px rgba(93, 255, 106, 0.25);
}

.lede {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 52ch;
}

.lede strong {
  color: #fff;
  font-weight: 600;
}

/* ── Game rules (home, left) ── */

.game-rules-title {
  font-size: clamp(1.35rem, 3.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-pump);
  text-shadow: 0 0 20px rgba(112, 224, 176, 0.22);
  margin-bottom: 0.65rem;
}

.rules-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  max-width: 280px;
  margin-bottom: 0.35rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(112, 224, 176, 0.45);
  border-radius: 10px;
  background: rgba(112, 224, 176, 0.08);
  color: var(--green-pump);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.rules-toggle:hover {
  background: rgba(112, 224, 176, 0.14);
  border-color: rgba(112, 224, 176, 0.65);
  box-shadow: 0 0 18px rgba(112, 224, 176, 0.12);
}

.rules-toggle:active {
  transform: translateY(1px);
  background: rgba(112, 224, 176, 0.18);
}

.rules-toggle[aria-expanded="true"] {
  background: rgba(112, 224, 176, 0.16);
  border-color: rgba(112, 224, 176, 0.7);
}

.rules-toggle-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.rules-toggle[aria-expanded="true"] .rules-toggle-chevron {
  transform: rotate(-135deg) translateY(1px);
}

.rules-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-panel.is-open {
  grid-template-rows: 1fr;
}

.rules-panel-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.35s ease,
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.rules-panel.is-open .rules-panel-inner {
  opacity: 1;
  transform: translateY(0);
}

.rules-panel.is-open .rules-panel-inner {
  padding-top: 0.55rem;
}

@media (prefers-reduced-motion: reduce) {
  .rules-panel,
  .rules-panel-inner,
  .rules-toggle-chevron {
    transition: none;
  }

  .rules-panel-inner {
    transform: none;
  }
}

.rules-block {
  margin-bottom: 1rem;
}

.rules-heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.4rem;
}

.rules-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.rules-text strong {
  color: #fff;
  font-weight: 600;
}

.rules-list {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.rules-list li {
  margin-bottom: 0.35rem;
}

.rules-list strong {
  color: #fff;
  font-weight: 600;
}

.rules-tiers .tier-mythic { color: #ffd54a; }
.rules-tiers .tier-epic { color: #7ee87a; }
.rules-tiers .tier-gold { color: #ffd54a; }
.rules-tiers .tier-silver { color: #c8d0dc; }
.rules-tiers .tier-none { color: rgba(255, 255, 255, 0.35); }

.rules-formula {
  margin: 0.35rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(93, 255, 106, 0.18);
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.rules-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-bright);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.rules-link:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(93, 255, 106, 0.35);
}

/* ── Payout equation page ── */

.site-equation {
  padding-top: 2rem;
  max-width: 760px;
}

.equation-hero {
  margin-bottom: 2rem;
}

.equation-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.equation-panel {
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.32);
}

.equation-panel h2 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 0.65rem;
  color: #fff;
}

.equation-panel p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.equation-panel p:last-child {
  margin-bottom: 0;
}

.equation-math {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(93, 255, 106, 0.06);
  border: 1px solid rgba(93, 255, 106, 0.14);
}

.equation-math-main {
  font-size: 0.95rem;
}

.equation-note,
.equation-example,
.equation-run {
  font-size: 0.86rem !important;
}

.equation-example {
  border-left: 2px solid rgba(255, 213, 74, 0.45);
  padding-left: 0.85rem !important;
}

.weight-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
}

.weight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.weight-table th,
.weight-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weight-table th {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.weight-table td {
  color: var(--text-muted);
}

.weight-table tfoot td {
  border-bottom: none;
  color: #fff;
  padding-top: 0.65rem;
}

.code-block {
  margin: 0.75rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(220, 230, 240, 0.92);
}

.code-block code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  white-space: pre;
}

.equation-back {
  margin-top: 0.5rem;
}

/* ── Main game area ── */

#app {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52vh;
  margin-top: 0;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#screen-home {
  justify-content: center;
  gap: 0;
  padding-top: 0.5rem;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Jackpot (home) ── */

.jackpot-block {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: -3.5rem;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.jackpot-card {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 1.65rem 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.jackpot-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.jackpot-label {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

#screen-home .jackpot-bag-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  border-radius: 13px;
  background: rgba(62, 207, 74, 0.07);
  border: 1px solid rgba(62, 207, 74, 0.18);
  margin: 0;
}

.jackpot-bag {
  width: 46px;
  height: auto;
  object-fit: contain;
}

.jackpot-amount {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.2rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
  background: linear-gradient(
    105deg,
    #fff6c8 0%,
    #ffd54a 28%,
    #fff9e0 48%,
    #e6b800 72%,
    #ffd54a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(255, 213, 74, 0.45));
  animation: jackpot-shine 2.8s ease-in-out infinite;
}

@keyframes jackpot-shine {
  0%,
  100% {
    background-position: 0% center;
    filter: drop-shadow(0 0 14px rgba(255, 213, 74, 0.35));
  }
  50% {
    background-position: 100% center;
    filter: drop-shadow(0 0 28px rgba(255, 213, 74, 0.65));
  }
}

.case-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#screen-home .case-stage {
  margin-top: 2.75rem;
  animation: case-float 3.6s ease-in-out infinite;
  overflow: visible;
}


.case-glow {
  position: absolute;
  width: min(90vw, 480px);
  height: min(70vw, 360px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(62, 207, 74, 0.14), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

#screen-home .case-img {
  filter: none;
}

/* ── Possible drops bar (home footer) ── */

.case-drops-bar {
  margin-top: auto;
  padding-top: 2rem;
  padding-bottom: 0.5rem;
  width: 100%;
  overflow: visible;
  transition: opacity 0.35s ease;
}

.case-drops-bar.dim {
  opacity: 0.35;
}

.case-drops-bar-title {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.case-drops-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  overflow: visible;
}

.case-drops-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
  width: min(100%, 720px);
  margin: 0 auto;
  overflow: visible;
}

.case-drop-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 56px;
  min-width: 0;
  transform-origin: center bottom;
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    z-index 0s;
}

.case-drop-item img {
  width: 100%;
  max-width: 56px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  transition: filter 0.22s ease;
}

.case-drop-name {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.82);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-drop-item.tier-mythic .case-drop-name { color: #ffd54a; }
.case-drop-item.tier-epic .case-drop-name { color: #c77dff; }
.case-drop-item.tier-gold .case-drop-name { color: #ffe566; }
.case-drop-item.tier-silver .case-drop-name { color: #c8d4e0; }
.case-drop-item.tier-none .case-drop-name { color: rgba(255, 255, 255, 0.45); }

.case-drop-item-jackpot img {
  max-width: 48px;
  aspect-ratio: 1;
  filter: drop-shadow(0 4px 12px rgba(255, 213, 74, 0.35));
}

.case-drop-jackpot-label {
  font-size: 0.44rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  background: linear-gradient(
    105deg,
    #fff6c8 0%,
    #ffd54a 28%,
    #fff9e0 48%,
    #e6b800 72%,
    #ffd54a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 213, 74, 0.35));
  animation: jackpot-shine 2.8s ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
  .case-drops-bar .case-drop-item {
    cursor: pointer;
  }

  .case-drops-bar .case-drop-item:hover,
  .case-drops-bar .case-drop-item:focus-visible {
    z-index: 20;
    transform: scale(2.35) translateY(-6px);
  }

  .case-drops-bar .case-drop-item:hover img,
  .case-drops-bar .case-drop-item:focus-visible img {
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
  }

  .case-drops-bar .case-drop-item-jackpot:hover img,
  .case-drops-bar .case-drop-item-jackpot:focus-visible img {
    filter: drop-shadow(0 10px 24px rgba(255, 213, 74, 0.55));
  }
}

@media (max-width: 640px) {
  .case-drop-item {
    width: 48px;
  }

  .case-drop-item img {
    max-width: 48px;
  }

  .case-drop-name {
    font-size: 0.42rem;
  }

  @media (hover: hover) and (pointer: fine) {
    .case-drops-bar .case-drop-item:hover,
    .case-drops-bar .case-drop-item:focus-visible {
      transform: scale(2.1) translateY(-4px);
    }
  }
}

@keyframes case-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.case-glow-bright {
  background: radial-gradient(ellipse, rgba(255, 213, 74, 0.22), rgba(62, 207, 74, 0.1) 45%, transparent 70%);
  animation: glow-pulse 1s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.case-wrap {
  position: relative;
  width: min(82vw, 480px);
  aspect-ratio: 1006 / 745;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-wrap.opening {
  display: grid;
  place-items: center;
}

.case-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}

.case-wrap.opening .case-layer {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#layer-closed {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.55s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

#layer-open {
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  transition: opacity 0.7s ease 0.15s, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.case-wrap.opening.reveal #layer-closed {
  opacity: 0;
  transform: scale(1.04) translateY(-6px);
}

.case-wrap.opening.reveal #layer-open {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ── Home buttons ── */

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.65rem;
  width: min(92vw, 420px);
}

#screen-home .home-actions {
  margin-top: 1.75rem;
}

.cases-left {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green-bright);
}

.cases-left.muted {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.case-eligibility {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.case-eligibility.eligible {
  color: var(--green-bright);
}

.case-eligibility.blocked {
  color: rgba(255, 180, 120, 0.9);
}

.case-eligibility.error {
  color: rgba(255, 120, 120, 0.95);
}

.case-eligibility-hint {
  flex: 1 1 100%;
  margin: 0.1rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.38);
  font-style: italic;
}

.case-eligibility-hint.hidden {
  display: none;
}

.btn-open,
.btn-test {
  border: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: inherit;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-open {
  flex: 2;
  background: var(--green-light);
  color: #0c1a10;
}

.btn-test {
  flex: 1;
  background: #d4d4d4;
  color: #2a2a2a;
}

.btn-open:hover:not(:disabled),
.btn-test:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-open:active:not(:disabled),
.btn-test:active:not(:disabled) {
  transform: translateY(0);
}

.btn-open:disabled,
.btn-test:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ── Retry ── */

.btn-retry {
  border: 2px solid var(--green);
  background: rgba(62, 207, 74, 0.08);
  color: var(--green-bright);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 0 24px rgba(62, 207, 74, 0.15);
}

.btn-retry:hover {
  background: rgba(62, 207, 74, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(62, 207, 74, 0.3);
}

/* ── Spin ── */

#screen-spin {
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

.reel-zone {
  position: relative;
  z-index: 2;
  width: min(96vw, 900px);
  text-align: center;
}

.spin-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.85rem;
}

.reel-window {
  position: relative;
  overflow: hidden;
  height: 168px;
  border-top: 2px solid rgba(62, 207, 74, 0.5);
  border-bottom: 2px solid rgba(62, 207, 74, 0.5);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(10, 30, 12, 0.6) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(62, 207, 74, 0.15);
}

.reel-window::before,
.reel-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 3;
  pointer-events: none;
}

.reel-window::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.reel-window::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}

.reel-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--green-bright);
  z-index: 4;
  box-shadow: 0 0 12px var(--green-bright);
}

.reel-pointer.left { left: calc(50% - 58px); }
.reel-pointer.right { left: calc(50% + 55px); }

.reel-track {
  height: 100%;
  display: flex;
  align-items: center;
}

.reel-strip {
  display: flex;
  align-items: center;
  will-change: transform;
}

.reel-item {
  flex: 0 0 116px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.reel-item img {
  height: 138px;
  width: auto;
  max-width: 108px;
  object-fit: contain;
  opacity: 0.72;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transition: opacity 0.2s ease;
}

/* ── Result ── */

.result-wrap {
  text-align: center;
}

.result-label {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.result-wrap.is-jackpot .result-label {
  font-size: clamp(0.72rem, 2.2vw, 0.95rem);
  letter-spacing: 0.18em;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 213, 74, 0.45);
}

.result-wrap.is-jackpot .result-card-glow {
  width: min(88vw, 520px);
  height: min(88vw, 520px);
  background: radial-gradient(
    circle,
    rgba(255, 228, 120, 0.85) 0%,
    rgba(255, 200, 60, 0.5) 35%,
    rgba(255, 170, 30, 0.2) 55%,
    transparent 75%
  );
  animation: result-glow-shimmer 2s ease-in-out infinite;
}

.result-wrap.is-jackpot .result-card-img {
  height: min(36vh, 200px);
}

.result-wrap.is-jackpot .result-card-name {
  font-size: clamp(1.8rem, 6vw, 2.75rem);
  color: var(--gold);
  text-shadow: 0 0 28px rgba(255, 213, 74, 0.55);
  animation: jackpot-shine 2.8s ease-in-out infinite;
  background: linear-gradient(
    105deg,
    #fff6c8 0%,
    #ffd54a 28%,
    #fff9e0 48%,
    #e6b800 72%,
    #ffd54a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reel-item[data-card-id="jackpot"] img {
  height: 118px;
  max-width: 96px;
}

.result-card-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0 0.75rem;
  animation: result-card-float 3.2s ease-in-out infinite;
}

.result-card-glow {
  position: absolute;
  width: min(78vw, 440px);
  height: min(78vw, 440px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 228, 120, 0.7) 0%,
    rgba(255, 200, 60, 0.42) 32%,
    rgba(255, 170, 30, 0.18) 52%,
    rgba(201, 146, 10, 0.06) 68%,
    transparent 78%
  );
  filter: blur(12px);
  z-index: 0;
  pointer-events: none;
  animation: result-glow-shimmer 2.6s ease-in-out infinite;
}

.result-card {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.result-card-img {
  height: min(42vh, 300px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
  animation: card-reveal 0.6s ease-out;
}

.result-card-name {
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--green-bright);
  text-shadow: 0 0 24px rgba(93, 255, 106, 0.3);
}

@keyframes card-reveal {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes result-card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes result-glow-shimmer {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.result-sub {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Collection ── */

.site-collection {
  padding-top: 2rem;
}

.collection-hero {
  max-width: 640px;
  margin-bottom: 2rem;
}

.collection-stats {
  margin-top: 0.75rem;
}

.collection-login {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(255, 213, 74, 0.25);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.collection-login p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.1rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.collection-potential {
  max-width: 720px;
  margin: 2.25rem auto 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.75;
  color: var(--text-muted);
}

.collection-potential strong {
  color: var(--gold);
  font-weight: 800;
}

.collection-card {
  text-align: center;
  padding: 0.85rem 0.55rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.collection-card.owned {
  border-color: rgba(255, 213, 74, 0.45);
  box-shadow: 0 0 28px rgba(255, 213, 74, 0.12);
}

.collection-card.owned:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 36px rgba(255, 213, 74, 0.22);
}

.collection-card.locked {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.55);
}

.collection-card-img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.collection-card img {
  height: 140px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.collection-card.locked img {
  filter: grayscale(1) brightness(0.35) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  opacity: 0.7;
}

.collection-card.owned img {
  filter: drop-shadow(0 10px 22px rgba(255, 213, 74, 0.15));
}

.collection-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1400;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(255, 213, 74, 0.5);
}

.collection-card-name {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.collection-card.owned .collection-card-name {
  color: var(--gold);
}

.collection-card.locked .collection-card-name {
  color: rgba(255, 255, 255, 0.35);
}

.collection-card-status {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.collection-card.owned .collection-card-status {
  color: rgba(255, 213, 74, 0.65);
}

/* ── Footer ── */

.site-footer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.28);
  transition: opacity 0.35s ease;
}

.site-footer.dim {
  opacity: 0.35;
}

.site-footer .sep {
  opacity: 0.5;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero-copy {
    position: static;
    max-width: 640px;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .jackpot-block {
    margin-top: 0;
    margin-bottom: 1.75rem;
  }
}

@media (max-width: 640px) {
  .hero-copy {
    margin-top: 1rem;
  }

  .top-bar {
    flex-wrap: wrap;
  }

  .top-bar-left {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .brand-logo {
    height: 26px;
  }

  .chip-ca {
    max-width: min(56vw, 200px);
    font-size: 0.62rem;
  }

  .home-actions {
    width: min(94vw, 360px);
  }

  .btn-open,
  .btn-test {
    padding: 0.9rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }

  .reel-item {
    flex: 0 0 92px;
    height: 128px;
  }

  .reel-item img {
    height: 116px;
    max-width: 86px;
  }

  .reel-window {
    height: 140px;
  }
}
