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

    body {
      font-family: 'Nunito', sans-serif;
      background: linear-gradient(135deg, #2d5016 0%, #1a3010 100%);
      color: #fff;
      overflow-x: hidden;
      min-height: 100vh;
    }

    /* Animated Background */
    .background-animation {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 0;
    }

    .leaf {
      position: absolute;
      width: 20px;
      height: 20px;
      background: rgba(139, 195, 74, 0.3);
      border-radius: 0 100% 0 100%;
      animation: fall linear infinite;
    }

    @keyframes fall {
      0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
      }

      100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
      }
    }

    /* Preloader */
    #preloader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #1a3010 0%, #0d1f08 100%);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      transition: opacity 0.5s ease;
    }

    #preloader.fade-out {
      opacity: 0;
      pointer-events: none;
    }

    .loader-container {
      position: relative;
      width: 120px;
      height: 120px;
    }

    .loader {
      width: 100px;
      height: 100px;
      border: 8px solid rgba(139, 195, 74, 0.2);
      border-radius: 50%;
      border-top-color: #8bc34a;
      border-right-color: #cddc39;
      animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .loader-inner {
      width: 70px;
      height: 70px;
      border: 6px solid rgba(205, 220, 57, 0.2);
      border-radius: 50%;
      border-bottom-color: #cddc39;
      border-left-color: #8bc34a;
      animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    @keyframes spin {
      to {
        transform: translate(-50%, -50%) rotate(360deg);
      }
    }

    .loading-text {
      color: #8bc34a;
      margin-top: 140px;
      font-family: 'Fredoka One', cursive;
      font-size: 24px;
      animation: pulse 2s ease-in-out infinite;
      text-shadow: 0 0 20px rgba(139, 195, 74, 0.5);
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
        transform: scale(1);
      }

      50% {
        opacity: 0.7;
        transform: scale(1.05);
      }
    }

    /* Main Container */
    .game-wrapper {
      position: relative;
      z-index: 1;
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
    }

    h1 {
      font-family: 'Fredoka One', cursive;
      color: #8bc34a;
      text-align: center;
      font-size: 3.5em;
      margin-bottom: 10px;
      text-shadow:
        0 0 10px rgba(139, 195, 74, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.5);
      animation: titleFloat 3s ease-in-out infinite;
    }

    @keyframes titleFloat {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    .subtitle {
      text-align: center;
      color: #cddc39;
      font-size: 1.2em;
      margin-bottom: 30px;
      text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    #stage {
      position: relative;
      user-select: none;
      display: block;
      margin: 0 auto;
      border: 5px solid #5d4037;
      border-radius: 20px;
      overflow: hidden;
      box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(139, 195, 74, 0.1);
      background: linear-gradient(135deg, #3e2723 0%, #4e342e 100%);
      animation: stageAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes stageAppear {
      from {
        opacity: 0;
        transform: scale(0.8) rotateX(20deg);
      }

      to {
        opacity: 1;
        transform: scale(1) rotateX(0);
      }
    }

    /* Controls */
    .controls {
      position: absolute;
      top: 5px;
      right: 5px;
      z-index: 10;
    }

    select#level {
      font-family: 'Nunito', sans-serif;
      padding: 10px 15px;
      border-radius: 25px;
      border: 3px solid #8bc34a;
      background: rgba(46, 125, 50, 0.9);
      color: #fff;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;
      outline: none;
      transition: all 0.3s ease;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    select#level:hover {
      background: rgba(56, 142, 60, 1);
      transform: translateY(-2px);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }

    .button-group {
      position: absolute;
      bottom: 5px;
      right: 5px;
      display: flex;
      gap: 10px;
    }

    #reset,
    #undo,
    #sound-toggle {
      padding: 12px 20px;
      font-family: 'Nunito', sans-serif;
      border-radius: 25px;
      border: none;
      color: white;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;
      outline: none;
      transition: all 0.3s ease;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      position: relative;
      overflow: hidden;
    }

    #reset {
      background: linear-gradient(135deg, #e74c3c, #c0392b);
    }

    #undo {
      background: linear-gradient(135deg, #8bc34a, #689f38);
    }

    #sound-toggle {
      background: linear-gradient(135deg, #ff9800, #f57c00);
      padding: 12px 16px;
    }

    #reset:hover,
    #undo:hover,
    #sound-toggle:hover {
      transform: translateY(-3px) scale(1.05);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    #reset:active,
    #undo:active,
    #sound-toggle:active {
      transform: translateY(-1px) scale(1.02);
    }

    button::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      transform: translate(-50%, -50%);
      transition: width 0.5s, height 0.5s;
    }

    button:active::before {
      width: 300px;
      height: 300px;
    }

    /* Game Board */
    #stage table {
      border-spacing: 0;
      background: linear-gradient(135deg, #4a5f3e 0%, #3a4b32 100%);
      background-size: 40px 40px;
      background-image:
        radial-gradient(circle at 10px 10px, rgba(139, 195, 74, 0.1) 2px, transparent 0),
        radial-gradient(circle at 30px 30px, rgba(139, 195, 74, 0.05) 2px, transparent 0);
    }

    #stage table td {
      padding: 0;
    }

    .cell {
      width: 48px;
      height: 48px;
      box-sizing: border-box;
    }

    .transparent {
      background: rgba(62, 39, 35, 0.3);
    }

    .wall {
      position: relative;
      background: linear-gradient(135deg, #3e2723 0%, #5d4037 100%);
    }

    /* Jellies - Forest Theme */
    .jellybox {
      position: absolute;
      transition: left 200ms, top 200ms cubic-bezier(0.5, 0, 1, 0.5);
      filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    }

    .jelly {
      position: absolute;
      cursor: pointer;
      border-radius: 8px;
      box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
      transition: all 0.2s ease;
      animation: jellyBounce 2s ease-in-out infinite;
    }

    @keyframes jellyBounce {

      0%,
      100% {
        transform: scale(1) translateY(0);
      }

      50% {
        transform: scale(1.02) translateY(-2px);
      }
    }

    .jelly:hover {
      transform: scale(1.1) translateY(-5px);
      filter: brightness(1.2);
    }

    /* Forest-themed colors */
    .red {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #c23b48 100%);
      border: 2px solid #a52a2a;
    }

    .blue {
      background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 50%, #0288d1 100%);
      border: 2px solid #01579b;
    }

    .green {
      background: linear-gradient(135deg, #81c784 0%, #66bb6a 50%, #43a047 100%);
      border: 2px solid #2e7d32;
    }

    .yellow {
      background: linear-gradient(135deg, #ffd54f 0%, #ffca28 50%, #ffa000 100%);
      border: 2px solid #f57c00;
    }

    .black0,
    .black1,
    .black2,
    .black3,
    .black4,
    .black5,
    .black6,
    .black7,
    .black8,
    .black9 {
      background: linear-gradient(135deg, #6d4c41 0%, #5d4037 50%, #4e342e 100%);
      border: 2px solid #3e2723;
    }

    /* Arrow styles */
    .arrowholder {
      position: relative;
      box-sizing: border-box;
      border: 0;
    }

    .upgrower,
    .leftgrower,
    .rightgrower {
      position: absolute;
      opacity: 0.7;
    }

    .upgrower {
      left: 0;
      top: 0;
      width: 100%;
      height: 40px;
      border-top: 8px solid;
      border-bottom: 0 solid transparent;
      border-left: 0 solid transparent;
      border-right: 0 solid transparent;
    }

    .leftgrower {
      left: 0;
      top: 0;
      width: 8px;
      height: 100%;
      border-top: 0 solid transparent;
      border-bottom: 0 solid transparent;
      border-left: 8px solid;
      border-right: 0 solid transparent;
    }

    .rightgrower {
      left: 32px;
      top: 0;
      width: 8px;
      height: 100%;
      border-top: 0 solid transparent;
      border-bottom: 0 solid transparent;
      border-left: 0 solid transparent;
      border-right: 8px solid;
    }

    .downarrow,
    .uparrow,
    .leftarrow,
    .rightarrow {
      position: absolute;
      animation: arrowPulse 1.5s ease-in-out infinite;
    }

    @keyframes arrowPulse {

      0%,
      100% {
        opacity: 0.7;
      }

      50% {
        opacity: 1;
      }
    }

    .downarrow {
      left: 14px;
      top: 0;
      width: 0;
      height: 0;
      border-top-width: 16px;
      border-top-style: solid;
      border-bottom: 32px solid transparent;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
    }

    .uparrow {
      left: 14px;
      top: 0;
      width: 0;
      height: 0;
      border-top: 32px solid transparent;
      border-bottom-width: 16px;
      border-bottom-style: solid;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
    }

    .leftarrow {
      left: 0;
      top: 14px;
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-left: 32px solid transparent;
      border-right-width: 16px;
      border-right-style: solid;
    }

    .rightarrow {
      left: 0;
      top: 14px;
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-left-width: 16px;
      border-left-style: solid;
      border-right: 32px solid transparent;
    }

    /* Instructions */
    .instructions {
      background: linear-gradient(135deg, rgba(46, 125, 50, 0.9) 0%, rgba(27, 94, 32, 0.9) 100%);
      padding: 25px;
      border-radius: 20px;
      margin-top: 30px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
      border: 3px solid #8bc34a;
      animation: fadeInUp 1s ease;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .instructions h2 {
      color: #cddc39;
      margin-top: 0;
      margin-bottom: 15px;
      font-family: 'Fredoka One', cursive;
      text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .instructions ul {
      padding-left: 25px;
    }

    .instructions li {
      margin-bottom: 12px;
      line-height: 1.6;
      color: #e8f5e9;
    }

    .instructions b {
      color: #ffeb3b;
    }

    /* Completion Modal */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      z-index: 10000;
      justify-content: center;
      align-items: center;
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .modal-content {
      background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
      padding: 40px;
      border-radius: 30px;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      border: 5px solid #8bc34a;
      animation: modalPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      max-width: 400px;
    }

    @keyframes modalPop {
      0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
      }

      100% {
        transform: scale(1) rotate(0);
        opacity: 1;
      }
    }

    .modal-content h2 {
      font-family: 'Fredoka One', cursive;
      color: #ffeb3b;
      font-size: 1.5em;
      margin-bottom: 20px;
      text-shadow: 0 0 20px rgba(255, 235, 59, 0.5);
    }

    .modal-content p {
      font-size: 1.2em;
      margin-bottom: 30px;
      color: #e8f5e9;
    }

    .modal-button {
      background: linear-gradient(135deg, #ffeb3b, #fbc02d);
      color: #1b5e20;
      border: none;
      padding: 15px 40px;
      font-size: 1.2em;
      font-weight: bold;
      border-radius: 25px;
      cursor: pointer;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
      transition: all 0.3s ease;
      font-family: 'Fredoka One', cursive;
      margin-bottom: 15px;
    }

    .modal-button:hover {
      transform: scale(1.1);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }

    /* How to Play Modal Styles */
    .how-to-play {
      max-width: 600px;
      padding: 50px 40px;
    }

    .tutorial-content {
      text-align: left;
      margin-bottom: 30px;
    }

    .tutorial-step {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
      padding: 15px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 15px;
      border-left: 4px solid #ffeb3b;
      animation: slideInLeft 0.5s ease forwards;
      opacity: 0;
    }

    .tutorial-step:nth-child(1) {
      animation-delay: 0.2s;
    }

    .tutorial-step:nth-child(2) {
      animation-delay: 0.4s;
    }

    .tutorial-step:nth-child(3) {
      animation-delay: 0.6s;
    }

    .tutorial-step:nth-child(4) {
      animation-delay: 0.8s;
    }

    @keyframes slideInLeft {
      from {
        opacity: 0;
        transform: translateX(-30px);
      }

      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .step-number {
      background: linear-gradient(135deg, #ffeb3b, #fbc02d);
      color: #1b5e20;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      font-size: 1.3em;
      margin-right: 15px;
      flex-shrink: 0;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
      font-family: 'Fredoka One', cursive;
    }

    .step-text {
      color: #e8f5e9;
      line-height: 1.6;
    }

    .step-text strong {
      color: #ffeb3b;
      display: block;
      margin-bottom: 5px;
    }

    kbd {
      background: rgba(0, 0, 0, 0.3);
      padding: 3px 8px;
      border-radius: 5px;
      border: 1px solid #8bc34a;
      color: #ffeb3b;
      font-family: monospace;
      font-weight: bold;
    }

    .visual-demo {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 10px;
      padding: 20px;
      background: rgba(0, 0, 0, 0.2);
      border-radius: 15px;
      gap: 15px;
      animation: fadeIn 1s ease 1s forwards;
      opacity: 0;
    }

    .demo-jelly {
      width: 50px;
      height: 50px;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
      animation: demoBounce 1.5s ease-in-out infinite;
    }

    @keyframes demoBounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-5px);
      }
    }

    .demo-red {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #c23b48 100%);
      border: 2px solid #a52a2a;
    }

    .demo-red-merged {
      width: 100px;
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #c23b48 100%);
      border: 2px solid #a52a2a;
      animation: demoMerge 1.5s ease-in-out infinite;
    }

    @keyframes demoMerge {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.05);
      }
    }

    .demo-arrow,
    .demo-equals {
      color: #ffeb3b;
      font-size: 2em;
      font-weight: bold;
      animation: pulse 2s ease-in-out infinite;
    }

    .play-button {
      font-size: 1.5em;
      padding: 20px 50px;
      animation: buttonPulse 2s ease-in-out infinite;
    }

    @keyframes buttonPulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.05);
      }
    }

    .play-button:hover {
      animation: none;
      transform: scale(1.15) !important;
    }

    /* Game Overlay (when modal is open) */
    .game-wrapper.blurred {
      filter: blur(5px);
      pointer-events: none;
    }

    /* Responsive */
    @media (max-width: 768px) {
      h1 {
        font-size: 2.5em;
      }

      .controls {
        position: static;
        text-align: center;
        margin-bottom: 15px;
      }

      .button-group {
        position: static;
        justify-content: center;
        margin-top: 15px;
      }

      #stage {
        margin-bottom: 20px;
      }
    }