*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #0a0612;
  --bg-mid: #150d24;
  --gold: #f5c842;
  --gold-light: #ffe566;
  --gold-dark: #c9a020;
  --red: #e63946;
  --red-dark: #b82d38;
  --green: #2ecc71;
  --green-dark: #1e8449;
  --purple: #6b3fa0;
  --purple-light: #9b6fd4;
  --text: #f0e6ff;
  --text-muted: #9a8ab0;
  --case-closed: linear-gradient(145deg, #2a1845 0%, #1a0f2e 50%, #0f0818 100%);
  --case-border: #c9a020;
  --shadow-gold: 0 0 30px rgba(245, 200, 66, 0.35);
  --radius: 12px;
  --z-overlay: 100;
  --z-amount-board: 200;
  --font-display: 'Bebas Neue', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', system-ui, sans-serif;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(107, 63, 160, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(201, 160, 32, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  overflow: hidden;
}

.spotlight {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: 0;
}

.spotlight-left {
  width: 400px;
  height: 400px;
  background: rgba(107, 63, 160, 0.5);
  top: -100px;
  left: -100px;
}

.spotlight-right {
  width: 400px;
  height: 400px;
  background: rgba(201, 160, 32, 0.3);
  top: -100px;
  right: -100px;
}

.spotlight-center {
  width: 600px;
  height: 300px;
  background: rgba(245, 200, 66, 0.12);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.header {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  text-align: center;
  padding: 0.75rem 1rem 0.35rem;
}

@media (min-width: 901px) {
  .header {
    padding: 0.5rem 1rem 0.2rem;
  }

  .logo-deal,
  .logo-nodeal {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  }

  .logo-or {
    font-size: 1rem;
  }

  .tagline {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
  }
}

.logo {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  line-height: 1;
}

.logo-deal,
.logo-nodeal {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  letter-spacing: 0.08em;
}

.logo-deal {
  color: var(--green);
  text-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}

.logo-or {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: var(--text-muted);
  font-weight: 400;
}

.logo-nodeal {
  color: var(--red);
  text-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
}

.tagline {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
}

.main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 0.35rem 8.5rem 0.5rem;
  align-items: start;
  scrollbar-width: thin;
}

@media (max-width: 900px) {
  .main {
    padding: 1rem;
  }
}

.amount-board {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: fixed;
  z-index: var(--z-amount-board);
  pointer-events: auto;
}

@media (min-width: 901px) {
  .amount-board {
    top: 4.5rem;
    width: 7.25rem;
    max-height: calc(100dvh - 11rem);
    overflow-y: auto;
    padding: 0.45rem;
    background: rgba(10, 6, 18, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 200, 66, 0.28);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 200, 66, 0.35) transparent;
  }

  .amount-board-left {
    left: max(0.75rem, calc(50% - 700px));
  }

  .amount-board-right {
    right: max(0.75rem, calc(50% - 700px));
  }

  .amount-board-mobile {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .amount-board-left,
  .amount-board-right {
    display: none;
  }
}

.amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.35s ease;
  white-space: nowrap;
}

.amount-row.eliminated {
  background: rgba(230, 57, 70, 0.15);
  border-color: rgba(230, 57, 70, 0.3);
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.45;
  transform: scale(0.95);
}

.amount-row.active {
  background: rgba(245, 200, 66, 0.15);
  border-color: rgba(245, 200, 66, 0.4);
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(245, 200, 66, 0.2);
}

.game-area {
  min-width: 0;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(245, 200, 66, 0.15);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.status-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.status-item-highlight .status-value {
  color: var(--green);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.35rem;
  max-width: 580px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .cases-grid {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.4rem;
    max-width: 100%;
  }
}

.case {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  background: transparent;
  padding: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
  font-family: var(--font-display);
  overflow: visible;
  perspective: 140px;
}

.case-briefcase {
  position: absolute;
  inset: 4% 6% 8%;
  transform-style: preserve-3d;
}

.case-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44%;
  height: 20%;
  z-index: 5;
  pointer-events: none;
}

.case-handle::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2.5px solid #d4af37;
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(255, 230, 102, 0.35) 0%, rgba(201, 160, 32, 0.12) 55%, transparent 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.45);
}

.case-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 72%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #c9a020, transparent);
  border-radius: 2px;
}

.case-lid {
  position: absolute;
  top: 14%;
  left: 0;
  right: 0;
  height: 36%;
  background: linear-gradient(180deg, #4a2f6e 0%, #2f1d4a 55%, #241636 100%);
  border: 2px solid var(--gold-dark);
  border-radius: 5px 5px 2px 2px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -3px 6px rgba(0, 0, 0, 0.35),
    0 3px 6px rgba(0, 0, 0, 0.45);
  transform-origin: top center;
  transition: transform 0.45s ease;
  z-index: 3;
}

.case-lid::before {
  content: '';
  position: absolute;
  inset: 3px 3px auto;
  height: 35%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.case-latch {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 22%;
  height: 7px;
  background: linear-gradient(180deg, #ffe566, #b8860b);
  border: 1px solid #8b6914;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  z-index: 4;
}

.case-base {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10%;
  background: linear-gradient(165deg, #35224f 0%, #1e1230 45%, #120a1c 100%);
  border: 2px solid var(--gold-dark);
  border-top: 1px solid rgba(245, 200, 66, 0.45);
  border-radius: 2px 2px 6px 6px;
  box-shadow:
    inset 0 3px 6px rgba(255, 255, 255, 0.06),
    inset 0 -5px 10px rgba(0, 0, 0, 0.45),
    0 5px 10px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.case-base::before,
.case-base::after {
  content: '';
  position: absolute;
  bottom: 18%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe566, #8b6914);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}

.case-base::before { left: 10%; }
.case-base::after { right: 10%; }

.case.is-opening {
  animation: caseShake 0.55s ease;
  pointer-events: none;
  z-index: 5;
}

.case.is-opening .case-lid {
  transform: rotateX(-125deg);
}

.case.is-opening .case-number {
  animation: caseNumPop 0.4s ease 0.35s both;
}

@keyframes caseShake {
  0%, 100% { transform: translateX(0) scale(1); }
  15% { transform: translateX(-3px) scale(1.05); }
  30% { transform: translateX(3px) scale(1.08); }
  45% { transform: translateX(-2px) scale(1.06); }
  60% { transform: translateX(2px) scale(1.04); }
}

@keyframes caseNumPop {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.6); }
}

.case:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 12px rgba(245, 200, 66, 0.25));
}

.case:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.case-number {
  position: relative;
  z-index: 6;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: var(--gold-light);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 8px rgba(245, 200, 66, 0.35);
  line-height: 1;
}

.case.player-case .case-lid,
.case.player-case .case-base {
  border-color: var(--green);
}

.case.player-case .case-handle::before {
  border-color: var(--green);
}

.case.player-case {
  filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.45));
}

.case.player-case::after {
  content: '我的';
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.05em;
  z-index: 6;
}

.case.player-case-ready {
  animation: playerPulse 1.2s ease infinite;
  cursor: pointer;
}

@keyframes playerPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(46, 204, 113, 0.45)); }
  50% { filter: drop-shadow(0 0 18px rgba(46, 204, 113, 0.85)); }
}

.case.opened {
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.55) brightness(0.55);
}

.case.opened .case-lid {
  transform: rotateX(-95deg);
  opacity: 0.6;
}

.case.opened .case-number {
  color: #666;
  text-shadow: none;
}

.case.disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.action-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-bottom: 0.5rem;
}

.action-bar .btn {
  width: 100%;
  max-width: 240px;
  padding: 0.6rem 1.25rem;
  font-size: 0.88rem;
}

.action-bar .btn-primary {
  flex: none;
  max-width: 240px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(245, 200, 66, 0.28);
  box-shadow: none;
}

.action-bar-compact {
  margin-top: 0.5rem;
}

.action-bar-compact .btn-ghost {
  max-width: 200px;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

body.screen-shake {
  animation: screenShake 0.45s ease;
}

@keyframes screenShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  letter-spacing: 0.05em;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a0f2e;
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-deal {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.35);
}

.btn-nodeal {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  box-shadow: 0 0 25px rgba(230, 57, 70, 0.35);
}

.hidden {
  display: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 3, 10, 0.88);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.banker-modal,
.reveal-modal,
.final-modal,
.swap-modal,
.end-modal,
.guide-modal {
  background: linear-gradient(160deg, #1e1235 0%, #0f0818 100%);
  border: 2px solid rgba(245, 200, 66, 0.35);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-gold), 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banker-phone-ring {
  padding: 1rem 0;
}

.phone-icon {
  font-size: 3.5rem;
  animation: ring 0.8s ease infinite;
}

@keyframes ring {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

.banker-calling {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  animation: pulse 1.2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.banker-modal h2,
.final-modal h2,
.swap-modal h2,
.end-modal h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.banker-sub,
.final-desc,
.swap-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.offer-amount,
.reveal-amount,
.end-amount {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  color: var(--gold-light);
  text-shadow: 0 0 30px rgba(245, 200, 66, 0.5);
  margin: 0.5rem 0 1rem;
  letter-spacing: 0.05em;
}

.banker-question {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.banker-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .banker-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.reveal-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.reveal-briefcase {
  position: relative;
  width: 120px;
  height: 100px;
  margin: 0 auto 1rem;
  perspective: 220px;
}

.reveal-briefcase .case-briefcase {
  inset: 0;
}

.reveal-briefcase-glow {
  position: absolute;
  inset: 18% 8% 8%;
  background: radial-gradient(circle, rgba(245, 200, 66, 0.55), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease 0.35s;
  pointer-events: none;
  z-index: 1;
}

.reveal-modal.reveal-unbox-open .case-lid {
  transform: rotateX(-130deg);
}

.reveal-modal.reveal-unbox-open .reveal-briefcase-glow {
  opacity: 1;
}

.reveal-modal.reveal-unbox-shake .case-briefcase {
  animation: caseShake 0.5s ease;
}

.reveal-modal .case-lid {
  transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.reveal-hidden {
  opacity: 0;
  transform: scale(0.85);
}

.reveal-amount:not(.reveal-hidden),
.reveal-comment:not(.reveal-hidden) {
  animation: revealPop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes revealPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal-comment {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-light);
  min-height: 1.4em;
}

.reveal-modal.reveal-tier-low {
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: 0 0 40px rgba(46, 204, 113, 0.2);
}

.reveal-modal.reveal-tier-low .reveal-amount {
  color: var(--text-muted);
  text-shadow: none;
  font-size: clamp(2rem, 8vw, 2.8rem);
}

.reveal-modal.reveal-tier-low .reveal-comment {
  color: var(--green);
}

.reveal-modal.reveal-tier-mid .reveal-amount {
  color: var(--gold-light);
}

.reveal-modal.reveal-tier-high {
  border-color: rgba(230, 57, 70, 0.45);
  box-shadow: 0 0 40px rgba(230, 57, 70, 0.2);
}

.reveal-modal.reveal-tier-high .reveal-amount {
  color: var(--red);
  text-shadow: 0 0 24px rgba(230, 57, 70, 0.45);
}

.reveal-modal.reveal-tier-high .reveal-comment {
  color: #ff8a8a;
}

.reveal-modal.reveal-tier-jackpot {
  border-color: rgba(230, 57, 70, 0.6);
  animation: jackpotPulse 0.8s ease infinite alternate;
}

.reveal-modal.reveal-tier-jackpot .reveal-amount {
  color: var(--red);
  text-shadow: 0 0 35px rgba(230, 57, 70, 0.55);
}

.reveal-modal.reveal-tier-jackpot .reveal-comment {
  color: #ff6b6b;
}

@keyframes jackpotPulse {
  from { box-shadow: 0 0 30px rgba(230, 57, 70, 0.25); }
  to { box-shadow: 0 0 50px rgba(230, 57, 70, 0.45); }
}

.banker-taunt {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--purple-light);
  margin: -0.5rem 0 0.75rem;
  min-height: 1.2em;
}

.host-toast {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 150;
  max-width: min(90vw, 420px);
  padding: 0.55rem 1.1rem;
  background: rgba(30, 18, 53, 0.95);
  border: 1px solid rgba(245, 200, 66, 0.35);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--gold-light);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.host-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal-case {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.reveal-amount {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.end-sub {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.end-detail {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.end-actions .btn {
  width: 100%;
}

.end-modal {
  position: relative;
  overflow: hidden;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, var(--gold) 2px, transparent 2px),
    radial-gradient(circle, var(--green) 2px, transparent 2px),
    radial-gradient(circle, var(--red) 2px, transparent 2px);
  background-size: 80px 80px, 60px 60px, 100px 100px;
  background-position: 0 0, 30px 30px, 15px 45px;
  opacity: 0.15;
  animation: confettiDrift 8s linear infinite;
}

@keyframes confettiDrift {
  from { background-position: 0 0, 30px 30px, 15px 45px; }
  to { background-position: 0 200px, 30px 230px, 15px 245px; }
}

.swap-desc strong {
  color: var(--gold);
}

.guide-modal {
  max-width: 460px;
}

.rules-modal {
  background: linear-gradient(160deg, #1e1235 0%, #0f0818 100%);
  border: 2px solid rgba(245, 200, 66, 0.35);
  border-radius: 20px;
  padding: 2rem 1.75rem 1.75rem;
  max-width: 520px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-gold), 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s ease;
}

.rules-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.rules-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.rules-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 1.25rem;
}

.rules-section {
  margin-bottom: 1.25rem;
}

.rules-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.rules-section p,
.rules-section li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.rules-section strong {
  color: var(--text);
  font-weight: 600;
}

.rules-range {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 200, 66, 0.08);
  border-radius: 8px;
  font-size: 0.8rem !important;
  color: var(--gold) !important;
  text-align: center;
}

.rules-steps {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rules-steps ul {
  margin-top: 0.35rem;
  padding-left: 1.1rem;
  list-style: disc;
}

.rules-table {
  width: 100%;
  margin: 0.6rem 0 0.4rem;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.rules-table th,
.rules-table td {
  padding: 0.35rem 0.4rem;
  text-align: center;
  border: 1px solid rgba(245, 200, 66, 0.15);
}

.rules-table th {
  background: rgba(245, 200, 66, 0.1);
  color: var(--gold);
  font-weight: 600;
}

.rules-table td {
  color: var(--text-muted);
}

.rules-note {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 0.25rem;
}

.rules-deal {
  color: var(--green);
  font-weight: 600;
}

.rules-nodeal {
  color: var(--red);
  font-weight: 600;
}

.rules-modal .btn-primary {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}

.rules-section ul {
  padding-left: 1.25rem;
  list-style: disc;
  margin-top: 0.35rem;
}

.guide-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.35);
  border-radius: 999px;
  padding: 0.35rem 1.25rem;
  margin-bottom: 1rem;
}

.guide-badge.hidden {
  display: none;
}

.guide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--text);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.guide-message {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.guide-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.btn-guide {
  min-width: 180px;
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

.hint {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  min-height: 1.25em;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(245, 200, 66, 0.06);
  border: 1px solid rgba(245, 200, 66, 0.12);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hint-active {
  color: var(--gold-light);
  border-color: rgba(245, 200, 66, 0.3);
  animation: hintPulse 2s ease infinite;
}

@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 200, 66, 0); }
  50% { box-shadow: 0 0 16px rgba(245, 200, 66, 0.15); }
}

.amount-board-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-amount-board);
  pointer-events: auto;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-height: 108px;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  background: rgba(10, 6, 18, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 200, 66, 0.28);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
}

@media (max-width: 900px) {
  .amount-board-mobile {
    display: flex;
  }

  .main {
    padding-top: 7rem;
  }
}

.amount-board-mobile .amount-row {
  font-size: 0.6rem;
  padding: 0.15rem 0.35rem;
}

@media (max-height: 720px) and (min-width: 901px) {
  .header {
    padding: 0.35rem 1rem 0.15rem;
  }

  .logo-deal,
  .logo-nodeal {
    font-size: 1.6rem;
  }

  .tagline {
    display: none;
  }

  .status-bar {
    margin-bottom: 0.35rem;
    padding: 0.35rem 0.5rem;
  }

  .cases-grid {
    gap: 0.25rem;
    max-width: 520px;
  }
}

.case.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.case.opening-flash {
  animation: flash 0.6s ease;
}

@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 transparent; }
  50% { box-shadow: 0 0 40px rgba(245, 200, 66, 0.8); }
}
