  <style>
    body {
      margin: 0;
      font-family: 'Comic Sans MS', 'Segoe UI', 'Roboto', Arial, sans-serif;
      background: linear-gradient(120deg, #e0f7fa 0%, #b2ebf2 100%);
      min-height: 100vh;
      overflow-x: hidden;
      color: #333;
    }
    /* Interactive Animated Heading */
    .main-heading {
      text-align: center;
      font-size: clamp(2rem, 6vw, 3rem);
      font-weight: 700;
      margin: 1rem 0;
      background-image: linear-gradient(to right, #2c3e50, #3a6ea5, #2c3e50);
      color: transparent;
      background-clip: text;
      -webkit-background-clip: text;
      background-size: 200%;
      animation: animated-gradient 3s infinite alternate;
      text-shadow: 0 2px 8px rgba(44,62,80,0.1);
      letter-spacing: 1px;
    }
    @keyframes animated-gradient {
      to { background-position: 200%; }
    }
    .lab-container {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 0.5em;
      padding: 0.5em;
      flex-wrap: wrap;
      min-height: 70vh;
    }
    .side-panel {
      width: 16vw;
      min-width: 160px;
      background: rgba(255,255,255,0.85);
      border-radius: 16px;
      box-shadow: 0 8px 32px rgba(44,62,80,0.13);
      padding: 1em;
      display: flex;
      flex-direction: column;
      align-items: center;
      backdrop-filter: blur(3px);
    }
    .side-panel h2 {
      font-size: 1.3em;
      letter-spacing: 1px;
      margin-bottom: 0.7em;
      color: #3a6ea5;
      text-shadow: 0 2px 8px #b0c4de33;
    }
    .btn-list {
      display: flex;
      flex-direction: column;
      gap: 0.7em;
      width: 100%;
    }
    .metal-btn, .acid-btn {
      font-size: 0.95em;
      padding: 0.6em 0.9em;
      border: none;
      border-radius: 1.4em;
      cursor: pointer;
      background: linear-gradient(90deg, #b6e0fe 0%, #cfd9df 100%);
      color: #2d3e50;
      font-weight: 600;
      box-shadow: 0 2px 8px #b0c4de55;
      transition: transform 0.15s, box-shadow 0.2s, background 0.4s;
      position: relative;
      overflow: hidden;
      outline: none;
    }
    .metal-btn:hover {
      background: linear-gradient(90deg, #ffe259 0%, #ffa751 100%);
      color: #7f4f24;
      transform: scale(1.08) rotate(-2deg);
      box-shadow: 0 4px 18px #f9d29d88;
    }
    .acid-btn:hover {
      background: linear-gradient(90deg, #ffdde1 0%, #ee9ca7 100%);
      color: #b91372;
      transform: scale(1.08) rotate(2deg);
      box-shadow: 0 4px 18px #ee9ca788;
    }
    .center-panel {
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      min-width: 260px;
      margin: 0 0.5em;
    }
    /* Realistic 3D Beaker */
    .beaker-scene {
      width: 220px;
      height: 340px;
      position: relative;
      perspective: 800px;
      margin-bottom: 1em;
    }
    .beaker {
      width: 180px;
      height: 240px;
      background: radial-gradient(circle at 40% 60%, rgba(224,247,250,0.8), rgba(178,235,242,0.8));
      border-radius: 0 0 80px 80px / 0 0 50px 50px;
      border: 8px solid rgba(176,190,197,0.9);
      border-top: none;
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%) rotateX(15deg) rotateY(-10deg);
      box-shadow: 
        0 10px 30px rgba(176,196,222,0.4),
        inset 0 -20px 40px rgba(255,255,255,0.3);
      overflow: hidden;
      z-index: 1;
    }
    .beaker-neck {
      width: 100px;
      height: 40px;
      background: rgba(224,247,250,0.8);
      border: 8px solid rgba(176,190,197,0.9);
      border-radius: 50px 50px 0 0 / 30px 30px 0 0;
      border-bottom: none;
      position: absolute;
      top: -40px;
      left: 50%;
      transform: translateX(-50%) rotateX(15deg) rotateY(-10deg);
      z-index: 2;
    }
    .liquid {
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 70%;
      background: linear-gradient(135deg, #48c6ef 0%, #6f86d6 100%);
      border-radius: 0 0 80px 80px / 0 0 50px 50px;
      transition: background 0.5s;
      z-index: 1;
      overflow: hidden;
      animation: liquidWaves 2.2s infinite linear alternate, liquidBubble 4s infinite ease-in-out;
    }
    @keyframes liquidWaves {
      0% { border-radius: 0 0 80px 80px / 0 0 50px 50px; }
      100% { border-radius: 0 0 90px 90px / 0 0 60px 60px; }
    }
    @keyframes liquidBubble {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-6px); }
    }
    .metal-piece {
      width: 40px;
      height: 16px;
      background: linear-gradient(90deg, #ffd700 0%, #b8860b 100%);
      border-radius: 8px 8px 12px 12px;
      box-shadow: 0 2px 8px #b8860b55;
      position: absolute;
      top: -60px;
      left: 50%;
      transform: translateX(-50%) scale(0.9) rotate(-8deg);
      opacity: 0;
      z-index: 10;
      transition: background 0.3s;
      animation: none;
    }
    .metal-piece.show {
      animation: dropMetal 1.2s cubic-bezier(.7,1.5,.5,1) forwards;
      opacity: 1;
    }
    @keyframes dropMetal {
      0% { top: -60px; opacity: 0; }
      60% { top: 70px; opacity: 1; }
      80% { top: 90px; }
      100% { top: 110px; }
    }
    .acid-drop {
      width: 24px;
      height: 24px;
      background: linear-gradient(135deg, #ff80ab 0%, #ffb347 100%);
      border-radius: 50%;
      box-shadow: 0 2px 12px #ffb34755;
      position: absolute;
      top: -50px;
      left: 50%;
      transform: translateX(-50%) scale(1);
      opacity: 0;
      z-index: 10;
      animation: none;
    }
    .acid-drop.show {
      animation: dropAcid 1.1s cubic-bezier(.7,1.5,.5,1) forwards;
      opacity: 1;
    }
    @keyframes dropAcid {
      0% { top: -50px; opacity: 0; }
      70% { top: 60px; opacity: 1; }
      100% { top: 90px; }
    }
    .reaction-box {
      width: 60vw;
      min-height: 120px;
      margin: 1em auto;
      background: linear-gradient(90deg, #e0c3fc 0%, #8ec5fc 100%);
      border-radius: 18px;
      box-shadow: 0 2px 16px #c3bef755;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 1.2em;
      color: #333;
      font-weight: 600;
      letter-spacing: 1px;
      opacity: 0;
      transition: opacity 0.5s, background 0.4s;
      padding: 1em 2em;
      text-align: center;
    }
    .reaction-box.show {
      opacity: 1;
      animation: fadeInReaction 1s, bounce 0.5s;
    }
    @keyframes fadeInReaction {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes bounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }
    .start-over-btn {
      background: linear-gradient(90deg, #ff9a9e 0%, #f6d365 100%);
      color: #fff;
      border: none;
      border-radius: 1.7em;
      padding: 0.7em 1.6em;
      font-size: 1em;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 2px 8px #ff9a9e55;
      margin-top: 0.8em;
      transition: transform 0.2s, box-shadow 0.2s;
      display: none;
      animation: pulse 1.5s infinite;
    }
    .start-over-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 12px #ff9a9e88;
    }
    .instruction-box {
      background: rgba(255,255,255,0.9);
      border-radius: 16px;
      padding: 1em;
      margin-bottom: 1em;
      text-align: center;
      font-size: 1.1em;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      width: 80%;
      max-width: 500px;
    }
    .bubble {
      background: #fff;
      border-radius: 16px;
      padding: 0.8em;
      margin: 0.5em 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      font-size: 1em;
      text-align: center;
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.02); }
      100% { transform: scale(1); }
    }
    .reaction-name {
      font-size: 1.4em;
      font-weight: bold;
      color: #2c3e50;
      margin-bottom: 0.5em;
      text-shadow: 0 1px 4px rgba(44,62,80,0.1);
      animation: pulse 2s infinite;
    }
    .reaction-description {
      font-size: 0.95em;
      color: #555;
      margin-top: 0.5em;
      font-style: italic;
    }
    @media (max-width: 900px) {
      .lab-container { flex-direction: column; align-items: center; }
      .side-panel { width: 80vw; margin-bottom: 1em; }
      .reaction-box { width: 90vw; }
    }
  </style>