    @font-face{
      font-family: Digi Craft;
      font-style:normal;
      font-weight:400;
      src:url('fonts/Digi-Craft-Ultra-Black.ttf') format("truetype");
    }
    
    @font-face{
      font-family: Calibri;
      font-style:normal;
      font-weight:normal;
      src:url('fonts/calibri.ttf') format("truetype");
    }

    @font-face{
      font-family: Calibri;
      font-style:italic;
      font-weight:normal;
      src:url('fonts/calibrii.ttf') format("truetype");
    }

    @font-face{
      font-family: Calibri;
      font-style:normal;
      font-weight:bold;
      src:url('fonts/calibrib.ttf') format("truetype");
    }

    @font-face{
      font-family: Calibri;
      font-style:normal;
      font-weight:lighter;
      src:url('fonts/calibril.ttf') format("truetype");
    }

    @font-face{
      font-family: Calibri;
      font-style:italic;
      font-weight:lighter;
      src:url('fonts/calibrili.ttf') format("truetype");
    }

    @font-face{
      font-family: Clibri;
      font-style:italic;
      font-weight:bold;
      src:url('fonts/calibriz.ttf') format("truetype");
    }


    /* ===== RESET & GLOBAL ===== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body, html {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #050508;
    }

    body, html, button, input {
      font-family: 'Digi Craft', 'Times New Roman', serif;
    }

    /* ===== MAIN STAGE (hidden initially) ===== */
    .scene {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      perspective: 1200px;
      overflow: hidden;
      background: url('sort-bg.webp') center center / cover no-repeat;
      opacity: 0;
      transform: scale(0.96);
      transition: opacity 2.2s ease-out, transform 3s ease-out;
      pointer-events: none;
      z-index: 10;
    }

    .scene.visible {
      opacity: 1;
      transform: scale(1);
      pointer-events: auto;
    }

    /* camera drift inside scene */
    .world {
      position: absolute;
      width: 100%;
      height: 100%;
      transform-style: preserve-3d;
      animation: camera-drift 8s ease-in-out infinite alternate;
    }

    @keyframes camera-drift {
      0% { transform: translate(0px, 0px) scale(1); }
      100% { transform: translate(6px, 4px) scale(1.05); }
    }

    /* enchanted ceiling canvas */
    #sky-canvas {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: min(540px, 100%);
      height: 25%;
      z-index: 1;
      opacity: 0.55;
    }

    /* spot & stool area */
    .stage-area {
      position: absolute;
      bottom: 20%;
      left: 50%;
      transform: translateX(-50%);
      z-index: 5;
      display: flex;
      justify-content: center;
      align-items: flex-end;
    }

    .spotlight {
      position: absolute;
      bottom: 20%;
      left: 50%;
      transform: translateX(-50%) perspective(500px) rotateX(20deg);
      width: 250px;
      height: 600px;
      background: linear-gradient(to top, rgba(200, 220, 255, 0.12) 0%, transparent 100%);
      clip-path: polygon(40% 0, 60% 0, 100% 100%, 0% 100%);
      mix-blend-mode: screen;
      z-index: 7;
      animation: pulse-light 5s infinite alternate;
    }

    @keyframes pulse-light {
      0% { opacity: 0.7; }
      100% { opacity: 1; }
    }

    /* candles */
    .candles-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 8;
      pointer-events: none;
    }

    .candle {
      position: absolute;
      background: #d4c5a0;
      width: 6px;
      height: 20px;
      border-radius: 2px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }

    @keyframes floatCandle {
          0%, 100% { transform: translate(0, 0) rotate(0deg); }
          25% { transform: translate(1px, -4px) rotate(2deg); }
          50% { transform: translate(-1px, -7px) rotate(-1deg); }
          75% { transform: translate(2px, -3px) rotate(1deg); }
        }

    .flame {
      position: absolute;
      top: -12px;
      left: 50%;
      transform: translateX(-50%);
      width: 5px;
      height: 12px;
      background: radial-gradient(ellipse at bottom, #fff5d6 0%, #ffaa33 60%, transparent 100%);
      border-radius: 50% 50% 20% 20%;
      filter: drop-shadow(0 0 20px #ff5500);
      opacity: 0.9;
      animation: flameFlicker 0.1s infinite alternate;
      box-shadow: 0 0 10px #ffaa33, 0 0 20px #ff5500;
      z-index: 9;
    }

    @keyframes flameFlicker {
      0% { transform: translateX(-50%) scale(1) skewX(-2deg); opacity: 0.6; filter: drop-shadow(0 0 15px rgba(255,170,51,0.5)); }
      100% { transform: translateX(-50%) scale(1.1) skewX(2deg); opacity: 0.8; filter: drop-shadow(0 0 25px rgba(255,170,51,0.8)); }
    }

    .halo {
      position: absolute;
      top: -30px;
      left: -20px;
      width: 50px;
      height: 50px;
      background: radial-gradient(circle, rgba(255, 160, 50, 0.2) 0%, transparent 70%);
      border-radius: 50%;
      animation: glow-pulse 3s infinite ease-in-out;
    }

    @keyframes glow-pulse {
      0%, 100% { opacity: 0.3; transform: scale(1); }
      50% { opacity: 0.6; transform: scale(1.15); }
    }

    /* particles canvas */
    #particle-canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10;
      pointer-events: none;
    }

    /* vignette + grain always visible */
    .vignette {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 30;
      pointer-events: none;
      background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.4) 100%);
      box-shadow: inset 0 0 180px rgba(0,0,0,0.9);
    }

    .grain {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 31;
      pointer-events: none;
      opacity: 0.04;
      background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="grain"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23grain)"/></svg>');
      animation: grain-anim 0.5s steps(5) infinite;
    }

    @keyframes grain-anim {
      0%, 100% { transform: translate(0, 0); }
      10% { transform: translate(-5%, -10%); }
      20% { transform: translate(-15%, 5%); }
      30% { transform: translate(7%, -25%); }
      40% { transform: translate(-5%, 25%); }
      50% { transform: translate(-15%, 10%); }
      60% { transform: translate(15%, 0%); }
      70% { transform: translate(0%, 15%); }
      80% { transform: translate(3%, 35%); }
      90% { transform: translate(-10%, 10%); }
    }

    /* ===== STUDENT LAYER (hidden by default) ===== */
    .student {
      position: fixed;
      left: 50%;
      bottom: 10%;
      transform: translateX(-50%);
      height: 40vh;
      z-index: 25;
      opacity: 0;
      transition: opacity 1.2s ease, transform 1s ease;
      pointer-events: none;
    }

    .student.visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .student > img {
      height: 100%;
      width: auto;
      display: block;
    }


    .hat {
      position: absolute;
      width: 76%;
      left: 12%;
      top: -22%;
      z-index: 2;
      opacity: 0;
      transform-origin: center bottom;
    }

    

    .student.visible > .hat {
      animation: 
            hatEntrance 3s cubic-bezier(0.22, 0.61, 0.36, 1) .8s forwards,
            hatFloat 3s ease-in-out 1.2s infinite;
    }

    .hat > img {
        width: 100%;
        display: block;
        animation: hatWiggle 4s ease-in-out infinite;
        transform-origin: center 80%;
    }

    .hat.talking > img {
    animation: hatTalkWiggle 0.4s ease-in-out infinite;
}

@keyframes hatEntrance {
    0% {
        opacity: 0;
        transform: translateY(-120px) rotate(-25deg) scale(0.1);
        filter: brightness(2) blur(3px);
    }
    30% {
        opacity: 0.7;
        filter: brightness(2.5) blur(0px);
    }
    35% {
        opacity: 1;
        transform: translateY(-40px) rotate(8deg) scale(1.15);
        filter: brightness(1.8) blur(0px);
    }
    50% {
        transform: translateY(15px) rotate(-5deg) scale(0.9);
        filter: brightness(1.2);
    }
    65% {
        transform: translateY(-20px) rotate(3deg) scale(1.1);
        filter: brightness(1.4);
    }
    75% {
        transform: translateY(5px) rotate(-2deg) scale(0.95);
        filter: brightness(1);
    }
    85% {
        transform: translateY(-8px) rotate(1deg) scale(1.05);
    }
    95% {
        transform: translateY(2px) rotate(-0.5deg) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
        filter: brightness(1) blur(0px);
    }
}

@keyframes hatFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

@keyframes hatWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(1deg);
    }
    75% {
        transform: rotate(-1deg);
    }
}

@keyframes hatTalkWiggle {
    0%, 100% {
        transform: rotate(-1.5deg) scale(1.02);
    }
    25% {
        transform: rotate(1.5deg) scale(0.98);
    }
    50% {
        transform: rotate(-.75deg) scale(1.01);
    }
    75% {
        transform: rotate(.75deg) scale(0.99);
    }
}


/* ===== CHAT BUBBLES ===== */
.chat-bubble {
  position: absolute;
  z-index: 30;
  pointer-events: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-bubble.visible {
  display: flex;
  opacity: 1;
}

/* Hat's bubble */
.hat-bubble {
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 320px);
  max-height: 30vh;
  background: rgba(20, 16, 30, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid #c9a54b;
  border-radius: 20px;
  padding: 1rem 1rem 1rem 0;
  color: #f5e7c6;
  font-family: 'Calibri', Arial, Helvetica, sans-serif;
  font-weight: lighter;
  font-size: 0.9rem;
  text-align: center;
  direction: rtl;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 20px rgba(180,148,60,0.3);
  background-image: url('https://www.jadoogaran.org/themes/purple/images/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-blend-mode: darken;
  background-position: center center;
  justify-content: center;
}

.hat-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 16px solid rgba(20,16,30,0.92);
}

.hat-bubble .bubble-text {
  min-height: 1.2em;
  line-height: 1.6;
  max-height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(180,148,60,0.3) transparent;
  padding-left: 1rem;
}

.hat-bubble .bubble-text::-webkit-scrollbar {
  width: 4px;
}

.hat-bubble .bubble-text::-webkit-scrollbar-track {
  background: transparent;
}

.hat-bubble .bubble-text::-webkit-scrollbar-thumb {
  background: rgba(180,148,60,0.3);
  border-radius: 10px;
}


.bubble-loading {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
}

.bubble-loading.visible {
  display: flex;
}

.bubble-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d4b87a;
  animation: loadingDot 1.2s ease-in-out infinite;
}

.bubble-loading span:nth-child(2) {
  animation-delay: 0.2s;
}

.bubble-loading span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}


/* Student's bubble */
.student-bubble {
  direction: rtl;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  background: rgba(25, 20, 35, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #6b5e80;
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 15px rgba(140,120,180,0.2);
  max-height: 8rem;
}

.student-bubble::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 14px solid rgba(25,20,35,0.9);
}

.student-bubble textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #d5c8e8;
  font-family: 'Calibri', Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  resize: none;
  outline: none;
  direction: rtl;
  text-align: center;
  min-height: 2.5em;
  line-height: 1.5;
}

.student-bubble textarea::placeholder {
  color: rgba(200,180,220,0.4);
}

.student-bubble > button {
    margin-top: 0.5rem;
    background: #e4a43c;
    border: none;
    color: #0a0805;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Digi Craft', serif;
    font-size: 0.9rem;
    transition: 0.2s;
}

.student-bubble > button:disabled {
  background: #a3845c;
  cursor: none;
}



    /* ===== BIG CENTER BUTTON (initial) ===== */
    .entry-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
      background: transparent;
      pointer-events: auto;
      flex-direction: column;
      padding: 1rem;
      gap: 3rem;
    }

    .entry-overlay img {
      width: min(80vw, 300px);
    }

    .grand-button {
      background: rgba(10, 8, 15, 0.75);
      backdrop-filter: blur(12px);
      border: 2px solid rgba(220, 200, 140, 0.6);
      color: #f7e9c3;
      font-size: clamp(2rem, 6vw, 3.5rem);
      font-weight: 800;
      padding: 1.5rem 3rem;
      border-radius: 80px;
      letter-spacing: 2px;
      box-shadow: 0 0 50px rgba(200, 150, 50, 0.4);
      cursor: pointer;
      transition: all 0.4s ease;
      text-shadow: 0 0 15px black;
      font-family: 'Digi Craft', serif;
      direction: rtl;
    }

    .grand-button:hover {
      background: rgba(20, 15, 25, 0.8);
      box-shadow: 0 0 70px rgba(255, 180, 40, 0.7);
      border-color: #f5d742;
      transform: scale(1.03);
    }

    /* ===== FORM PANEL (hidden until button click) ===== */
    .form-modal {
      position: fixed;
      top: 50%;
      left: 50%;
      width: 420px;
      max-width: 90%;
      height: 90vh;
      overflow-y: auto;
      transform: translate(-50%, -50%);
      z-index: 110;
      background: rgba(5, 5, 10, 0.8);
      backdrop-filter: blur(20px);
      border: 1px solid #c9a54b;
      border-radius: 32px;
      padding: 1.5rem;
      box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 60px rgba(180, 130, 30, 0.5);
      color: #eee5c0;
      display: none;
      flex-direction: column;
      gap: .75rem;
      text-align: right;
      direction: rtl;
      animation: formAppear 0.6s ease-out;
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* IE and Edge */
    }

    .form-modal::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Opera */
    }

    .form-modal.active {
      display: flex;
    }

    @keyframes formAppear {
      0% { opacity: 0; transform: translate(-50%, -45%); }
      100% { opacity: 1; transform: translate(-50%, -50%); }
    }

    .form-modal h3 {
      font-size: 2rem;
      color: #f3d779;
      text-align: center;
      margin-bottom: 0.5rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
      font-size: 1.2rem;
    }

    .form-group.sm {
        margin-top: .5rem;
        font-size: .8rem;
        opacity: .9;
    }

    .form-group label {
      color: #d4b87a;
      margin-right: 1rem;
    }

    .form-group input {
      background: #1e1a24;
      border: 1px solid #6b5e42;
      padding: 0.5rem 1rem;
      border-radius: 20px;
      color: #f5e7c6;
      font-size: 1.1rem;
      outline: none;
      direction: rtl;
    }

    .form-group input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 8px;
        background: #1e1a24;
        border-radius: 10px;
        outline: none;
        border: 1px solid #6b5e42;
        padding: 0;
    }

    .form-group input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 22px;
        height: 22px;
        background: #b4943c;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 0 10px rgba(180, 148, 60, 0.6);
    }

    .form-group input[type="range"]::-moz-range-thumb {
        width: 22px;
        height: 22px;
        background: #b4943c;
        border-radius: 50%;
        cursor: pointer;
        border: none;
        box-shadow: 0 0 10px rgba(180, 148, 60, 0.6);
    }

    .radio-group {
      display: flex;
      gap: 2rem;
      align-items: center;
    }
    
    .radio-label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      cursor: pointer;
      font-size: 1.1rem;
      color: #f5e7c6;
    }
    
    .radio-label input[type="radio"] {
      accent-color: #b4943c;
      width: 1.2rem;
      height: 1.2rem;
      cursor: pointer;
    }

    .form-submit {
      background: #b4943c;
      border: none;
      color: #0a0805;
      font-weight: bold;
      font-size: 1.3rem;
      padding: 0.8rem;
      border-radius: 40px;
      cursor: pointer;
      transition: 0.2s;
      margin-top: 0.5rem;
      letter-spacing: 1px;
    }

    .form-submit:hover {
      background: #dbb452;
    }

    /* hide entry button when form appears */
    .entry-overlay.hidden {
      display: none;
    }

    /* music control hidden */
    #bg-music {
      display: none;
    }



    /* ===== CELEBRATION EFFECTS ===== */
.celebration-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* Curtains */
.curtain {
  position: absolute;
  top: -100%;
  width: 15%;
  height: 100%;
  transition: top 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.curtain.active {
  top: 10px;
}

.curtain-left {
  left: 30px;
}

.curtain-right {
  right: 30px;
}

.curtain-fabric {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    var(--house-color, #740001) 5%,
    var(--house-color-secondary, #ae0001) 30%,
    var(--house-color, #740001) 70%,
    rgba(0, 0, 0, 0.5) 100%
  );
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.5),
    5px 0 15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.curtain-right .curtain-fabric {
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.5),
    -5px 0 15px rgba(0, 0, 0, 0.6);
}

.curtain-fold {
  position: absolute;
  width: 20%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(0, 0, 0, 0.4) 100%
  );
  animation: curtainFade 3s ease-in-out infinite;
}

.curtain-fold:nth-child(1) { left: 5%; animation-delay: 0s; }
.curtain-fold:nth-child(2) { left: 25%; animation-delay: 0.5s; }
.curtain-fold:nth-child(3) { left: 45%; animation-delay: 1s; }
.curtain-fold:nth-child(4) { left: 65%; animation-delay: 1.5s; }
.curtain-fold:nth-child(5) { left: 85%; animation-delay: 2s; }

@keyframes curtainFade {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

.curtain-rod {
  position: absolute;
  top: 0;
  width: 120%;
  height: 8px;
  background: linear-gradient(
    90deg,
    #8b7355,
    #d4a574 20%,
    #8b7355 50%,
    #d4a574 80%,
    #8b7355
  );
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 165, 116, 0.3);
}

.curtain-left .curtain-rod {
  left: -10%;
  transform: rotate(-2deg);
}

.curtain-right .curtain-rod {
  left: -10%;
  transform: rotate(2deg);
}




/* CSS Styles */
#celebration-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -50px;
  transform-origin: center center;
  animation: confetti-fall linear forwards;
  will-change: transform, opacity;
}

.confetti-piece svg {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes confetti-fall {
  to {
    transform: translateY(var(--fall-distance)) 
               translateX(var(--drift)) 
               rotateX(var(--rotate-x)) 
               rotateY(var(--rotate-y)) 
               rotateZ(var(--rotate-z));
    opacity: 0.9;
  }
}







/* ===== REVIEW PAGE STYLES ===== */

/* Review controls bar */
.review-controls {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 15, 30, 0.35);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 184, 122, 0.3);
  border-radius: 50px;
  padding: 12px 28px;
  z-index: 100;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 0 30px rgba(180, 148, 60, 0.2);
  direction: rtl;
}

.control-btn {
  background: linear-gradient(135deg, #2a1f3d, #3d2b5c);
  border: 1px solid rgba(212, 184, 122, 0.5);
  color: #d4b87a;
  padding: 10px 28px;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Digi Craft', 'Times New Roman', serif;
  min-width: 100px;
  letter-spacing: 1px;
}

.control-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3d2b5c, #4a3568);
  border-color: #d4b87a;
  box-shadow: 0 0 20px rgba(212, 184, 122, 0.35);
  transform: translateY(-1px);
}

.control-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(212, 184, 122, 0.2);
}

.control-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(212, 184, 122, 0.15);
  background: linear-gradient(135deg, #1a1425, #241d30);
}

.progress-indicator {
  color: #d4b87a;
  font-size: 1rem;
  font-weight: bold;
  min-width: 70px;
  text-align: center;
  letter-spacing: 2px;
}

/* Student bubble - review mode (text display like hat) */
.student-bubble .bubble-text {
  padding: 12px 18px;
  color: #d5c8e8;
  font-family: 'Calibri', Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  max-height: 200px;
  overflow-y: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  word-wrap: break-word;
  white-space: pre-wrap;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: rgba(180,148,60,0.3) transparent;
}

.student-bubble .bubble-text::-webkit-scrollbar {
  width: 4px;
}

.student-bubble .bubble-text::-webkit-scrollbar-track {
  background: transparent;
}

.student-bubble .bubble-text::-webkit-scrollbar-thumb {
  background: rgba(180,148,60,0.3);
  border-radius: 10px;
}

/* Typing cursor animation for student bubble in review mode */
.student-bubble .bubble-text.typing::after {
  content: '|';
  animation: reviewCursorBlink 0.7s infinite;
  color: #d5c8e8;
  font-weight: 100;
  margin-right: 2px;
}

@keyframes reviewCursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Smooth student bubble transitions for review */
.student-bubble {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.student-bubble:not(.visible) {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.95);
}

/* Scene always visible in review mode */
.scene.review-mode {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Responsive adjustments for review controls */
@media (max-width: 600px) {
  .review-controls {
    gap: 6px;
    padding: 6px 12px;
    bottom: 18px;
    border-radius: 40px;
  }
  
  .control-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    min-width: 75px;
  }
  
  .progress-indicator {
    font-size: 0.75rem;
    min-width: 55px;
  }
  
  .student-bubble .bubble-text {
    font-size: 0.8rem;
    padding: 10px 14px;
  }
}

@media (max-width: 380px) {
  .review-controls {
    gap: 6px;
    padding: 8px 12px;
  }
  
  .control-btn {
    padding: 7px 14px;
    font-size: 0.8rem;
    min-width: 60px;
  }
}