@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

:root {
  --primary: #6200ee;
  --primary-variant: #3700b3;
  --secondary: #03dac6;
  --background: #f8f9fa;
  --surface: rgba(255, 255, 255, 0.85);
  --on-surface: #000000de;
  --error: #b00020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121212;
    --surface: rgba(255, 255, 255, 0.08);
    --on-surface: #ffffffde;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container { width: 100%; max-width: 560px; }

.header {
  text-align: center;
  color: white;
  margin-bottom: 24px;
}
.header h1 { font-size: 3rem; font-weight: 700; }
.header p { opacity: 0.9; font-size: 1.1rem; }

.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.2);
}

.controls {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-weight: 500;
  font-size: 0.95rem;
}

.control-group input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,0.1);
  outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

select {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: rgba(0,0,0,0.08);
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  font-size: 1.1rem;
}

.btn-secondary {
  background: var(--secondary);
  color: #000;
}

.btn-outline {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-icon {
  font-size: 1.5rem;
  padding: 12px 16px;
}

button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
button:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.preview {
  height: 200px;
  background: rgba(0,0,0,0.1);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

#visualizer {
  width: 100%;
  height: 100%;
}

#status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  color: rgba(0,0,0,0.6);
  pointer-events: none;
}

footer {
  text-align: center;
  margin-top: 32px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}