/* ============================
   Global
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Raleway", sans-serif;
  background: #0b0b0b;
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 150px;
}

/* ============================
   Header & Menu (unchanged)
============================ */
header {
  background: rgba(0, 0, 0, 0.9);
  padding: 15px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #222;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.8em;
  font-weight: 700;
  color: #ff8800;
}
.tagline {
  font-size: 0.9em;
  color: #aaa;
}
.mobile-menu {
  display: none;
  position: relative;
}
.hamburger {
  display: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #ff8800;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
}
nav ul li a {
  padding: 8px 10px;
  transition: color 0.3s ease;
  text-decoration: none;
  color: inherit;
}
nav ul li a:hover {
  color: #ff8800;
}
.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  border: 1px solid #222;
  padding: 10px;
  z-index: 1000;
  min-width: 180px;
}
.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dropdown-content ul li {
  margin-bottom: 5px;
}
.dropdown-content ul li a {
  padding: 6px 10px;
  display: block;
  transition: background 0.3s ease;
}
.dropdown-content ul li a:hover {
  background: #333;
}
@media (max-width: 768px) {
  .nav-container > nav.desktop-menu {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .hamburger {
    display: block;
  }
  .mobile-menu nav ul {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    position: static;
    width: 100%;
    border-radius: 8px;
    padding: 10px 0;
  }
  .mobile-menu nav ul.show {
    display: flex;
  }
  .top-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dropdown-content {
    position: static;
    background: #000;
    border: none;
    padding: 0;
    min-width: 0;
  }
  .dropdown-content ul {
    display: none;
  }
}

/* ============================
   Visualizer Container
============================ */
.visualizer-wrapper {
  width: 90%;
  max-width: 600px;
  background: #000;
  border: 2px solid #444;
  border-radius: 10px;
  margin: 30px auto;
  position: relative;
  overflow: hidden;
}
#visualizerContainer {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
#bgLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
#visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
}

/* ============================
   Play Overlay
============================ */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.play-overlay .controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.play-overlay button {
  background: none;
  border: none;
  font-size: 3rem;
  color: #ff8800;
  cursor: pointer;
}
.play-overlay button:hover {
  transform: scale(1.2);
}
.play-overlay input[type="range"] {
  width: 200px;
  accent-color: #ff8800;
  cursor: pointer;
}

/* ============================
   Settings Toolbar
============================ */
.settings-bar {
  width: 90%;
  max-width: 600px;
  margin: 10px auto;
  height: 40px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border-radius: 8px;
  border: 1px solid #333;
}
.settings-icon {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #ff8800;
}
.settings-icon:hover {
  transform: scale(1.2);
}

/* ============================
   Record Button Styling
============================ */
#recordButton {
  background-color: green;
  width: 25px;
  height: 25px;
  border: 1;
  border-radius: 0;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 1;
}
#recordButton.recording {
  animation: flashRed 1s infinite;
}
@keyframes flashRed {
  0% { background-color: red; }
  50% { background-color: green; }
  100% { background-color: red; }
}

/* ============================
   Slide-Over Panels
============================ */
.settings-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 10;
  padding: 20px;
  overflow-y: auto;
}
.settings-panel.active {
  transform: translateY(0);
}
.settings-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}
.settings-group label {
  margin-bottom: 5px;
  font-weight: bold;
}
.settings-group input,
.settings-group select {
  padding: 8px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  outline: none;
}
.settings-group input[type="file"],
.settings-group input[type="range"] {
  padding: 0;
}

/* Hide gradient pickers by default */
#gradientColorPickers {
  display: none;
}

/* ============================
   Mobile Adjustments
============================ */
@media (max-width: 480px) {
  body {
    padding-top: 170px;
  }
  .settings-bar,
  .visualizer-wrapper {
    width: 95%;
  }
  .settings-panel {
    height: 60%;
  }
}

/* ============================
   File Upload Button (Add Music)
============================ */
.upload-music-container {
  display: flex;
  justify-content: center;
  margin: 20px auto;
}
#upload {
  display: none;
}
.custom-file-upload {
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  color: #ff8800;
  transition: background 0.3s ease;
}
.custom-file-upload:hover {
  background: #333;
}

/* ============================
   Toast Notification
============================ */
#errorToast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  max-width: 300px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}
#errorToast.show {
  opacity: 1;
  pointer-events: auto;
}
.hidden {
  display: none;
}

/* ============================
   Download Recording Link
============================ */
#downloadLink {
  display: block;
  text-align: center;
  margin: 10px auto;
  color: #ff8800;
  text-decoration: underline;
  font-size: 16px;
}
