/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --deep-space:      #06000f;
  --space-mid:       #0e0528;
  --oracle-purple:   #2d1b69;
  --mystic-violet:   #7b2fff;
  --mystic-violet-2: #a259ff;
  --gold:            #ffd700;
  --gold-light:      #ffe980;
  --gold-dim:        #a08a00;
  --crystal-blue:    #7ecfff;
  --text-primary:    #f5eeff;
  --text-secondary:  #d8c4ff;
  --text-dim:        #b89ee0;
  --red-accent:      #ff4466;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--deep-space);
  color: var(--text-primary);
  font-family: 'Crimson Text', Georgia, serif;
  overflow-x: hidden;
}

/* =============================================
   STARS CANVAS
   ============================================= */
#starsCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.header-ornament {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  opacity: 0.7;
}

.title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 40%, var(--mystic-violet-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(255,215,0,0.35));
  line-height: 1.1;
}

.subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  font-style: italic;
  text-shadow: 0 0 12px rgba(180, 140, 255, 0.45);
}

.tagline {
  font-size: clamp(0.92rem, 2vw, 0.98rem);
  color: #f0d888;
  font-style: italic;
  margin-top: 0.2rem;
  text-shadow: 0 0 10px rgba(255, 210, 80, 0.5), 0 0 22px rgba(255, 180, 40, 0.25);
  animation: taglineShimmer 4s ease-in-out infinite;
}

@keyframes taglineShimmer {
  0%, 100% { opacity: 0.85; text-shadow: 0 0 10px rgba(255,210,80,0.5), 0 0 22px rgba(255,180,40,0.25); }
  50%       { opacity: 1;    text-shadow: 0 0 16px rgba(255,220,100,0.8), 0 0 36px rgba(255,200,60,0.4); }
}

/* =============================================
   CRYSTAL BALL
   ============================================= */
.crystal-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.crystal-ball {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.crystal-inner {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%,
    rgba(180,130,255,0.55) 0%,
    rgba(80, 30,160,0.85) 40%,
    rgba(10,  2, 40,0.95) 72%
  );
  box-shadow:
    0 0 28px rgba(123,47,255,0.55),
    0 0 60px rgba(123,47,255,0.25),
    inset 0 0 35px rgba(160,100,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: crystalIdle 4s ease-in-out infinite;
  transition: box-shadow 0.4s;
}

.crystal-inner::before {
  content: '';
  position: absolute;
  top: 13%;
  left: 14%;
  width: 32%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.28) 0%, transparent 70%);
  border-radius: 50%;
  transform: rotate(-35deg);
  pointer-events: none;
  z-index: 3;
}

.crystal-shimmer {
  position: absolute;
  inset: -25%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(123,47,255,0.12) 22%,
    transparent 44%,
    rgba(79,195,247,0.08) 66%,
    transparent 88%,
    rgba(255,215,0,0.05) 100%
  );
  animation: shimmerSpin 10s linear infinite;
  pointer-events: none;
}

.crystal-glow-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(180,130,255,0.15);
  animation: ringPulse 3s ease-in-out infinite;
  pointer-events: none;
}

.crystal-eye {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
  opacity: 0.88;
  transition: opacity 0.6s ease, src 0s;
  animation: eyeBreath 5s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

.crystal-base {
  width: 64px;
  height: 22px;
  margin-top: 2px;
  background: radial-gradient(ellipse, rgba(123,47,255,0.45) 0%, transparent 75%);
  border-radius: 50%;
}

.crystal-caption {
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  transition: color 0.4s, text-shadow 0.4s;
  min-height: 1.4em;
  padding: 0 1rem;
  text-shadow: 0 0 10px rgba(180, 140, 255, 0.4);
}

.crystal-inner.active {
  animation: crystalActive 0.6s ease-in-out infinite;
  box-shadow:
    0 0 50px rgba(123,47,255,0.85),
    0 0 100px rgba(123,47,255,0.45),
    0 0 160px rgba(255,215,0,0.15),
    inset 0 0 60px rgba(255,215,0,0.12);
}

.crystal-inner.active .crystal-shimmer { animation: shimmerSpin 1.2s linear infinite; }
.crystal-inner.active .crystal-eye { opacity: 1; animation: eyeBreathFast 0.8s ease-in-out infinite; }

.crystal-inner.revealed {
  animation: crystalRevealed 3s ease-in-out infinite;
  box-shadow:
    0 0 40px rgba(255,215,0,0.6),
    0 0 80px rgba(255,215,0,0.25),
    inset 0 0 40px rgba(255,215,0,0.1);
}

@keyframes crystalIdle {
  0%, 100% { box-shadow: 0 0 28px rgba(123,47,255,0.55), 0 0 60px rgba(123,47,255,0.25), inset 0 0 35px rgba(160,100,255,0.18); }
  50%       { box-shadow: 0 0 40px rgba(123,47,255,0.75), 0 0 90px rgba(123,47,255,0.38), inset 0 0 50px rgba(160,100,255,0.28); }
}

@keyframes crystalActive {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 50px rgba(123,47,255,0.85), 0 0 100px rgba(123,47,255,0.45), inset 0 0 60px rgba(255,215,0,0.12); }
  50%       { transform: scale(1.04); box-shadow: 0 0 70px rgba(123,47,255,1),    0 0 140px rgba(255,215,0,0.35),   inset 0 0 80px rgba(255,215,0,0.22); }
}

@keyframes crystalRevealed {
  0%, 100% { box-shadow: 0 0 40px rgba(255,215,0,0.6), 0 0 80px rgba(255,215,0,0.25); }
  50%       { box-shadow: 0 0 60px rgba(255,215,0,0.8), 0 0 120px rgba(255,215,0,0.4); }
}

@keyframes shimmerSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes eyeBreath {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50%       { opacity: 0.95; transform: scale(1.03); }
}

@keyframes eyeBreathFast {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50%       { opacity: 1;    transform: scale(1.06); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.9; transform: scale(1.05); }
}

/* =============================================
   QUESTION SECTION
   ============================================= */
.question-section {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.scroll-wrapper {
  width: 100%;
  background: linear-gradient(135deg, rgba(45,27,105,0.35), rgba(13,10,46,0.5));
  border: 1px solid rgba(123,47,255,0.35);
  border-radius: 14px;
  padding: 0.7rem 1rem 0.5rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.scroll-wrapper:focus-within {
  border-color: rgba(123,47,255,0.7);
  box-shadow: 0 0 22px rgba(123,47,255,0.25);
}

.scroll-top-deco,
.scroll-bottom-deco {
  text-align: center;
  color: var(--gold-dim);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  opacity: 0.6;
  padding: 0.15rem 0;
  user-select: none;
}

textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1.1rem; /* mai sotto 16px: previene lo zoom automatico su iOS */
  line-height: 1.6;
  padding: 0.3rem 0;
  resize: none;
  -webkit-text-size-adjust: 100%;
}

textarea::placeholder {
  color: rgba(179,157,219,0.4);
  font-style: italic;
}

.char-count {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  transition: color 0.3s;
}

.char-count.warn { color: var(--red-accent); }

.oracle-btn {
  background: linear-gradient(135deg, var(--oracle-purple) 0%, #4a1eaa 100%);
  border: 2px solid var(--gold);
  border-radius: 50px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.9rem 2.4rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s, opacity 0.3s;
  text-shadow: 0 0 12px rgba(255,215,0,0.5);
  box-shadow: 0 0 22px rgba(123,47,255,0.4), 0 0 44px rgba(255,215,0,0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  justify-content: center;
  max-width: 420px;
}

.oracle-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: rgba(255,255,255,0.08);
  transform: skewX(-20deg);
  transition: left 0.5s;
}

.oracle-btn:hover { transform: scale(1.05); box-shadow: 0 0 32px rgba(123,47,255,0.65), 0 0 64px rgba(255,215,0,0.15); }
.oracle-btn:hover::before { left: 130%; }
.oracle-btn:active { transform: scale(0.97); }
.oracle-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-lightning { font-size: 1.1em; animation: lightningFlicker 2s ease-in-out infinite; }

@keyframes lightningFlicker {
  0%, 100% { opacity: 1; }
  45%, 55% { opacity: 0.4; }
  50%       { opacity: 0.8; }
}

/* =============================================
   ORACLE OUTPUT
   ============================================= */
.oracle-output {
  display: none;
  width: 100%;
  max-width: 620px;
}

.slot-machine {
  display: none;
  background: rgba(10,2,30,0.75);
  border: 1px solid rgba(123,47,255,0.5);
  border-radius: 18px;
  padding: 1.8rem 1.5rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 30px rgba(123,47,255,0.2);
}

.slot-consulting {
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 8px rgba(180, 140, 255, 0.4);
  animation: consultingBlink 1.2s ease-in-out infinite;
}

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

.slot-reel {
  min-height: 72px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(123,47,255,0.3);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
}

#slotText {
  color: var(--crystal-blue);
  font-size: clamp(1rem, 2.5vw, 1.05rem);
  line-height: 1.5;
  text-align: center;
}

.slot-progress {
  height: 3px;
  background: rgba(123,47,255,0.2);
  border-radius: 99px;
  overflow: hidden;
}

.slot-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mystic-violet), var(--gold));
  border-radius: 99px;
  transition: width 0.15s linear;
}

/* Final Response */
.final-response {
  display: none;
  background: linear-gradient(145deg, rgba(30,14,80,0.8) 0%, rgba(8,3,24,0.9) 100%);
  border: 2px solid var(--gold);
  border-radius: 22px;
  padding: 2.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 40px rgba(255,215,0,0.18),
    0 0 80px rgba(123,47,255,0.25),
    inset 0 1px 0 rgba(255,215,0,0.15);
  animation: responseReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes responseReveal {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.response-top-deco,
.response-bottom-deco {
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  opacity: 0.7;
  margin-bottom: 1rem;
  user-select: none;
}

.response-bottom-deco { margin-top: 1rem; margin-bottom: 0; }

.response-emoji-big {
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1;
  margin-bottom: 0.6rem;
  animation: emojiBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: 0.1s;
}

@keyframes emojiBounce {
  from { transform: scale(0) rotate(-25deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.response-badge {
  display: inline-block;
  background: rgba(123,47,255,0.25);
  border: 1px solid rgba(123,47,255,0.55);
  border-radius: 30px;
  padding: 0.3rem 1.1rem;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.82rem, 2vw, 0.88rem);
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.response-quote {
  position: relative;
  font-size: clamp(1.15rem, 3.5vw, 1.3rem);
  line-height: 1.8;
  color: var(--text-primary);
  font-style: italic;
  padding: 0.5rem 0.5rem 0;
  margin: 0 0 0.5rem;
  min-height: 3em;
  text-align: left;
}

.response-quote::before {
  content: '\275D';
  position: absolute;
  top: -0.5rem;
  left: -0.2rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: rgba(255,215,0,0.2);
  font-style: normal;
  line-height: 1;
  pointer-events: none;
}

.oracle-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--mystic-violet-2);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursorBlink 0.7s step-end infinite;
}

.oracle-cursor.hidden { display: none; }

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

.oracle-seal {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.85rem, 2vw, 0.9rem);
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.7;
  margin: 1.4rem 0 1.2rem;
  text-align: center;
}

.retry-btn {
  background: transparent;
  border: 1px solid rgba(179,157,219,0.35);
  border-radius: 30px;
  color: var(--text-secondary);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(1rem, 2.5vw, 1.05rem);
  padding: 0.65rem 1.8rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
  width: 100%;
  max-width: 340px;
}

.retry-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 16px rgba(255,215,0,0.2);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  padding-top: 1rem;
  border-top: 1px solid rgba(123,47,255,0.15);
  width: 100%;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 768px) {
  .container { max-width: 100%; padding: 2rem 1.4rem 3.5rem; gap: 2rem; }
  .title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .oracle-btn { max-width: 100%; }
  .final-response { padding: 2rem 1.6rem; }
}

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 1.6rem 1rem 3rem; gap: 1.8rem; }

  /* Header */
  .title { font-size: clamp(1.6rem, 8vw, 2.2rem); letter-spacing: 0.02em; }
  .subtitle { font-size: 0.95rem; letter-spacing: 0.05em; }
  .tagline { font-size: 0.88rem; }
  .header-ornament { font-size: 0.65rem; letter-spacing: 0.3em; }

  /* Crystal */
  .crystal-inner { width: 140px; height: 140px; }
  .crystal-caption { font-size: 0.92rem; }

  /* Textarea wrapper */
  .scroll-wrapper { padding: 0.6rem 0.85rem 0.4rem; border-radius: 12px; }
  textarea { font-size: 1rem; line-height: 1.55; }
  .char-count { font-size: 0.75rem; }

  /* Button */
  .oracle-btn {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.5rem;
    width: 100%;
    max-width: 100%;
  }
  .btn-lightning { font-size: 1rem; }

  /* Slot machine */
  .slot-machine { padding: 1.4rem 1rem 1.2rem; border-radius: 14px; }
  .slot-consulting { font-size: 0.92rem; margin-bottom: 1rem; }
  .slot-reel { min-height: 64px; padding: 0.75rem 0.85rem; }
  #slotText { font-size: 0.95rem; }

  /* Final response */
  .final-response { padding: 1.6rem 1.1rem; border-radius: 16px; }
  .response-emoji-big { font-size: 3rem; }
  .response-badge {
    font-size: 0.78rem;
    padding: 0.25rem 0.85rem;
    letter-spacing: 0.05em;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  .response-quote {
    font-size: 1.1rem;
    line-height: 1.75;
    padding: 0.3rem 0.2rem 0;
  }
  .oracle-seal { font-size: 0.82rem; letter-spacing: 0.05em; }
  .retry-btn { font-size: 0.95rem; padding: 0.6rem 1.4rem; max-width: 100%; }
  .response-top-deco,
  .response-bottom-deco { font-size: 0.62rem; letter-spacing: 0.35em; }
}

/* Schermi molto piccoli (< 360px) */
@media (max-width: 360px) {
  .title { font-size: 1.5rem; }
  .crystal-inner { width: 120px; height: 120px; }
  .oracle-btn { font-size: 0.82rem; padding: 0.8rem 1.2rem; }
}

/* =============================================
   INSULT POPUP
   ============================================= */
.insult-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.insult-overlay.active { display: flex; }

.insult-modal {
  background: linear-gradient(145deg, #1c0008, #3a0015);
  border: 2px solid #ff2255;
  border-radius: 22px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 50px rgba(255, 34, 85, 0.55),
    0 0 100px rgba(255, 34, 85, 0.2),
    inset 0 1px 0 rgba(255, 100, 130, 0.15);
  animation: insultPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.insult-emoji {
  font-size: clamp(3rem, 10vw, 4.5rem);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
  animation: insultShake 0.55s ease-in-out;
}

.insult-text {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  line-height: 1.75;
  color: #ff99aa;
  margin-bottom: 2rem;
  font-style: italic;
}

.insult-close {
  background: rgba(255, 34, 85, 0.12);
  border: 1px solid rgba(255, 34, 85, 0.5);
  border-radius: 30px;
  color: #ff99aa;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  padding: 0.7rem 2rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  width: 100%;
  max-width: 300px;
}

.insult-close:hover {
  background: rgba(255, 34, 85, 0.28);
  border-color: #ff2255;
  color: #fff;
}

@keyframes insultPop {
  from { opacity: 0; transform: scale(0.65) rotate(-4deg); }
  to   { opacity: 1; transform: scale(1)    rotate(0deg); }
}

/* =============================================
   IDLE WANDERER (immagine vagabonda)
   ============================================= */
.idle-wanderer {
  display: none;
  position: fixed;
  width: clamp(150px, 22vw, 260px);
  height: auto;
  z-index: 10001;
  pointer-events: none;
  border-radius: 10px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.7));
  transition: left 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95),
              top  1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95),
              transform 1.6s ease;
  animation: wandererWiggle 3s ease-in-out infinite;
}

.idle-wanderer.active { display: block; }

@keyframes wandererWiggle {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  33%       { transform: rotate(4deg)  scale(1.04); }
  66%       { transform: rotate(-2deg) scale(0.97); }
}

/* =============================================
   IDLE POPUP (oracolo annoiato)
   ============================================= */
.idle-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.idle-overlay.active { display: flex; }

.idle-modal {
  background: linear-gradient(145deg, #0a0a1a, #121228);
  border: 2px solid #5566ff;
  border-radius: 22px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 40px rgba(80, 100, 255, 0.4),
    0 0 80px rgba(80, 100, 255, 0.15),
    inset 0 1px 0 rgba(120, 140, 255, 0.12);
  animation: idlePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.idle-emoji {
  font-size: clamp(3rem, 10vw, 4.5rem);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
  animation: idleYawn 1.2s ease-in-out;
}

.idle-text {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  line-height: 1.75;
  color: #aab4ff;
  margin-bottom: 2rem;
  font-style: italic;
  text-shadow: 0 0 8px rgba(100, 120, 255, 0.3);
}

.idle-close {
  background: rgba(80, 100, 255, 0.1);
  border: 1px solid rgba(80, 100, 255, 0.45);
  border-radius: 30px;
  color: #aab4ff;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  padding: 0.7rem 2rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  width: 100%;
  max-width: 300px;
}

.idle-close:hover {
  background: rgba(80, 100, 255, 0.25);
  border-color: #5566ff;
  color: #fff;
}

@keyframes idlePop {
  from { opacity: 0; transform: scale(0.8) translateY(30px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

@keyframes idleYawn {
  0%   { transform: scale(1) rotate(0deg); }
  20%  { transform: scale(1.15) rotate(-5deg); }
  40%  { transform: scale(0.95) rotate(3deg); }
  60%  { transform: scale(1.08) rotate(-2deg); }
  80%  { transform: scale(0.98) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes insultShake {
  0%   { transform: rotate(0deg)   scale(1); }
  15%  { transform: rotate(-18deg) scale(1.15); }
  30%  { transform: rotate(14deg)  scale(1.2); }
  45%  { transform: rotate(-11deg) scale(1.1); }
  60%  { transform: rotate(9deg); }
  75%  { transform: rotate(-5deg); }
  90%  { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}

@keyframes slotFlash {
  from { opacity: 0.3; color: #fff; }
  to   { opacity: 1;   color: var(--crystal-blue); }
}

.slot-flash { animation: slotFlash 0.1s ease-out forwards; }
