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

body {
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Outfit', sans-serif;
}

#scene-container {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
}

#title-bar {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
  pointer-events: none;
}

.title-main {
  font-family: 'Pirata One', cursive;
  font-size: 2.2rem;
  color: #ffeedd;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 40px rgba(255,170,80,0.3);
  line-height: 1.1;
}

.title-sub {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,225,190,0.7);
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  margin-top: 4px;
}

#control-panel {
  position: fixed;
  bottom: 60px;
  right: 20px;
  z-index: 10;
  background: rgba(10,10,30,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.ctrl-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #ffeedd;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ctrl-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,170,80,0.4);
}

.ctrl-btn.active {
  background: rgba(255,140,50,0.25);
  border-color: rgba(255,170,80,0.6);
  color: #ffcc88;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-group label {
  font-size: 0.78rem;
  color: rgba(255,225,190,0.7);
  font-weight: 400;
}

.slider-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff9944;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
}

.slider-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff9944;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(10,10,30,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.controls-hint {
  font-size: 0.75rem;
  color: rgba(255,225,190,0.45);
  font-weight: 300;
}

.remix-link {
  font-size: 0.78rem;
  color: rgba(255,170,80,0.7);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.remix-link:hover {
  color: #ffaa55;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 100;
  background: rgba(10,10,30,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,170,80,0.4);
  border-radius: 16px;
  padding: 20px 32px;
  color: #ffeedd;
  font-family: 'Pirata One', cursive;
  font-size: 1.4rem;
  text-align: center;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast.hidden {
  display: block;
}

@media (max-width: 640px) {
  .title-main {
    font-size: 1.5rem;
  }
  .title-sub {
    font-size: 0.8rem;
  }
  #control-panel {
    bottom: 55px;
    right: 10px;
    left: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: auto;
    padding: 10px;
    gap: 6px;
  }
  .ctrl-btn {
    flex: 1;
    min-width: 70px;
    font-size: 0.72rem;
    padding: 8px 8px;
    text-align: center;
  }
  .slider-group {
    flex: 1 1 100%;
  }
  .controls-hint {
    font-size: 0.65rem;
  }
}