/* css/style.css */
:root {
  --bg-color: #0f0f13;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.15);
  --primary-accent: #b8a6ff;
  --txt-color: #ffffff;
  --txt-muted: #aaaaaa;
  
  --radius-lg: 24px;
  --radius-sm: 12px;
  --font-main: 'Poppins', sans-serif;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ------ General Reset ------ */
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--txt-color);
  font-family: var(--font-main);
  overflow: hidden;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
}

/* ------ The Glass Panel (Header) ------ */
header#ui-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 300px;
  z-index: 10;
  
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--transition);
}

/* Typography */
h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #b8a6ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#status {
  font-size: 0.75rem;
  color: var(--txt-muted);
  margin-top: 4px;
}

.sub-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--txt-muted);
  margin-bottom: 8px;
}

/* ------ Controls Styling ------ */
.control-group {
  margin-bottom: 10px;
}

.row-inputs {
  display: flex;
  gap: 10px;
}

/* Custom Select Dropdowns */
.select-wrapper {
  position: relative;
  flex-grow: 1;
  background: var(--glass-hover);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.select-wrapper:hover {
  background: rgba(255,255,255,0.2);
}

select {
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  color: var(--txt-color);
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
}

select:focus {
  outline: none;
}

select option {
  background: #222;
  color: #fff;
}

.arrow-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--txt-muted);
  pointer-events: none;
}

/* File Upload Button */
input[type="file"] {
  display: none;
}

.icon-btn-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--glass-hover);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--primary-accent);
}

.icon-btn-label:hover {
  background: var(--primary-accent);
  color: #000;
}

/* Range Slider */
.range-wrapper {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  gap: 5px;
}

.range-wrapper label {
  font-size: 0.8rem;
  color: var(--txt-muted);
}

input[type=range] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-accent);
  cursor: pointer;
  margin-top: -6px;
  box-shadow: 0 0 10px var(--primary-accent);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

/* Color Picker */
.color-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.color-wrapper label {
  font-size: 0.8rem;
  color: var(--txt-muted);
}

.color-input-mock {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  cursor: pointer;
}

input[type="color"] {
  border: none;
  width: 150%; 
  height: 150%;
  transform: translate(-25%, -25%);
  cursor: pointer;
  background: none;
}

/* ------ Playback Buttons ------ */
#btn-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.circle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary-accent);
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.circle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(184, 166, 255, 0.4);
}

.circle-btn.secondary {
  background: transparent;
  border: 2px solid var(--glass-border);
  color: #fff;
  width: 50px;
  height: 50px;
}

.circle-btn.secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

/* ------ Watermark Style ------ */
#watermark {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
}

#watermark a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  
  color: var(--txt-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

#watermark a:hover {
  color: var(--primary-accent);
  background: var(--glass-hover);
  border-color: var(--primary-accent);
  transform: translateY(-2px);
}

/* ------ Mobile Responsive ------ */
@media (max-width: 768px) {
  header#ui-panel {
    top: auto;
    bottom: 0;
    left: auto;
    right: auto;
    
    width: calc(100vw - 48px);
    height: auto;
    max-height: 50vh; 
    border-radius: 24px 24px 0 0;
    
    border-left: none;
    border-right: none;
    border-bottom: none;
    
    flex-direction: column;
    gap: 15px;
    padding: 20px 24px 20px 24px;
    
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .logo-area {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    order: 0;
  }
  
  h1 {
    font-size: 1.25rem;
  }

  #btn-menu {
    order: 1; 
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 20px;
    border-top: none;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .circle-btn {
    width: 56px; 
    height: 56px;
  }

  .controls-grid {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  select {
    padding: 14px 12px;
    font-size: 1rem;
  }

  input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    margin-top: -10px;
  }
  
  .color-input-mock {
    width: 40px;
    height: 40px;
  }

  #watermark {
    bottom: auto;
    top: 20px;
    right: 20px;
  }
}
