/* House of Purple Onions — Super Mario 2D Game Style */

:root {
  /* 千禧年未来感 — 低饱和 + 高饱和搭配 */
  /* 低饱和 (背景、大面积) */
  --muted-cyan: #7eb8d4;
  --muted-lavender: #9a8bb8;
  --muted-pink: #c494a8;
  --muted-sage: #a8b89a;
  --muted-slate: #6b7b8a;
  /* 高饱和 (点缀、按钮、强调) */
  --electric-blue: #00d4ff;
  --hot-pink: #ff1493;
  --grass-green: #00e676;
  --purple-onion: #b388ff;
  --gold-coin: #ffd54f;
  /* 兼容旧变量 */
  --sky-blue: var(--muted-cyan);
  --brick-red: #e57373;
  --brick-brown: #8b7355;
  --cloud-white: #fff;
  --pipe-green: var(--muted-sage);
  --lime: var(--muted-sage);
  --purple-deep: #7c4dff;
  --purple-glow: var(--muted-lavender);
  --bubblegum: var(--muted-pink);
  --magenta: var(--hot-pink);
  --orange: #ff8a65;
  --tinky: #9575cd;
  --dipsy: #81c784;
  --laa: #ffd54f;
  --po: #e57373;
  --chrome: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #b0b0b0 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'VT323', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  color: #fff;
  background: linear-gradient(135deg, #8fc9e8 0%, #b09dd4 45%, #d4a8b8 100%);
  background-attachment: fixed;
}

/* ═══════════════════════════════════════════════════════════
   LANDING: Epic cinematic approach to the onion universe
   ═══════════════════════════════════════════════════════════ */
.onion-landing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(180deg, #2a2a4a 0%, #5a4a7a 40%, #7a6a9a 70%, #9a7a8a 100%);
  transition: opacity 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1rem 2rem;
  box-sizing: border-box;
}

.onion-landing.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Age consent — inline above Enter Onionverse button */
.age-consent {
  text-align: center;
  margin: 1rem 0 0.75rem;
}
.age-consent-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.58rem;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
.age-consent-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.age-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.48rem;
  padding: 0.8rem 1.2rem;
  border: 3px solid #fbbf24;
  border-radius: 8px;
  background: linear-gradient(180deg, #3d1a6e 0%, #6b21a8 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  pointer-events: auto;
}
.age-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
  background: linear-gradient(180deg, #6b21a8 0%, #9333ea 100%);
}

/* Cinematic vignette */
.landing-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 50%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 5;
}

/* Subtle lens flare */
.landing-lens-flare {
  position: absolute;
  top: 15%;
  right: 20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: flarePulse 4s ease-in-out infinite;
}

@keyframes flarePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.game-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.game-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.95), transparent),
    radial-gradient(2px 2px at 80px 70px, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 150px 40px, rgba(0,212,255,0.7), transparent),
    radial-gradient(2px 2px at 220px 120px, rgba(255,255,255,0.85), transparent),
    radial-gradient(2px 2px at 50px 150px, rgba(255,20,147,0.6), transparent),
    radial-gradient(2px 2px at 180px 80px, rgba(255,213,79,0.6), transparent),
    radial-gradient(2px 2px at 280px 180px, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 100px 200px, rgba(191,0,255,0.5), transparent);
  background-size: 300px 220px;
  animation: twinkle 1.5s ease-in-out infinite;
}

/* Shooting star */
.shooting-star {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, transparent 100%);
  top: 10%;
  left: -120px;
  transform: rotate(-25deg);
  animation: shootingStar 4s ease-in-out 0.5s infinite;
  opacity: 0;
}

@keyframes shootingStar {
  0% { left: -120px; opacity: 0; }
  10% { opacity: 1; }
  25% { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Epic top text — in flow so it never overlaps planet or ground */
.landing-epic-text {
  flex: 0 0 auto;
  text-align: center;
  z-index: 3;
  animation: epicTextReveal 0.8s ease-out 0.15s both;
  width: 100%;
  max-width: 90vw;
  padding: 0.75rem 1rem 0.5rem;
  box-sizing: border-box;
}

.landing-tagline {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .landing-tagline { white-space: normal; }
}

.landing-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.2em;
}

@keyframes epicTextReveal {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.onion-planet-wrap {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: planetApproach 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  width: 100%;
  max-width: 95vw;
  padding: 0.5rem 2rem 1rem;
  box-sizing: border-box;
}

@keyframes planetApproach {
  0% { opacity: 0; transform: scale(0.5); }
  60% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* Approach glow */
.planet-approach-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  max-width: min(380px, 90vw);
  max-height: min(380px, 90vw);
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(191, 0, 255, 0.25) 0%,
    rgba(255, 20, 147, 0.1) 30%,
    transparent 60%
  );
  pointer-events: none;
  animation: approachGlow 3s ease-in-out infinite alternate;
}

@keyframes approachGlow {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Planet atmosphere glow */
.planet-atmosphere {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  max-width: min(340px, 85vw);
  max-height: min(340px, 85vw);
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(191, 0, 255, 0.15) 0%,
    rgba(255, 20, 147, 0.08) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* Planet + ring container - ring surrounds the onion */
.planet-and-ring {
  position: relative;
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  max-width: 320px;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Saturn-style ring - surrounds the onion */
.planet-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 45vw);
  max-width: 320px;
  height: 24px;
  border: 4px solid rgba(255, 215, 0, 0.6);
  border-radius: 50%;
  animation: ringFloat 4s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.planet-ring::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(60deg);
  width: min(320px, 45vw);
  max-width: 320px;
  height: 24px;
  border: 4px solid rgba(255, 20, 147, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
}

.planet-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(120deg);
  width: min(320px, 45vw);
  max-width: 320px;
  height: 24px;
  border: 4px solid rgba(0, 212, 255, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.25);
}

@keyframes ringFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.95; }
  50% { transform: translate(-50%, -50%) scale(1.02); opacity: 1; }
}

.landing-onion-img {
  width: min(290px, 42vw);
  height: min(290px, 42vw);
  max-width: 290px;
  max-height: 290px;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 60px rgba(191, 0, 255, 0.9),
    0 0 120px rgba(255, 20, 147, 0.5),
    0 0 180px rgba(0, 212, 255, 0.25),
    inset -20px -20px 40px rgba(0, 0, 0, 0.3),
    inset 20px 20px 40px rgba(255, 255, 255, 0.08);
  animation: onionPulse 2.5s ease-in-out infinite;
}

@keyframes onionPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.1); }
}

/* Sky onion planets - distant worlds */
.sky-onion {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-image: url('purple-onion.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 25px rgba(191, 0, 255, 0.5);
  animation: skyFloat 8s ease-in-out infinite;
  opacity: 0.8;
}

.sky-onion-1 { width: 55px; height: 55px; top: 8%; left: 6%; animation-delay: 0s; }
.sky-onion-2 { width: 40px; height: 40px; top: 18%; right: 10%; animation-delay: -2s; }
.sky-onion-3 { width: 48px; height: 48px; top: 50%; left: 4%; animation-delay: -4s; }
.sky-onion-4 { width: 35px; height: 35px; top: 70%; right: 6%; animation-delay: -6s; }
.sky-onion-5 { width: 30px; height: 30px; top: 35%; right: 25%; animation-delay: -1s; }
.sky-onion-6 { width: 42px; height: 42px; top: 60%; left: 15%; animation-delay: -5s; }

@keyframes skyFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.75; }
  50% { transform: translateY(-10px) scale(1.05); opacity: 1; }
}

.game-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--gold-coin);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 2px 2px 0 rgba(0,0,0,0.5);
  animation: labelReveal 1s ease-out 2s both;
  max-width: 100%;
  padding: 0 1rem;
  line-height: 1.6;
  text-align: center;
  width: 100%;
}

.landing-cta {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  letter-spacing: 0.15em;
  animation: labelReveal 1s ease-out 2.2s both;
  padding: 0 1rem;
  text-align: center;
  width: 100%;
}

@keyframes labelReveal {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.enter-btn.game-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(180deg, var(--hot-pink) 0%, var(--purple-onion) 100%);
  color: #fff;
  border: 5px solid rgba(255,255,255,0.95);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    0 0 30px rgba(255, 20, 147, 0.7),
    0 0 60px rgba(191, 0, 255, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
  animation: enterBtnReveal 1s ease-out 2.5s both;
  letter-spacing: 0.1em;
  margin-left: auto;
  margin-right: auto;
}

.enter-btn.game-btn:hover {
  background: linear-gradient(180deg, var(--electric-blue) 0%, var(--grass-green) 100%);
  color: #fff;
  transform: scale(1.12);
  box-shadow:
    0 0 50px rgba(0, 212, 255, 0.8),
    0 0 100px rgba(255, 20, 147, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

@keyframes enterBtnReveal {
  0% { opacity: 0; transform: scale(0.8); }
  70% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.game-ground {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, #5a4a7a 0%, #4a3a6a 50%, #3a2a5a 100%);
  border-top: 4px solid rgba(255,255,255,0.6);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   ROULETTE — Mario colourful
   ═══════════════════════════════════════════════════════════ */
.roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(ellipse at center, #2d1a1e 0%, #1a0e12 60%, #0d0509 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.roulette-overlay.active {
  opacity: 1;
  visibility: visible;
}

.roulette-overlay.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.roulette-container {
  text-align: center;
  position: relative;
}

.roulette-wheel {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  transition: transform 2s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  border: 5px solid #8b6040;
  box-shadow: 0 0 40px rgba(120, 50, 70, 0.5), 0 0 80px rgba(80, 30, 50, 0.2);
  /* Concentric onion rings — alternating cream and purple-pink layers */
  background: radial-gradient(circle,
    #f5edd6 0%, #f5edd6 5%,
    #d4a0b0 5%, #d4a0b0 9%,
    #f0e0c8 9%, #f0e0c8 14%,
    #c890a0 14%, #c890a0 18%,
    #ead5bc 18%, #ead5bc 23%,
    #bc8090 23%, #bc8090 27%,
    #e0c8b0 27%, #e0c8b0 32%,
    #b07080 32%, #b07080 36%,
    #d8bca0 36%, #d8bca0 41%,
    #a06070 41%, #a06070 45%,
    #d0b098 45%, #d0b098 50%,
    #905060 50%, #905060 54%,
    #c8a890 54%, #c8a890 59%,
    #804050 59%, #804050 63%,
    #c0a088 63%, #c0a088 68%,
    #703040 68%, #703040 72%,
    #b89080 72%, #b89080 77%,
    #602030 77%, #602030 82%,
    #a87070 82%, #a87070 88%,
    #501020 88%, #501020 94%,
    #3a0a18 94%, #3a0a18 100%
  );
}

.roulette-segment {
  position: absolute;
  width: 50%;
  height: 50%;
  left: 50%;
  top: 0;
  transform-origin: 0% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0% 100%, 100% 100%, 81% 61%);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  /* Thin line between segments — like knife cuts */
  border-right: 1px solid rgba(80, 30, 40, 0.35);
}

.roulette-segment span {
  transform: rotate(-25deg);
  margin-left: 15%;
  margin-bottom: 12%;
}

/* Semi-transparent tints so onion rings show through — 8 segments at 45deg each */
.roulette-segment:nth-child(1) { transform: rotate(0deg); background: rgba(100, 40, 60, 0.12); }
.roulette-segment:nth-child(2) { transform: rotate(45deg); background: rgba(100, 40, 60, 0.04); }
.roulette-segment:nth-child(3) { transform: rotate(90deg); background: rgba(100, 40, 60, 0.12); }
.roulette-segment:nth-child(4) { transform: rotate(135deg); background: rgba(100, 40, 60, 0.04); }
.roulette-segment:nth-child(5) { transform: rotate(180deg); background: rgba(100, 40, 60, 0.12); }
.roulette-segment:nth-child(6) { transform: rotate(225deg); background: rgba(100, 40, 60, 0.04); }
.roulette-segment:nth-child(7) { transform: rotate(270deg); background: rgba(100, 40, 60, 0.12); }
.roulette-segment:nth-child(8) { transform: rotate(315deg); background: rgba(100, 40, 60, 0.04); }

.roulette-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 28px solid #c0c0c0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.roulette-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #d4a0b0;
  margin-top: 1.5rem;
  text-shadow: 0 0 10px rgba(180, 100, 120, 0.4);
}

/* ═══════════════════════════════════════════════════════════
   MAIN — Mario 2D game world
   ═══════════════════════════════════════════════════════════ */
.onion-universe {
  min-height: 100vh;
  position: relative;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: linear-gradient(180deg, #8fc9e8 0%, #b09dd4 50%, #d4a8b8 100%);
}

.onion-universe::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(176, 157, 212, 0.15) 50%, transparent 100%);
  z-index: -1;
}

.onion-universe.entered {
  opacity: 1;
}

.game-bg-clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-cloud {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.85;
}

.bg-cloud-1 {
  width: 120px;
  height: 50px;
  top: 15%;
  left: 5%;
  box-shadow: 60px 0 0 -15px #fff, 120px 0 0 -20px #fff;
}

.bg-cloud-2 {
  width: 100px;
  height: 40px;
  top: 30%;
  right: 10%;
  box-shadow: 50px 0 0 -12px #fff;
}

.bg-cloud-3 {
  width: 90px;
  height: 38px;
  bottom: 25%;
  left: 15%;
  box-shadow: 45px 0 0 -10px #fff;
}

/* Floating onions */
.floating-onions {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.floating-onions .float-onion {
  position: absolute;
  pointer-events: auto;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: floatOnion 6s ease-in-out infinite;
}

.floating-onions .float-onion img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.floating-onions .float-onion:hover {
  transform: scale(1.5);
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.5);
}

.floating-onions .float-onion:nth-child(1) { top: 12%; left: 6%; animation-delay: 0s; }
.floating-onions .float-onion:nth-child(2) { top: 28%; left: 4%; animation-delay: -1s; }
.floating-onions .float-onion:nth-child(3) { top: 48%; left: 8%; animation-delay: -2s; }
.floating-onions .float-onion:nth-child(4) { top: 68%; left: 5%; animation-delay: -3s; }
.floating-onions .float-onion:nth-child(5) { top: 85%; left: 10%; animation-delay: -4s; }
.floating-onions .float-onion:nth-child(6) { top: 8%; right: 12%; animation-delay: -5s; }
.floating-onions .float-onion:nth-child(7) { top: 22%; right: 7%; animation-delay: -0.5s; }
.floating-onions .float-onion:nth-child(8) { top: 42%; right: 5%; animation-delay: -1.5s; }
.floating-onions .float-onion:nth-child(9) { top: 62%; right: 9%; animation-delay: -2.5s; }
.floating-onions .float-onion:nth-child(10) { top: 78%; right: 14%; animation-delay: -3.5s; }
.floating-onions .float-onion:nth-child(11) { top: 18%; left: 35%; animation-delay: -4.5s; }
.floating-onions .float-onion:nth-child(12) { top: 52%; left: 42%; animation-delay: -5.5s; }
.floating-onions .float-onion:nth-child(13) { top: 75%; left: 38%; animation-delay: -0.8s; }
.floating-onions .float-onion:nth-child(14) { top: 35%; right: 28%; animation-delay: -1.8s; }
.floating-onions .float-onion:nth-child(15) { top: 58%; right: 42%; animation-delay: -2.8s; }

@keyframes floatOnion {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Chaotic fortune symbols - layered, drifting */
.chaos-symbols {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.chaos-sym {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.25;
  animation: chaosDrift 8s ease-in-out infinite;
}

.chaos-tarot { top: 15%; left: 12%; animation-delay: 0s; animation-duration: 7s; }
.chaos-fortune { top: 25%; right: 15%; animation-delay: -2s; animation-duration: 9s; }
.chaos-star { top: 55%; left: 8%; animation-delay: -4s; animation-duration: 6.5s; }
.chaos-moon { top: 70%; right: 10%; animation-delay: -1s; animation-duration: 8s; }
.chaos-crystal { top: 40%; left: 45%; animation-delay: -3s; animation-duration: 10s; }

@keyframes chaosDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.2; }
  25% { transform: translate(15px, -10px) rotate(5deg); opacity: 0.35; }
  50% { transform: translate(-10px, 5px) rotate(-3deg); opacity: 0.25; }
  75% { transform: translate(5px, 15px) rotate(8deg); opacity: 0.3; }
}

/* Quote modal */
.quote-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.quote-modal.open {
  opacity: 1;
  visibility: visible;
}

.quote-modal-content {
  background: #fff;
  border: 4px solid var(--muted-lavender);
  padding: 2rem 2.5rem;
  max-width: 500px;
  margin: 1rem;
  position: relative;
}

.quote-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.quote-modal-text {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 1rem;
}

.quote-modal-source {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: var(--purple-onion);
}

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  z-index: 100;
  background: linear-gradient(90deg, #d4a8b8 0%, #b09dd4 50%, #8fc9e8 100%);
  border-bottom: 4px solid rgba(255,255,255,0.95);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.nav-row-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-link {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  text-decoration: none;
  color: #fff;
  padding: 0.6rem 0.8rem;
  transition: transform 0.2s, box-shadow 0.2s;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.nav-link:hover {
  background: var(--hot-pink);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(255, 20, 147, 0.5);
}

/* POO — hero nav link, always centred on its own row */
.nav-link-poo {
  font-family: 'VT323', 'Microsoft YaHei', 'PingFang TC', 'Noto Sans TC', sans-serif;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-onion) 50%, var(--hot-pink) 100%);
  color: #fff;
  padding: 0.5rem 1.4rem;
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 4px;
  text-shadow: 0 0 8px rgba(255, 20, 147, 0.6), 2px 2px 0 rgba(0,0,0,0.4);
  box-shadow: 0 0 12px rgba(191, 0, 255, 0.35);
  animation: pooPulse 3s ease-in-out infinite;
  text-align: center;
  white-space: nowrap;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.nav-link-poo:hover {
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--purple-onion) 50%, var(--purple-deep) 100%);
  transform: scale(1.12);
  box-shadow: 0 0 25px rgba(255, 20, 147, 0.6), 0 0 40px rgba(191, 0, 255, 0.3);
  border-color: rgba(255, 215, 0, 1);
}

@keyframes pooPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(191, 0, 255, 0.35); }
  50% { box-shadow: 0 0 20px rgba(191, 0, 255, 0.5), 0 0 30px rgba(255, 20, 147, 0.2); }
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(255,255,255,0.4);
}

.lang-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.4rem;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 2px solid rgba(255,255,255,0.4);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.lang-btn:hover {
  color: #fff;
  border-color: #fff;
}

.lang-btn.active {
  background: rgba(255,255,255,0.95);
  color: var(--purple-deep);
  border-color: rgba(255,255,255,0.95);
}

.layer-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9rem 12rem 4rem; /* horizontal padding for sidebar ads */
  position: relative;
  z-index: 1;
}

.layer-content {
  max-width: 680px;
  width: 100%;
}

.welcome-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.85rem, 4vw, 1.2rem);
  font-weight: 400;
  text-align: center;
  line-height: 2.2;
  margin-bottom: 1.5rem;
  animation: titleReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.3);
  filter: drop-shadow(0 0 20px rgba(255, 20, 147, 0.6));
}

.welcome-line {
  display: block;
  text-shadow:
    3px 3px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    3px 0 0 #000,
    -3px 0 0 #000,
    4px 4px 0 #000,
    -2px -2px 0 #000;
}

.welcome-line:first-child {
  color: #ffd700;
  font-size: 0.6em;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
}

.welcome-line-main {
  color: #fff;
  font-size: 1.5em;
  text-shadow:
    4px 4px 0 rgba(0,0,0,0.4),
    -2px -2px 0 rgba(0,0,0,0.3),
    0 0 25px rgba(255, 20, 147, 0.5),
    0 0 40px rgba(0, 212, 255, 0.3);
  animation: titlePulse 1.5s ease-in-out 1.2s infinite alternate;
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  60% {
    opacity: 1;
    transform: scale(1.2);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes titlePulse {
  0% { filter: brightness(1) drop-shadow(0 0 15px rgba(255,20,147,0.4)); }
  100% { filter: brightness(1.15) drop-shadow(0 0 25px rgba(0,212,255,0.5)); }
}

.hero-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: rgba(255,255,255,0.95);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.home-content .hero-subtitle,
.home-content .spin-again-btn {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Teletubbies + onion cast (Saint Po, Purpur, Whitney, DJ Yell, Dr Green) */
.teletubbies-gang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
.onion-cast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
/* Purpur (2nd) — image content is too far left in source; nudge right for equal visual spacing */
.onion-cast-btn:nth-child(2) img {
  object-position: 58% center;
}
.onion-cast-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.onion-cast-btn:hover {
  transform: scale(1.15);
}
.onion-cast-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.teletubbies-blend-wrap {
  position: relative;
  padding: 2rem;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(176, 157, 212, 0.2) 40%,
    rgba(212, 168, 184, 0.1) 70%,
    transparent 100%
  );
  border-radius: 50%;
}

.teletubbies-img {
  max-width: 480px;
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  background: transparent;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.teletubbies-img:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 20px rgba(255, 20, 147, 0.5));
}

.tubby {
  position: relative;
  width: 48px;
  height: 56px;
  cursor: pointer;
}

.tubby-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #fff;
}

.tubby-antenna {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 16px;
  background: #fff;
  border-radius: 2px;
}

.tubby-antenna::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: inherit;
}

.tubby-screen {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: #fff;
  border: 2px solid #333;
}

.tubby-tinky .tubby-body,
.tubby-tinky .tubby-antenna::after { background: var(--tinky); }
.tubby-dipsy .tubby-body,
.tubby-dipsy .tubby-antenna::after { background: var(--dipsy); }
.tubby-laa .tubby-body,
.tubby-laa .tubby-antenna::after { background: var(--laa); }
.tubby-po .tubby-body,
.tubby-po .tubby-antenna::after { background: var(--po); }

.spin-again-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  margin-top: 2rem;
  padding: 1.25rem 2rem;
  background: linear-gradient(180deg, var(--hot-pink) 0%, var(--purple-onion) 100%);
  color: #fff;
  border: 5px solid rgba(255,255,255,0.9);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255, 20, 147, 0.4);
}

.spin-again-btn:hover {
  background: linear-gradient(180deg, var(--electric-blue) 0%, var(--grass-green) 100%);
  color: var(--purple-deep);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.1rem;
  color: var(--purple-deep);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

.content-card {
  background: linear-gradient(180deg, #fff 0%, #fdfbfd 100%);
  padding: 2.5rem;
  border: 5px solid rgba(176, 157, 212, 0.6);
  color: #333;
  box-shadow: 0 4px 25px rgba(176, 157, 212, 0.2);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.content-card p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 1.25rem;
  font-family: 'VT323', monospace;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-card ul {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #333;
}

.content-card ul li {
  margin-bottom: 0.4rem;
}

.content-card ul li:last-child {
  margin-bottom: 0;
}

.content-card a {
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   POO — Philosophy of Onion (假正经 Wikipedia style)
   ═══════════════════════════════════════════════════════════ */
/* Skyspanner / PEEL EAST LONDON banner — links to walking tour */
.skyspanner-banner {
  display: block !important;
  visibility: visible !important;
  max-width: 560px;
  margin: 1.5rem auto 1.5rem;
  padding: 0 1rem;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.skyspanner-banner:hover {
  opacity: 0.9;
}
.skyspanner-banner img {
  width: 100%;
  height: auto;
  min-height: 80px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

/* Ad strip — shown only on mobile; desktop uses sidebars */
.ad-strip-top {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.5rem auto 2rem;
  max-width: 960px;
  padding: 0 1rem;
}
.ad-strip-item {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  cursor: pointer;
  transition: transform 0.2s;
}
.ad-strip-item:hover {
  transform: scale(1.02);
}
.magic-onion-ad-strip .magic-onion-ad-inner,
.onion-calling-ad-strip .onion-calling-ad-inner,
.ok-ad-strip .ok-ad-inner {
  height: 100%;
  padding: 0.5rem 0.6rem;
}
.magic-onion-ad-strip .magic-onion-ad-img { width: 48px; height: 48px; margin: 0.2rem auto; }
.onion-calling-ad-strip .onion-calling-ad-img { width: 56px; height: 56px; margin: 0.2rem auto; }
.price-comp-ad-strip .price-comp-ad-inner { height: 100%; padding: 0.5rem 0.6rem; }

.poo-block {
  margin-top: 2rem;
  width: 800px;
  max-width: calc(100vw - 28rem); /* narrower to clear sidebar ads */
  margin-left: auto;
  margin-right: auto;
  /* Break out of narrow .layer-content; leave room for sidebar ads */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.poo-content {
  max-width: 800px;
  background: #f8f6f3;
  padding: 1.25rem 1.75rem 2rem;
  border: 1px solid #a2a9b1;
  color: #202122;
  font-family: 'DM Sans', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
  overflow: auto;
}

/* Wikipedia-style: infobox floats right, text wraps to its left */
.poo-infobox {
  float: right;
  width: 240px;
  margin: 0 0 0.75rem 1.25rem;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  padding: 0.6rem 0.85rem;
}

.poo-infobox-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 0.5rem;
}

.poo-infobox-image {
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.poo-infobox-image img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #a2a9b1;
}

.poo-infobox-image figcaption {
  font-size: 0.75rem;
  color: #54595d;
  line-height: 1.3;
  margin-top: 0.35rem;
  font-style: italic;
}

.poo-infobox-subtitle {
  font-size: 0.85rem;
  color: #54595d;
  margin-bottom: 1rem;
}

.poo-infobox-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.poo-infobox-table th {
  text-align: left;
  vertical-align: top;
  padding: 0.35rem 0.5rem 0.35rem 0;
  color: #54595d;
  font-weight: 500;
}

.poo-infobox-table td {
  padding: 0.35rem 0;
}

.poo-lead {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* Disclaimer flows beside infobox like body text */
.poo-disclaimer {
  font-size: 0.8rem;
  color: #54595d;
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* TOC — inline block, flows beside infobox */
.poo-toc {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  width: fit-content;
  min-width: 200px;
  font-size: 0.88rem;
}

.poo-toc h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.poo-toc ol {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.9rem;
}

.poo-toc a {
  color: var(--purple-deep);
  text-decoration: none;
}

.poo-toc a:hover {
  text-decoration: underline;
}

.poo-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  padding-top: 0.35rem;
  border-bottom: 1px solid #a2a9b1;
}

.poo-content h3:first-of-type {
  margin-top: 0.75rem;
}

.poo-content p {
  margin-bottom: 0.75rem;
}

.poo-references {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #a2a9b1;
}

.poo-references h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.poo-references ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.9rem;
}

.wisdom-card .wisdom-text {
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.wisdom-card .wisdom-source {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.wisdom-refresh {
  padding: 0.5rem 1rem;
  background: var(--purple-onion);
  color: #fff;
  border: 4px solid #333;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wisdom-refresh:hover {
  background: var(--gold-coin);
  color: var(--purple-deep);
}

.footer {
  text-align: center;
  padding: 2rem 2rem 5rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--purple-deep);
  position: relative;
}

.footer-mascots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-mascots img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.85;
}
.footer-safe-links {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: rgba(124, 58, 237, 0.85);
  margin-top: 0.5rem;
}

.game-footer-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, var(--muted-sage) 0%, #8a9a7a 100%);
  border-top: 4px solid #fff;
}

.game-footer-ground::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--brick-brown);
  border: 4px solid #fff;
}

/* ═══════════════════════════════════════════════════════════
   Start your onion with me
   ═══════════════════════════════════════════════════════════ */
/* Bottom action bar — all buttons in one row */
.bottom-action-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.25);
  border: 3px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

body.universe-visible .bottom-action-bar {
  opacity: 1;
  visibility: visible;
}

.bottom-action-bar .onion-game-toggle,
.bottom-action-bar .tarot-toggle,
.bottom-action-bar .polymarket-toggle,
.bottom-action-bar .fortune-toggle,
.bottom-action-bar .chat-toggle {
  position: static;
  transform: none;
  opacity: 1;
  visibility: visible;
}

.onion-game-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--purple-onion) 100%);
  color: #fff;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(255, 20, 147, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.onion-game-toggle .game-label {
  margin-bottom: 0;
  padding: 0;
}

.onion-game-toggle:hover {
  background: linear-gradient(135deg, var(--electric-blue) 0%, var(--grass-green) 100%);
  color: var(--purple-deep);
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.onion-game-panel {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  background: #fff;
  border: 4px solid #333;
  z-index: 501;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.onion-game-panel.open {
  opacity: 1;
  visibility: visible;
}

.onion-game-header {
  padding: 1rem;
  border-bottom: 4px solid #333;
  position: relative;
}

.onion-game-header h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--purple-deep);
  margin-bottom: 0.5rem;
}

.onion-game-header p {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: #333;
}

.onion-game-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.onion-game-body {
  padding: 1rem;
}

.onion-game-input {
  width: 100%;
  padding: 0.75rem;
  background: #fff;
  border: 4px solid #333;
  color: #333;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  resize: none;
  margin-bottom: 0.75rem;
}

.onion-game-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--grass-green);
  color: #fff;
  border: 4px solid #333;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.onion-game-submit:hover {
  background: var(--gold-coin);
  color: var(--purple-deep);
}

.onion-game-result {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: #333;
  line-height: 1.5;
  display: none;
}

.onion-game-result.show {
  display: block;
}

.onion-game-result .game-match {
  color: var(--purple-deep);
  font-family: 'Press Start 2P', cursive;
}

.onion-game-result .game-nearmiss {
  color: #7a5230;
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   POLYMARKET-STYLE PREDICTION GAME
   ═══════════════════════════════════════════════════════════ */
.polymarket-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: #131517;
  color: #fff;
  border: 3px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.polymarket-toggle:hover {
  background: #1a1e23;
  border-color: #2E5CFF;
  transform: scale(1.08);
}

.poly-icon {
  font-size: 1.1rem;
}

.polymarket-panel {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-height: 85vh;
  background: #131517;
  border: 1px solid #25272d;
  border-radius: 12px;
  z-index: 501;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow: hidden;
}

.polymarket-panel.open {
  opacity: 1;
  visibility: visible;
}

.poly-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #25272d;
  position: relative;
}

.poly-header h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.poly-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #9ca3af;
}

.poly-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
}

.poly-close:hover {
  color: #fff;
}

.poly-markets {
  padding: 1rem 1.5rem 1.5rem;
  overflow-y: auto;
}

.poly-market-card {
  background: #1a1e23;
  border: 1px solid #25272d;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  transition: background 0.2s;
}

.poly-market-card:hover {
  background: #20252c;
}

.poly-market-card:last-child {
  margin-bottom: 0;
}

.poly-question {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.poly-book-ref {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 1rem;
  font-style: italic;
}

.poly-outcomes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.poly-outcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  background: #131517;
  border: 1px solid #25272d;
  border-radius: 8px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.poly-outcome:hover {
  border-color: #2E5CFF;
  background: #1a1c20;
}

.poly-outcome[data-side="yes"]:hover {
  border-color: #22c55e;
}

.poly-outcome[data-side="no"]:hover {
  border-color: #ef4444;
}

.poly-outcome-label {
  font-weight: 600;
}

.poly-outcome-pct {
  font-size: 1rem;
  font-weight: 700;
  color: #2E5CFF;
}

.poly-outcome[data-side="yes"] .poly-outcome-pct {
  color: #22c55e;
}

.poly-outcome[data-side="no"] .poly-outcome-pct {
  color: #ef4444;
}

.poly-bar-wrap {
  flex: 2;
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #131517;
}

.poly-bar {
  height: 100%;
  transition: width 0.3s ease;
}

.poly-bar-yes {
  background: #22c55e;
}

.poly-bar-no {
  background: #ef4444;
}

/* ═══════════════════════════════════════════════════════════
   AI TAROT
   ═══════════════════════════════════════════════════════════ */
.tarot-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #4a1942 0%, #7c3a6e 50%, #c44569 100%);
  color: #fff;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(196, 69, 105, 0.4);
}

.tarot-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(255, 20, 147, 0.5);
}

.tarot-icon { font-size: 1.2rem; }
.tarot-panel {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-height: 70vh;
  background: linear-gradient(180deg, #1a0a1a 0%, #2d1b2d 100%);
  border: 4px solid rgba(255, 215, 0, 0.5);
  z-index: 501;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(191, 0, 255, 0.3);
  display: flex;
  flex-direction: column;
}

.tarot-panel.open {
  opacity: 1;
  visibility: visible;
}

.tarot-header {
  padding: 1rem 1.25rem;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  position: relative;
}

.tarot-header h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--gold-coin);
  margin-bottom: 0.35rem;
}

.tarot-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
}

.tarot-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  cursor: pointer;
}

.tarot-close:hover { color: #fff; }

.tarot-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.tarot-prompt {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.tarot-draw-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--purple-onion) 100%);
  color: #fff;
  border: 4px solid rgba(255,255,255,0.8);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

.tarot-draw-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.6);
}

.tarot-result {
  display: none;
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
}

.tarot-result.show { display: block; }

.tarot-card-reveal {
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border: 2px solid rgba(255, 215, 0, 0.4);
}

.tarot-card-face {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.tarot-card-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: var(--gold-coin);
  margin-bottom: 0.75rem;
}

.tarot-card-meaning { margin-bottom: 0.5rem; }

.tarot-card-note {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   求签 FORTUNE STICKS
   ═══════════════════════════════════════════════════════════ */
/* ─── Fortune toggle button ─── */
.fortune-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #1a3a2a 0%, #2d5a4a 50%, #4a7c6e 100%);
  color: #fff;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(74, 124, 110, 0.4);
}

.fortune-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.fortune-icon {
  font-size: 1.3rem;
  font-weight: bold;
}

/* ─── Fortune panel ─── */
.fortune-panel {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-height: 80vh;
  background: radial-gradient(ellipse at top, #1a1208 0%, #0d0a04 100%);
  border: 4px solid rgba(232, 213, 168, 0.5);
  z-index: 501;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(139, 115, 85, 0.3);
  display: flex;
  flex-direction: column;
}

.fortune-panel.open {
  opacity: 1;
  visibility: visible;
}

.fortune-header {
  padding: 1rem 1.25rem;
  border-bottom: 2px solid rgba(232, 213, 168, 0.3);
  position: relative;
}

.fortune-header h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #e8d5a8;
  margin-bottom: 0.35rem;
}

.fortune-subtitle {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
}

.fortune-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  cursor: pointer;
}
.fortune-close:hover { color: #fff; }

.fortune-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Scene: cylinder + drawn stick area */
.fortune-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  min-height: 200px;
}

/* Cylinder */
.fortune-cylinder-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.fortune-cylinder {
  width: 90px;
  height: 130px;
  background: linear-gradient(180deg, #a08868 0%, #7a6040 30%, #5a4020 70%, #3a2810 100%);
  border: 3px solid #6a5030;
  border-radius: 0 0 12px 12px;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 -20px 30px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.5);
}

/* Bundle of sticks inside cylinder */
.fortune-sticks-bundle {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
}

.fortune-stick-rod {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6px;
  height: 50px;
  background: linear-gradient(180deg, #e8d5a8 0%, #c4a870 40%, #a08050 100%);
  border-radius: 2px 2px 1px 1px;
  transform: translateX(calc(-50% + var(--rod-offset))) rotate(var(--rod-tilt));
  transform-origin: bottom center;
  box-shadow: 1px 0 3px rgba(0,0,0,0.3);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fortune-stick-chosen {
  background: linear-gradient(180deg, #f0e0b0 0%, #d4b878 40%, #b89850 100%);
  z-index: 2;
  width: 7px;
}

/* Shaking animation */
.fortune-cylinder.shaking .fortune-stick-rod {
  animation: stickJitter 0.12s ease-in-out infinite alternate;
}

.fortune-cylinder.shaking {
  animation: cylinderShake 0.12s ease-in-out infinite alternate;
}

@keyframes cylinderShake {
  0% { transform: rotate(-2deg) translateX(-3px); }
  100% { transform: rotate(2deg) translateX(3px); }
}

@keyframes stickJitter {
  0% { transform: translateX(calc(-50% + var(--rod-offset) - 2px)) rotate(calc(var(--rod-tilt) - 4deg)); }
  100% { transform: translateX(calc(-50% + var(--rod-offset) + 2px)) rotate(calc(var(--rod-tilt) + 4deg)); }
}

/* Chosen stick emerges */
.fortune-cylinder.stick-out .fortune-stick-chosen {
  transform: translateX(calc(-50% + var(--rod-offset))) rotate(-2deg) translateY(-90px);
  height: 120px;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.5s ease;
}

.fortune-hint {
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin-top: 0.25rem;
}

.fortune-hint.hidden { display: none; }

/* Drawn stick display */
.fortune-drawn {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
  animation: drawnStickAppear 0.6s ease-out both;
}

.fortune-drawn.visible {
  display: flex;
}

@keyframes drawnStickAppear {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.fortune-drawn-stick {
  width: 200px;
  height: 40px;
  background: linear-gradient(90deg, #e8d5a8 0%, #d4b878 50%, #c4a870 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 15px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
}

.fortune-drawn-number {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  font-weight: 400;
  color: #3a2010;
  letter-spacing: 0.05em;
}

/* Interpretation card */
.fortune-interpretation {
  display: none;
  width: 100%;
  background: rgba(255, 248, 230, 0.06);
  border: 2px solid rgba(139, 115, 85, 0.5);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  animation: interpReveal 0.5s ease-out 0.3s both;
}

.fortune-interpretation.visible {
  display: block;
}

@keyframes interpReveal {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fortune-interp-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #e8d5a8;
  margin-bottom: 0.75rem;
  text-align: center;
}

.fortune-interp-poem {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin-bottom: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(139,115,85,0.3);
  padding-bottom: 0.75rem;
}

.fortune-interp-meaning {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  text-align: center;
}

.fortune-interp-advice {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: #c4a870;
  text-align: center;
  margin-bottom: 0;
}

/* Shake button */
.fortune-shake-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #6b5344 0%, #8b7355 100%);
  color: #f0e0c0;
  border: 4px solid rgba(232, 213, 168, 0.8);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.05em;
}

.fortune-shake-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(232, 213, 168, 0.6);
}

.fortune-shake-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Fortune hub tagline on home */
.fortune-hub-tagline {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin: 1.5rem 0 1rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
  animation: fortuneTaglinePulse 3s ease-in-out infinite;
}

@keyframes fortuneTaglinePulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   CHATBOT
   ═══════════════════════════════════════════════════════════ */
.chat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--electric-blue) 0%, var(--purple-onion) 100%);
  color: #fff;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.4);
}

.chat-toggle:hover {
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--grass-green) 100%);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(255, 20, 147, 0.5);
}

.chat-panel {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-height: 500px;
  background: #fff;
  border: 4px solid #333;
  z-index: 501;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.chat-panel.open {
  opacity: 1;
  visibility: visible;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 4px solid #333;
}

.chat-header h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--purple-deep);
}

.chat-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  max-height: 320px;
}

.chat-msg {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  max-width: 90%;
  border: 4px solid #333;
  background: #fff;
}

.chat-msg.bot {
  margin-right: auto;
  background: #e8e0f0;
}

.chat-msg.user {
  margin-left: auto;
  background: #e0f0e8;
}

.chat-msg p {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #333;
}

.chat-input-wrap {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 4px solid #333;
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 4px solid #333;
  color: #333;
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
}

.chat-send {
  padding: 0.75rem 1rem;
  background: var(--grass-green);
  color: #fff;
  border: 4px solid #333;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  cursor: pointer;
}

.chat-send:hover {
  background: var(--gold-coin);
  color: var(--purple-deep);
}

/* ═══════════════════════════════════════════════════════════
   ONION KINGDOM — Ad banners & game modal
   ═══════════════════════════════════════════════════════════ */

/* ---------- Shared ad banner styles ---------- */
.ok-ad-banner {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.ok-ad-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0a2e 0%, #3d1a6e 30%, #6b21a8 60%, #9333ea 100%);
  border: 3px solid #fbbf24;
  border-radius: 10px;
  padding: 1rem 0.8rem;
  text-align: center;
  box-shadow:
    0 0 15px rgba(147, 51, 234, 0.6),
    0 0 30px rgba(251, 191, 36, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  animation: okAdGlow 2s ease-in-out infinite alternate;
}

@keyframes okAdGlow {
  0% {
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.6), 0 0 30px rgba(251, 191, 36, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3);
    border-color: #fbbf24;
  }
  100% {
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.9), 0 0 50px rgba(251, 191, 36, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.2);
    border-color: #f59e0b;
  }
}

/* Sparkle overlay */
.ok-ad-sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 70% 20%, #fbbf24 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 70%, #fff 50%, transparent 100%),
    radial-gradient(2px 2px at 85% 60%, #c084fc 50%, transparent 100%),
    radial-gradient(1px 1px at 30% 85%, #fbbf24 50%, transparent 100%),
    radial-gradient(2px 2px at 10% 60%, #fff 50%, transparent 100%);
  animation: okSparkle 3s linear infinite;
  pointer-events: none;
}

@keyframes okSparkle {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.5; }
}

.ok-ad-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  color: #888;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.1em;
  z-index: 2;
}

.ok-ad-crown {
  font-size: 1.6rem;
  display: block;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
  animation: okCrownBob 2s ease-in-out infinite;
}
@keyframes okCrownBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.ok-ad-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.85rem;
  color: #fbbf24;
  text-shadow: 0 0 10px #fbbf24, 0 0 20px #9333ea, 2px 2px 0 #000;
  line-height: 1.5;
  margin: 0.3rem 0;
  letter-spacing: 0.05em;
}

.ok-ad-onion {
  font-size: 2rem;
  display: block;
  animation: okOnionSpin 4s linear infinite;
  margin: 0.25rem 0;
}
@keyframes okOnionSpin {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(15deg) scale(1.1); }
  50%  { transform: rotate(0deg) scale(1); }
  75%  { transform: rotate(-15deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.ok-ad-onion-bounce {
  font-size: 1.4rem;
  display: inline-block;
  animation: okOnionSpin 4s linear infinite;
  vertical-align: middle;
}

.ok-ad-cta {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  color: #fff;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #dc2626);
  background-size: 200% 100%;
  animation: okCtaSlide 1.5s linear infinite;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  margin-top: 0.4rem;
  text-shadow: 1px 1px 0 #000;
  border: 2px solid #fff;
}
@keyframes okCtaSlide {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.ok-ad-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.6rem;
  color: #c4b5fd;
  margin-top: 0.35rem;
}

/* ---------- Onion Price Comparison Ad ---------- */
.price-comp-ad {
  cursor: pointer;
  user-select: none;
}
.price-comp-ad-sidebar {
  position: fixed;
  right: 12px;
  top: 115px;
  z-index: 90;
  width: 160px;
}
.price-comp-ad-inner {
  background: linear-gradient(180deg, #0d4f0d 0%, #1a7a1a 50%, #22a022 100%);
  border: 3px solid #ffd700;
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.price-comp-badge {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.28rem;
  color: #ffd700;
  margin-bottom: 0.2rem;
}
.price-comp-title {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.35rem;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}
.price-comp-sub {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.35rem;
  color: #b8e6b8;
  margin-bottom: 0.25rem;
}
.price-comp-cta {
  display: inline-block;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.3rem;
  background: #ffd700;
  color: #0d4f0d;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}

/* Price comparison modal */
.price-comp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.price-comp-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.price-comp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
.price-comp-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 95vw;
  width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0,0,0,0.4);
}
.price-comp-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #333;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}
.price-comp-modal-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: #000;
  margin: 0 0 0.25rem;
}
.price-comp-modal-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: #000;
  margin-bottom: 1rem;
}
.price-comp-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}
.price-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Sans', sans-serif;
}
.price-comp-table th {
  background: #0d4f0d;
  color: #fff;
  padding: 0.5rem 0.4rem;
  font-size: 0.75rem;
  text-align: left;
}
.price-comp-table th:first-child { border-radius: 6px 0 0 0; }
.price-comp-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #eee;
  font-size: 0.85rem;
  color: #000;
}
.price-comp-product-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.4rem;
}
.price-comp-logo {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 0.2rem;
}
.price-best {
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 700;
}
.price-comp-disclaimer {
  font-size: 0.7rem;
  color: #000;
  margin: 0;
}

/* ---------- Sidebar banners: visible on desktop, hidden on mobile (strip shown instead) ---------- */
.ok-ad-sidebar {
  position: fixed;
  left: 12px;
  top: 115px; /* below header (~100px) */
  z-index: 90;
  width: 170px;
}
.ok-ad-sidebar:hover {
  transform: scale(1.05);
}
.ok-ad-sidebar:hover .ok-ad-inner {
  box-shadow: 0 0 35px rgba(147, 51, 234, 1), 0 0 60px rgba(251, 191, 36, 0.6), inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* ---------- Inline banner — hidden, ads moved to top strip ---------- */
.ok-ad-inline-placed {
  display: none;
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.ok-ad-inner-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.8rem 1.2rem;
}

.ok-ad-title-inline {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: #fbbf24;
  text-shadow: 0 0 10px #fbbf24, 0 0 20px #9333ea, 2px 2px 0 #000;
  letter-spacing: 0.05em;
}

.ok-ad-cta-inline {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #fff;
  background: linear-gradient(90deg, #dc2626, #f59e0b, #dc2626);
  background-size: 200% 100%;
  animation: okCtaSlide 1.5s linear infinite;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  text-shadow: 1px 1px 0 #000;
  border: 2px solid #fff;
  white-space: nowrap;
}

.ok-ad-sub-inline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: #c4b5fd;
  font-style: italic;
}

/* ---------- Game modal ---------- */
.ok-game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
}
.ok-game-modal.active {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.ok-game-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.ok-game-modal-content {
  position: relative;
  width: 100vw;
  max-width: 500px;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  background: #1a0a2e;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(147, 51, 234, 0.6), 0 0 80px rgba(251, 191, 36, 0.3);
  animation: okModalIn 0.35s ease-out;
  flex: 0 0 auto;
}
@keyframes okModalIn {
  from { opacity: 0; transform: scale(0.85) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ok-game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: linear-gradient(90deg, #3d1a6e, #6b21a8);
  border-bottom: 2px solid #fbbf24;
}

.ok-game-modal-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: #fbbf24;
  text-shadow: 0 0 8px #fbbf24;
}

.ok-game-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.ok-game-modal-close:hover {
  background: rgba(220, 38, 38, 0.6);
  border-color: #dc2626;
}

.ok-game-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #0f0320;
}

/* ═══════════════════════════════════════════════════════════
   MAGIC ONION — Dramatic tacky ad
   ═══════════════════════════════════════════════════════════ */
.magic-onion-ad {
  cursor: pointer;
  user-select: none;
}
.magic-onion-ad-sidebar {
  position: fixed;
  left: 12px;
  bottom: 24px; /* anchor from bottom so it always shows */
  z-index: 90;
  width: 170px;
  overflow: hidden;
  border-radius: 10px;
}
.magic-onion-ad-inner {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #4a0000 0%, #8b0000 25%, #cc0000 50%, #ff3333 75%, #cc0000 100%);
  border: 4px solid #ffd700;
  border-radius: 10px;
  padding: 0.6rem 0.55rem;
  text-align: center;
  overflow: hidden;
  animation: magicOnionPulse 3s ease-in-out infinite;
  box-shadow:
    0 0 8px rgba(255, 0, 0, 0.5),
    0 0 14px rgba(255, 215, 0, 0.15),
    inset 0 0 20px rgba(0,0,0,0.4);
}
@keyframes magicOnionPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 0, 0, 0.5), 0 0 14px rgba(255, 215, 0, 0.15); }
  50% { transform: scale(1.02); box-shadow: 0 0 10px rgba(255, 0, 0, 0.55), 0 0 16px rgba(255, 215, 0, 0.18); }
}
.magic-onion-ad-badge {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.36rem;
  color: #ffd700;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  display: block;
  animation: magicOnionBlink 4s ease-in-out infinite;
}
@keyframes magicOnionBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
}
.magic-onion-ad-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.42rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 100%;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
}
.magic-onion-ad-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0.25rem auto;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 8px rgba(147, 51, 234, 0.3));
  animation: magicOnionEnlarge 5s ease-in-out infinite;
  transform-origin: center center;
}
@keyframes magicOnionEnlarge {
  0%   { transform: scale(0.8); opacity: 0.95; filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5)); }
  50%  { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6)); }
  100% { transform: scale(0.8); opacity: 0.95; filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5)); }
}
.magic-onion-ad-claims {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.4rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 0.25rem;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}
.magic-onion-ad-cta {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.38rem;
  color: #ffd700;
  background: #000;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 2px solid #ffd700;
  max-width: 100%;
  display: inline-block;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: magicOnionCta 3s ease-in-out infinite;
}
@keyframes magicOnionCta {
  0%, 100% { background: #000; color: #ffd700; transform: scale(1); }
  50% { background: #2a2000; color: #ffd700; transform: scale(1.02); }
}

/* ═══════════════════════════════════════════════════════════
   YOUR ONION IS CALLING YOU — tacky dating-style ad
   ═══════════════════════════════════════════════════════════ */
.onion-calling-ad {
  cursor: pointer;
  user-select: none;
}
.onion-calling-ad-sidebar {
  position: fixed;
  right: 12px;
  top: 360px;
  z-index: 90;
  width: 185px;
  overflow: hidden;
  border-radius: 10px;
}
.onion-calling-ad-inner {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #2d1b4e 0%, #6b21a8 25%, #a855f7 50%, #ec4899 75%, #6b21a8 100%);
  border: 4px solid #f472b6;
  border-radius: 10px;
  padding: 0.6rem 0.55rem;
  text-align: center;
  overflow: hidden;
  animation: onionCallingPulse 3s ease-in-out infinite;
  box-shadow:
    0 0 8px rgba(168, 85, 247, 0.5),
    0 0 14px rgba(236, 72, 153, 0.3),
    inset 0 0 20px rgba(0,0,0,0.3);
}
@keyframes onionCallingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.onion-calling-ad-badge {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.32rem;
  color: #fce7f3;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  display: block;
}
.onion-calling-ad-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0.35rem auto;
  display: block;
  transition: opacity 0.3s ease;
}
.onion-calling-ad-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.42rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.5;
  letter-spacing: 0;
  max-width: 100%;
  display: block;
  word-break: break-word;
  overflow-wrap: break-word;
}
.onion-calling-ad-cta {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.38rem;
  color: #fce7f3;
  background: #000;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 2px solid #f472b6;
  max-width: 100%;
  display: inline-block;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-top: 0.2rem;
  animation: onionCallingCta 3s ease-in-out infinite;
}
@keyframes onionCallingCta {
  0%, 100% { background: #000; color: #fce7f3; transform: scale(1); }
  50% { background: #2a1a2a; color: #fce7f3; transform: scale(1.02); }
}

/* Your Onion camera modal */
.onion-calling-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.onion-calling-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.onion-calling-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.onion-calling-modal-content {
  position: relative;
  background: linear-gradient(180deg, #1a0a2e 0%, #2d1b4e 100%);
  border: 4px solid #f472b6;
  border-radius: 12px;
  padding: 1.25rem 1.5rem 1.5rem;
  max-width: 420px;
  width: 90vw;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  text-align: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5), 0 0 80px rgba(236, 72, 153, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.onion-calling-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #6b21a8;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.onion-calling-modal-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: #fce7f3;
  margin: 0 0 0.35rem;
  flex-shrink: 0;
}
.onion-calling-modal-prompt {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #e9d5ff;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
/* Video wrap: real onion mask — single Photo Booth–style view */
.onion-calling-video-wrap {
  position: relative;
  width: 280px;
  height: 336px;
  max-width: 100%;
  flex-shrink: 0;
  margin: 0 auto 0.75rem;
  border-radius: 0;
  overflow: hidden;
  mask-image: url('assets/onion_frame.png');
  mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  -webkit-mask-image: url('assets/onion_frame.png');
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
}
.onion-calling-modal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform: scaleX(-1);
  display: block;
}
.onion-calling-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.5;
}
.onion-calling-actions {
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.onion-calling-take-picture {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
  color: #fff;
  border: 2px solid #f472b6;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 0 #5b21b6;
  transition: transform 0.1s, box-shadow 0.1s;
}
.onion-calling-take-picture:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #5b21b6;
}
.onion-calling-take-picture:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #5b21b6;
}
#onion-calling-canvas {
  display: none;
}
.onion-calling-screenshot-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.onion-calling-screenshot-wrap.visible {
  display: flex;
}
.onion-calling-screenshot {
  max-width: 280px;
  max-height: min(336px, 40vh);
  border: 3px solid #a855f7;
  border-radius: 0;
  clip-path: path('M 140 8 C 200 8 268 70 272 165 C 274 240 232 328 140 328 C 48 328 6 240 8 165 C 12 70 80 8 140 8 Z');
  -webkit-clip-path: path('M 140 8 C 200 8 268 70 272 165 C 274 240 232 328 140 328 C 48 328 6 240 8 165 C 12 70 80 8 140 8 Z');
}
.onion-calling-download {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: #c4b5fd;
  text-decoration: none;
}
.onion-calling-download:hover {
  color: #e9d5ff;
}
.onion-calling-close-after {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  padding: 0.5rem 1rem;
  background: #6b21a8;
  color: #fff;
  border: 2px solid #f472b6;
  border-radius: 8px;
  cursor: pointer;
}
.onion-calling-close-after:hover {
  background: #7c3aed;
}
.onion-calling-modal-status {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #c4b5fd;
  margin: 0;
  flex-shrink: 0;
}

/* Photo Booth–style: keep modal fully in view on short viewports */
@media (max-height: 620px) {
  .onion-calling-modal-content { padding: 1rem 1.25rem 1rem; }
  .onion-calling-modal-title { margin-bottom: 0.2rem; }
  .onion-calling-modal-prompt { font-size: 0.75rem; margin-bottom: 0.5rem; }
  .onion-calling-video-wrap {
    width: 220px;
    height: 264px;
    margin-bottom: 0.5rem;
  }
  .onion-calling-screenshot { max-width: 220px; max-height: min(264px, 35vh); }
}

/* Magic Onion modal */
.magic-onion-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.magic-onion-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.magic-onion-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.magic-onion-modal-content {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #ffe4e4 100%);
  border: 4px solid #cc0000;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.6), 0 0 120px rgba(255, 215, 0, 0.2);
}
.magic-onion-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #cc0000;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.magic-onion-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}
.magic-onion-hero-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 20px rgba(147, 51, 234, 0.5));
}
.magic-onion-hero-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.6rem;
  color: #cc0000;
  margin: 0 0 0.5rem;
  text-shadow: 2px 2px 0 #000;
}
.magic-onion-hero-desc,
.magic-onion-prompt-q {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
}
.magic-onion-hero-desc {
  margin: 0;
}
.magic-onion-prompt {
  text-align: center;
  margin-bottom: 1.5rem;
}
.magic-onion-prompt-q {
  margin-bottom: 1rem;
}
.magic-onion-prompt-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.magic-onion-prompt-yes,
.magic-onion-prompt-no {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border: 3px solid #cc0000;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}
.magic-onion-prompt-yes {
  background: linear-gradient(180deg, #cc0000 0%, #8b0000 100%);
  color: #ffd700;
}
.magic-onion-prompt-no {
  background: #fff;
  color: #cc0000;
}
.magic-onion-prompt-yes:hover,
.magic-onion-prompt-no:hover {
  transform: scale(1.05);
}
.magic-onion-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.magic-onion-name,
.magic-onion-email {
  font-family: 'DM Sans', sans-serif;
  padding: 0.75rem 1rem;
  border: 3px solid #cc0000;
  border-radius: 6px;
  font-size: 1rem;
}
.magic-onion-buy-btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, #cc0000 0%, #8b0000 100%);
  color: #ffd700;
  border: 3px solid #000;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}
.magic-onion-buy-btn:hover {
  transform: scale(1.02);
}
.magic-onion-disclaimer {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  color: #888;
  margin-top: 1rem;
  text-align: center;
}
.magic-onion-thanks h2 {
  font-family: 'Press Start 2P', cursive;
  color: #cc0000;
  margin-bottom: 1rem;
}
.magic-onion-thanks p {
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 0.5rem;
  color: #333;
}
.magic-onion-thanks-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #888;
  font-style: italic;
}
.magic-onion-declined h2 {
  font-family: 'Press Start 2P', cursive;
  color: #cc0000;
  margin-bottom: 1rem;
}
.magic-onion-declined p {
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 0.5rem;
  color: #333;
}

/* Magic Onion inline ad — hidden, ads moved to top strip */
.magic-onion-ad-inline {
  display: none;
  max-width: 680px;
  margin: 1.5rem auto;
  padding: 0 2rem;
  overflow: hidden;
}
.magic-onion-ad-inner-wide {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  max-width: 100%;
  overflow: hidden;
}
.magic-onion-ad-img-inline {
  width: 48px;
  height: 48px;
  object-fit: contain;
  animation: magicOnionEnlargeInline 5s ease-in-out infinite;
  transform-origin: center center;
}
@keyframes magicOnionEnlargeInline {
  0%   { transform: scale(0.85); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(0.85); }
}
.magic-onion-ad-title-inline {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}
.magic-onion-ad-claims-inline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.55rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}
.magic-onion-ad-cta-inline {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.52rem;
  color: #ffd700;
  background: #000;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ─── Ads: strip visible, sidebars hidden — long horizontal banners stacked vertically ─── */
  .ad-strip-top {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.75rem;
    max-width: 100%;
  }
  .ad-strip-item {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
  }
  .ok-ad-sidebar,
  .magic-onion-ad-sidebar,
  .onion-calling-ad-sidebar,
  .price-comp-ad-sidebar { display: none; }

  /* ─── Nav ─── */
  .main-nav {
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }
  .nav-row-top {
    gap: 0.4rem 0.6rem;
    justify-content: center;
  }
  .nav-link {
    font-size: 0.38rem;
    padding: 0.35rem 0.45rem;
  }
  .nav-link-poo {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }

  /* ─── Landing ─── */
  .planet-and-ring { width: 280px; height: 280px; }
  .landing-onion-img { width: 240px; height: 240px; }
  .planet-atmosphere { width: 280px; height: 280px; }
  .planet-ring { width: 280px; height: 22px; }
  .planet-ring::before,
  .planet-ring::after { width: 280px; height: 22px; }
  .sky-onion-1 { width: 40px; height: 40px; }
  .sky-onion-2 { width: 30px; height: 30px; }
  .sky-onion-3 { width: 35px; height: 35px; }
  .sky-onion-4 { width: 25px; height: 25px; }
  .sky-onion-5 { width: 22px; height: 22px; }
  .sky-onion-6 { width: 28px; height: 28px; }
  .landing-epic-text { padding: 1.5rem 1rem 0.5rem; }
  .onion-planet-wrap { padding: 0.5rem 1rem 1rem; }
  .landing-tagline { font-size: 0.38rem; letter-spacing: 0.15em; }
  .landing-subtitle { font-size: 1.1rem; }
  .landing-cta { font-size: 1rem; }
  .onion-landing { padding: 0 0.75rem 80px; }
  .age-consent-title { font-size: 0.5rem; }
  .age-btn { font-size: 0.4rem; padding: 0.8rem 1rem; }
  .teletubbies-img { max-width: 320px; }
  .enter-btn.game-btn { font-size: 0.42rem; padding: 1rem 1.6rem; }
  .game-label { font-size: 0.45rem; }

  /* ─── Roulette ─── */
  .roulette-wheel { width: 280px; height: 280px; }
  .roulette-segment { font-size: 0.45rem; }

  /* ─── Main content sections ─── */
  .layer-page { padding: 8rem 1rem 3rem; }
  .layer-content { max-width: 100%; }
  .section-title { font-size: 1.1rem; margin-bottom: 1rem; }
  .content-card { padding: 1.5rem 1.25rem; }
  .content-card p,
  .content-card ul { font-size: 1.4rem; line-height: 1.8; }

  /* ─── Hero ─── */
  .welcome-title { font-size: clamp(0.85rem, 4.5vw, 1.15rem); }
  .hero-subtitle { font-size: 1.4rem; }
  .onion-cast-btn { width: 44px; height: 44px; }
  .teletubbies-gang { margin: 1rem 0; }

  /* ─── POO Wikipedia ─── */
  .poo-block {
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: none;
  }
  .poo-infobox {
    float: none;
    width: 100%;
    margin: 0 0 1.25rem 0;
  }
  .poo-toc {
    float: none;
    width: 100%;
    margin: 0.75rem 0;
    box-sizing: border-box;
  }
  .poo-content {
    padding: 1.25rem 1rem;
    font-size: 1.15rem;
  }
  .poo-content h3 { font-size: 1.25rem; }

  /* ─── Bottom bar & panels ─── */
  .bottom-action-bar {
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100vw - 24px);
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    bottom: 12px;
  }
  .onion-game-toggle .game-label { display: none; }
  .onion-game-toggle { justify-content: center; }
  .polymarket-toggle .poly-label { display: none; }
  .tarot-toggle .tarot-label,
  .fortune-toggle .fortune-label,
  .polymarket-toggle .poly-label { display: none; }
  .tarot-panel,
  .fortune-panel,
  .onion-game-panel,
  .polymarket-panel,
  .chat-panel {
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    max-height: 75vh;
  }
  .fortune-hub-tagline { font-size: 1rem; }

  /* ─── Floating onions ─── */
  .floating-onions .float-onion { width: 20px; height: 20px; }

  /* ─── Ads — show sidebars, compact for tablet ─── */
  .ok-ad-sidebar { width: 110px; top: 115px; }
  .magic-onion-ad-sidebar { width: 110px; bottom: 24px; }
  .onion-calling-ad-sidebar { width: 110px; top: 380px; }
  .ok-ad-inner { overflow: hidden; }
  .ok-ad-title { word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
  .ok-ad-sub { word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
  .magic-onion-ad-inner { padding: 0.4rem 0.35rem; }
  .magic-onion-ad-img { width: 40px; height: 40px; }
  .magic-onion-ad-badge { font-size: 0.28rem; }
  .magic-onion-ad-title { font-size: 0.32rem; }
  .magic-onion-ad-claims { font-size: 0.32rem; }
  .magic-onion-ad-cta { font-size: 0.3rem; padding: 0.25rem 0.3rem; }
  .onion-calling-ad-inner { padding: 0.4rem 0.35rem; }
  .onion-calling-ad-img { width: 50px; height: 50px; }
  .onion-calling-ad-badge { font-size: 0.26rem; }
  .onion-calling-ad-title { font-size: 0.32rem; }
  .onion-calling-ad-cta { font-size: 0.3rem; padding: 0.25rem 0.3rem; }
  .ok-ad-inline-placed { padding: 1rem; }
  .ok-ad-title-inline { font-size: 0.55rem; }
  .ok-ad-cta-inline { font-size: 0.4rem; }
  .ok-game-modal-content { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Small phone (≤480px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* ─── Nav: stack everything vertically ─── */
  .main-nav {
    padding: 0.4rem 0.5rem;
    gap: 0.3rem;
  }
  .nav-row-top {
    gap: 0.3rem 0.4rem;
    justify-content: center;
  }
  .nav-link {
    font-size: 0.42rem;
    padding: 0.4rem 0.5rem;
  }
  .nav-link-poo {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
  }
  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 0;
  }
  .lang-btn {
    font-size: 0.3rem;
    padding: 0.3rem 0.35rem;
  }

  /* ─── Landing ─── */
  .planet-and-ring { width: 220px; height: 220px; }
  .landing-onion-img { width: 190px; height: 190px; }
  .planet-atmosphere { width: 220px; height: 220px; }
  .planet-ring { width: 220px; height: 18px; }
  .planet-ring::before,
  .planet-ring::after { width: 220px; height: 18px; }
  .landing-tagline { font-size: 0.3rem; letter-spacing: 0.1em; }
  .age-consent-title { font-size: 0.45rem; }
  .age-btn { font-size: 0.35rem; padding: 0.6rem 0.8rem; }
  .landing-subtitle { font-size: 0.95rem; }
  .enter-btn.game-btn { font-size: 0.35rem; padding: 0.85rem 1.2rem; }
  .game-label { font-size: 0.35rem; }

  /* ─── Roulette ─── */
  .roulette-wheel { width: 240px; height: 240px; }
  .roulette-segment { font-size: 0.38rem; }
  .roulette-segment span { margin-left: 10%; font-size: 0.35rem; }

  /* ─── Main content (sidebars hidden on mobile) ─── */
  .layer-page { padding: 7.5rem 1rem 2rem; }
  .section-title { font-size: 1rem; margin-bottom: 0.75rem; }
  .content-card { padding: 1rem; }
  .content-card p,
  .content-card ul { font-size: 1.25rem; line-height: 1.7; }
  .content-card ul { margin-left: 1rem; }

  /* ─── Hero ─── */
  .welcome-title { font-size: clamp(0.75rem, 4vw, 1rem); }
  .hero-subtitle { font-size: 1.2rem; }
  .spin-again-btn { font-size: 0.5rem; padding: 0.7rem 1.2rem; }
  .teletubbies-img { max-width: 260px; }

  /* ─── POO Wikipedia ─── */
  .poo-content { padding: 1rem 0.75rem; font-size: 1.1rem; }
  .poo-content h3 { font-size: 1.2rem; }
  .poo-infobox-image img { width: 160px; height: 160px; }

  /* ─── Bottom bar ─── */
  .bottom-action-bar {
    bottom: 8px;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
  }
  .onion-game-toggle,
  .tarot-toggle,
  .fortune-toggle,
  .polymarket-toggle,
  .chat-toggle {
    font-size: 0.35rem;
    padding: 0.4rem 0.5rem;
  }

  /* ─── Floating onions — fewer visible ─── */
  .floating-onions .float-onion { width: 18px; height: 18px; }
  .floating-onions .float-onion:nth-child(n+11) { display: none; }

  /* ─── Ads — show sidebars, compact for phone ─── */
  .ok-ad-sidebar { width: 72px; top: 105px; left: auto; right: 4px; }
  .magic-onion-ad-sidebar { width: 72px; bottom: 20px; left: 4px; }
  .onion-calling-ad-sidebar { width: 72px; top: 350px; right: 4px; }
  .magic-onion-ad-inner { padding: 0.3rem 0.25rem; }
  .magic-onion-ad-img { width: 28px; height: 28px; }
  .magic-onion-ad-badge { font-size: 0.22rem; margin-bottom: 0.15rem; }
  .magic-onion-ad-title { font-size: 0.28rem; }
  .magic-onion-ad-claims { font-size: 0.28rem; }
  .magic-onion-ad-cta { font-size: 0.26rem; padding: 0.2rem 0.25rem; }
  .onion-calling-ad-inner { padding: 0.3rem 0.25rem; }
  .onion-calling-ad-img { width: 36px; height: 36px; }
  .onion-calling-ad-badge { font-size: 0.2rem; margin-bottom: 0.15rem; }
  .onion-calling-ad-title { font-size: 0.28rem; }
  .onion-calling-ad-cta { font-size: 0.26rem; padding: 0.2rem 0.25rem; }
  .ok-ad-inner { padding: 0.35rem 0.3rem; overflow: hidden; }
  .ok-ad-crown { font-size: 1rem; }
  .ok-ad-title { font-size: 0.38rem; line-height: 1.3; word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
  .ok-ad-onion { font-size: 1rem; margin: 0.15rem 0; }
  .ok-ad-cta { font-size: 0.32rem; padding: 0.25rem 0.3rem; }
  .ok-ad-sub { font-size: 0.38rem; margin-top: 0.2rem; word-break: break-word; overflow-wrap: break-word; max-width: 100%; }
  .magic-onion-ad-inline { padding: 0 0.75rem; }
  .magic-onion-ad-title-inline { font-size: 0.52rem; }
  .magic-onion-ad-claims-inline { font-size: 0.5rem; }
  .magic-onion-ad-cta-inline { font-size: 0.46rem; }
  .ok-ad-inline-placed { padding: 0.5rem 0.75rem; }
  .ok-ad-inner-wide { gap: 0.4rem; padding: 0.5rem 0.6rem; }
  .ok-ad-title-inline { font-size: 0.45rem; }
  .ok-ad-cta-inline { font-size: 0.35rem; padding: 0.3rem 0.5rem; }
  .ok-ad-sub-inline { font-size: 0.5rem; }
  .ok-game-modal-content { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .ok-game-modal-title { font-size: 0.5rem; }
  .onion-cast-btn { width: 36px; height: 36px; }
  .footer-mascots img { width: 24px; height: 24px; }
}
