/* 
   Goethe A1 Audio Synthesizer - Modern CSS Design System
   Aesthetics: Sleek Dark Mode, Glassmorphism, Neon Accents, Micro-animations
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark-glow: radial-gradient(circle at 50% 50%, #15122e 0%, #080712 100%);
  --bg-card: rgba(22, 20, 42, 0.6);
  --bg-input: rgba(10, 8, 22, 0.75);
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(168, 85, 247, 0.55);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-purple: #a855f7;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --gradient-neon: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-indigo) 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  
  --shadow-neon: 0 0 25px rgba(168, 85, 247, 0.35);
  --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.45);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
}

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark-glow);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 8, 20, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

/* Layout Containers */
.app-container {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Header Design */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 24px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: var(--gradient-neon);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.badge {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

/* Form Controls & Styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

textarea {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  min-height: 280px;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

select, input[type="number"], input[type="text"] {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  width: 100%;
  transition: all 0.3s ease;
}

select:focus, input[type="number"]:focus, input[type="text"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.12);
}

/* Preset & Toolbar Buttons */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -8px;
  margin-bottom: 4px;
}

.btn-tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.btn-tool.clear {
  margin-left: auto;
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.05);
}

.btn-tool.clear:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fff;
}

/* Preset Template Selectors */
.preset-selector {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Glowing Primary Actions */
.btn-primary {
  background: var(--gradient-neon);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.13) 77%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-30deg);
  transition: 0.75s;
  opacity: 0;
}

.btn-primary:hover::after {
  left: 120%;
  opacity: 1;
}

/* Status & Processing States */
.status-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-glass);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
  transition: all 0.3s ease;
}

.status-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(168, 85, 247, 0.15);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.status-message {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 250px;
}

/* Audio Player and Download Styling */
.result-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.audio-preview {
  width: 100%;
  background: var(--bg-input);
  border-radius: 30px;
  outline: none;
  height: 54px;
}

.audio-preview::-webkit-media-controls-enclosure {
  background-color: rgba(20, 18, 38, 0.95);
  border-radius: 30px;
  border: 1px solid var(--border-glass);
}

.audio-preview::-webkit-media-controls-panel {
  background: transparent;
}

.audio-preview::-webkit-media-controls-current-time-display,
.audio-preview::-webkit-media-controls-time-remaining-display {
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.btn-success {
  background: var(--gradient-success);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-success:active {
  transform: translateY(1px);
}

/* Syntax Guide Reference Card */
.syntax-guide {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
}

.syntax-guide h3 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.syntax-guide code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c084fc;
}

.syntax-guide ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.syntax-guide li {
  position: relative;
  padding-left: 14px;
}

.syntax-guide li::before {
  content: '•';
  color: var(--accent-purple);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  margin-top: auto;
}

footer a {
  color: var(--accent-purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}
