*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Strips away any scrollbars */
    font-family: "Montserrat", sans-serif;
}

body {
    background: black;
}

/* Pin the video to the screen edges */
#bg-video {
    position: fixed;
    top: 40px;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover; /* Crops and stretches perfectly without skewing ratio */
    z-index: -1;       /* Sends the video behind all other elements */
}

#sky {
    height: 100%;
    top: 80px;
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
}
.toggle-btn,
.toggle-btn2 {
    position: fixed;
    bottom: 20px;
    left: 80px;
    z-index: 10;
    border: none;
    background: rgba(255, 255, 255, 0.155);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
  }

  .toggle-btn img,
  .toggle-btn2 img {
    display: block;
    width: 20px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.5;
  }
  
  .toggle-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.155);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.785);
  }
  
  .toggle-container.open {
    max-height: 500px;
  }

  .toggle-container2 {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9;
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.155);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.785);
    transition: max-height 0.3s ease;
  }

  .toggle-container2.open {
    max-height: 800px;
    color: rgba(255, 255, 255, 0.785);
    opacity: 1;
  }

  .info-content {
    padding: 10px 14px;
    line-height: 1.5;
  }
  
  .toggle-btn2 {
    left: 20px;
  }

  .audio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 14px;
  }
  
  .icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
  }
  
  .audio-btn {
    border: none;
    font-size: 16px;
    background: none;
    color: white;
  }

  .volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .volume-slider {
  width: 100px;
  appearance: none;
  background: rgba(23, 23, 23, 0.25);
  border-radius: 999px;
  height: 4px;
  cursor: pointer;
}

  .volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
  }
  
  .volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    margin-top: -5px;
  }

/* input */
#input-area {
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 24px 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: fixed;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
}
  
#thought-input {
    background: rgba(255, 255, 255, 0.155);
    border: none;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    padding: 8px 24px;
    width: 100%;
    outline: none;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
    backdrop-filter: blur(8px);
}

#thought-input::placeholder {
    color: rgba(255, 255, 255, 0.334);
  }
  

#release-btn {
    background: rgba(255, 255, 255, 0.155);
    border: none;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.334);
    font-size: 14px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    backdrop-filter: blur(8px);
    width: 120px;
}

#release-btn:hover {
    background: rgba(255,255,255,0.4);
}

  /* Flying words layer */
  #word-stage {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
  }
 
  .flying-word {
    position: absolute;
    font-family: 'Lora', serif;
    font-size: clamp(14px, 2vw, 20px);
    color: #ffd98a;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    text-shadow: 0 0 12px rgba(255,160,40,0.8), 0 0 30px rgba(255,100,10,0.4);
  }

  @media (max-width: 600px) {
    #bg-video {
      top: 50px;
      height: 100dvh;
      object-fit: cover;
      object-position: 46% center;
    }
  
    #sky {
      top: 0;
      height: 100dvh;
    }
  
    .toggle-btn,
    .toggle-btn2 {
      width: 46px;
      height: 46px;
      bottom: 76px;
    }
  
    .toggle-btn2 {
      top: 16px;
    }
  
    .toggle-btn {
      top: 16px;
    }
  
    .toggle-container {
      left: 16px;
      right: auto;
      top: 80px;
      width: fit-content;
      max-width: 180px;
    }
  
    .toggle-container.open {
      max-height: max-content;
      overflow-y: auto;
    }

    .toggle-container2 {
      left: 16px;
      right: 16px;
      top: 80px;
      width: auto;
    }

    .toggle-container2.open {
      max-height: max-content;
      overflow-y: auto;
    }
  
    .info-content {
      font-size: 13px;
      padding: 12px 14px;
    }
  
    .audio-row {
      padding: 10px 14px;
      gap: 8px;
    }
  
    .volume-slider {
      width: 90px;
    }
  
    #input-area {
      bottom: 12px;
      padding: 0 16px;
      gap: 8px;
      max-width: none;
    }
  
    #thought-input {
      font-size: 13px;
      padding: 10px 16px;
      text-align: center;
    }
  
    #release-btn {
      width: auto;
      min-width: 82px;
      font-size: 13px;
      padding: 10px 14px;
    }
  }