/* Global reset */
body {
  margin: 0;
  overflow: hidden; /* Prevents scrollbars */
  background: #fee1a7; /* Match background to your calm gif for seamless look */
  font-family: sans-serif;
}

#jufufu-container {
  position: absolute;
  width: 100vw;
  height: 100vh;
}

#ytIcon {
  width: 50px;
  height: auto;
  cursor: pointer; /* Show pointer on hover */
}

/* This is your animated image */
#jufufu {
  position: absolute;
  width: 150px;
  height: auto;
  pointer-events: auto; /* Allow click events */
  user-select: none;
  cursor: pointer;      /* Show pointer on hover */
}

/* Style for the Chaos toggle button */
#chaos-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px;
  background: #ffb3c1;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.corner-hitbox {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 0, 0, 0.2);
  z-index: 999;
}

#tl { top: 0; left: 0; }
#tr { top: 0; right: 0; }
#bl { bottom: 0; left: 0; }
#br { bottom: 0; right: 0; }

#volume-control {
  position: fixed;
  bottom: 60px;
  left: 20px;
  z-index: 999;
  display: flex;
  align-items: center; /* Center children vertically */
  gap: 18px;           /* More space between icon and sliders */
  background: rgba(255, 255, 255, 0.85);
  padding: 12px 18px;  /* Slightly larger for bigger icon */
  border-radius: 14px;
  box-shadow: 0 2px 12px #0002;
  user-select: none;
  transition: box-shadow 0.2s;
  animation: popIn 0.5s cubic-bezier(.5,1.8,.5,1) 0.2s 1;
}

#volume-control:hover {
  box-shadow: 0 4px 18px #0003;
}

#volume-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  object-fit: contain;
  cursor: pointer;
  transition: filter 0.2s;
  display: block;
  margin: 0 auto; /* Center horizontally if needed */
}

#volume-icon:active {
  filter: brightness(0.8);
}

/* New stacked sliders container */
#volume-sliders {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-family: monospace;
  color: #444;
}

#volume-sliders label {
  margin-bottom: -2px;
}

/* BGM & SFX sliders styling */
#volume-slider-bgm,
#volume-slider-sfx {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 140px;
  background: linear-gradient(90deg, #ffb3c1 0%, #fee1a7 100%);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 4px #0001;
}

#volume-slider-bgm::-webkit-slider-thumb,
#volume-slider-sfx::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: url("img/jufuSlider.png") no-repeat center center;
  background-size: contain;
  border: none;
  margin-top: -10px;
}

#volume-slider-bgm::-moz-range-thumb,
#volume-slider-sfx::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: url("img/jufuSlider.png") no-repeat center center;
  background-size: contain;
  border: none;
}

#volume-slider-bgm::-ms-thumb,
#volume-slider-sfx::-ms-thumb {
  width: 32px;
  height: 32px;
  background: url("img/jufuSlider.png") no-repeat center center;
  background-size: contain;
  border: none;
}

/* Remove outline on focus for a cleaner look */
#volume-slider-bgm:focus,
#volume-slider-sfx:focus {
  outline: none;
}

/* Hide the default track for Firefox */
#volume-slider-bgm::-moz-range-track,
#volume-slider-sfx::-moz-range-track {
  background: transparent;
}

@keyframes popIn {
  0% { transform: scale(0.7) translateY(30px); opacity: 0; }
  80% { transform: scale(1.08) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

#credits-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1001;
  padding: 8px 18px;
  background: #fffbe9;
  color: #b36a5e;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px #0002;
  transition: background 0.2s;
}

#credits-btn:hover {
  background: #ffe1b3;
}

#credits-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#credits-content {
  background: #fffbe9;
  color: #b36a5e;
  padding: 32px 40px;
  border-radius: 18px;
  box-shadow: 0 4px 32px #0003;
  font-family: monospace;
  font-size: 1.1rem;
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  text-align: center;
}

#dev-disable-overlays {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3000;
  opacity: 0.3;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
  pointer-events: auto;
}

#dev-disable-overlays:hover {
  opacity: 0.7;
}
