/* ===== CSS VARIABLES & THEME SYSTEM ===== */
:root {
  /* Dark Theme (Default) */
  --primary-bg: #0A0A0D;
  --secondary-bg: #1C1C24;
  --card-bg: #2A2A36;
  --accent-primary: #00F5FF;
  --accent-secondary: #FF3366;
  --accent-tertiary: #7B68EE;
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8C5;
  --border-color: #404058;
  --hover-bg: #363649;
  --success: #52FF52;
  --warning: #FFB452;
  --error: #FF5252;
  --vol-fill: lightgreen;
  --seek-fill: lightgreen;
  --neutral-fill: var(--secondary-bg);
  --nav-bg: rgba(26, 26, 36, 0.95);
  --gradient-primary: linear-gradient(135deg, var(--primary-bg), #1A1A24);
  --gradient-card: linear-gradient(135deg, var(--card-bg), rgba(42, 42, 54, 0.8));
  --shadow-light: rgba(0, 245, 255, 0.15);
  --shadow-medium: rgba(0, 245, 255, 0.25);
}

/* Light Theme */
[data-theme="light"] {
  --primary-bg: #F5F5F7;
  --secondary-bg: #FFFFFF;
  --card-bg: #FAFAFA;
  --accent-primary: #007AFF;
  --accent-secondary: #FF3B30;
  --accent-tertiary: #5856D6;
  --text-primary: #1D1D1F;
  --text-secondary: #86868B;
  --border-color: #D2D2D7;
  --hover-bg: #F2F2F7;
  --success: #30D158;
  --warning: #FF9500;
  --error: #FF3B30;
  --vol-fill: #30D158;
  --seek-fill: #30D158;
  --neutral-fill: #E5E5EA;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --gradient-primary: linear-gradient(135deg, var(--primary-bg), #E5E5EA);
  --gradient-card: linear-gradient(135deg, var(--card-bg), rgba(250, 250, 250, 0.8));
  --shadow-light: rgba(0, 122, 255, 0.15);
  --shadow-medium: rgba(0, 122, 255, 0.25);
}

/* ===== CONTROLS SECTION ===== */
.controls-section {
  margin-bottom: 32px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.controls-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.controls-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.control-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.theme-switcher, .lang-switcher {
  display: flex;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  transition: all 0.2s ease;
}

.theme-switcher:hover, .lang-switcher:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px var(--shadow-light);
}

.switch-option {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  justify-content: center;
  background: transparent;
}

.switch-option:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.switch-option.active {
  background: var(--accent-primary);
  color: var(--primary-bg);
  transform: scale(1.02);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.switch-option i {
  font-size: 16px;
  color: inherit;
}

/* ===== MAIN CONTENT STYLES ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--gradient-primary);
  color: var(--text-primary);
  margin: 0;
  transition: all 0.3s ease;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== PROMOTION SECTION ===== */
.promo-section {
  margin-top: 20px;
  margin-bottom: 32px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.promo-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  border-radius: 16px 16px 0 0;
}

.promo-header {
  text-align: center;
  margin-bottom: 32px;
}

.promo-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px 0;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.promo-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.promo-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow-medium);
  border-color: var(--accent-primary);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 24px;
  color: var(--primary-bg);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.promo-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-primary);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.header h1, .header h2 {
  font-size: 24px;
  margin: 0;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

/* ===== BUTTONS & CONTROLS ===== */
.upload {
  margin-bottom: 16px;
}

.upload input[type=file] {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--secondary-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  justify-content: center;
}

.btn:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-light);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(45deg, var(--accent-tertiary), var(--accent-secondary));
  color: white;
  font-weight: 600;
}

.btn.primary:hover {
  background: linear-gradient(45deg, var(--accent-secondary), var(--accent-tertiary));
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.btn i {
  color: inherit !important;
  font-size: 16px;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
  justify-content: center;
}

.ctrl {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ctrl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ctrl:hover {
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-light);
}

.ctrl.active {
  background: var(--accent-primary);
  color: var(--primary-bg);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.ctrl.active::before {
  opacity: 1;
}

.ctrl i {
  color: inherit !important;
  font-size: 18px;
  z-index: 1;
  position: relative;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

/* ===== RANGE INPUTS ===== */
input[type=range] {
  --range-thumb: var(--accent-primary);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  background: var(--neutral-fill);
  transition: all 0.2s ease;
  cursor: pointer;
}

input[type=range]:hover {
  background: var(--border-color);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--range-thumb);
  border: 2px solid var(--card-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

input[type=range]::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

input[type=range]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--range-thumb);
  border: 2px solid var(--card-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type=range]::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: var(--neutral-fill);
}

input[type=range]::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--neutral-fill);
}

#seek.playing::-moz-range-progress {
  background: var(--seek-fill);
}

#vol::-moz-range-progress {
  background: var(--vol-fill);
}

/* ===== TEXT & LABELS ===== */
.time {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: center;
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
}

small {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== PLAYLIST ===== */
.playlist {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  border-radius: 8px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
}

.playlist li {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.playlist li:last-child {
  border-bottom: none;
}

.playlist li:hover {
  background: var(--hover-bg);
  padding-left: 20px;
}

.playlist li.active {
  background: var(--accent-primary);
  color: var(--primary-bg);
  font-weight: 600;
}

.playlist li.active::before {
  content: '▶';
  font-size: 12px;
}

/* ===== EQUALIZER ===== */
.eq {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  overflow-x: auto;
  padding: 16px 0;
  background: var(--secondary-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  justify-content: center;
}

.eq .col {
  min-width: 40px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eq .col label {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-top: 8px;
  font-weight: 500;
}

.eq .col input[type=range] {
  writing-mode: vertical-lr;
  direction: rtl;
  height: 140px;
  width: 8px;
  margin: 8px 0;
}

/* ===== METERS & VISUALIZATIONS ===== */
.meter {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meter .bar {
  height: 16px;
  background: var(--secondary-bg);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.meter .bar > .fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.1s ease;
  border-radius: 7px;
}

canvas {
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* ===== NOTIFICATIONS ===== */
#notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  padding: 16px 20px;
  border-radius: 12px;
  display: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1500;
  max-width: 300px;
  box-shadow: 0 8px 25px var(--shadow-medium);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#notification.show {
  transform: translateX(0);
}

/* ===== PROMO CARD ===== */
.promo-card .hint {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(127,209,255,.12), rgba(82,255,82,.08));
  border: 1px solid var(--border-color);
  margin-top: 16px;
}

.promo-card .hint i {
  color: var(--accent-primary) !important;
  margin-top: 2px;
  font-size: 16px;
}

.promo-card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.promo-card .meta .chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12px;
  background: var(--secondary-bg);
  font-weight: 500;
}

/* ===== PRESET BUTTONS ===== */
.eq-presets, .comp-presets {
  margin-top: 16px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  position: relative !important;
  z-index: 10 !important;
}

.eq-preset-btn, .comp-preset-btn {
  padding: 6px 12px !important;
  font-size: 11px !important;
  min-width: auto !important;
  display: inline-flex !important;
  transition: all 0.2s ease !important;
  border-radius: 6px !important;
}

.eq-preset-btn.active, .comp-preset-btn.active {
  background: var(--accent-primary) !important;
  color: var(--primary-bg) !important;
  border-color: var(--accent-primary) !important;
  transform: scale(1.05);
}

.eq-preset-btn:hover, .comp-preset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-light);
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .promo-features {
    grid-template-columns: 1fr;
  }
  
  .promo-stats {
    gap: 20px;
  }
  
  .controls-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 16px;
  }
  
  .promo-section {
    padding: 20px;
    margin-top: 16px;
  }
  
  .controls-section {
    padding: 20px;
  }
  
  .promo-title {
    font-size: 24px;
  }
  
  .promo-subtitle {
    font-size: 14px;
  }
  
  .controls-grid {
    gap: 12px;
  }
  
  .switch-option {
    padding: 10px 14px;
    min-width: 80px;
    font-size: 13px;
  }
  
  .control-btn {
    padding: 10px 20px;
    min-width: 100px;
    font-size: 13px;
  }
  
  .controls {
    gap: 8px;
  }
  
  .ctrl {
    width: 44px;
    height: 44px;
  }
  
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .card {
    padding: 16px;
  }
  
  .row {
    gap: 8px;
  }
  
  .eq {
    gap: 6px;
    padding: 12px;
  }
  
  .eq .col {
    min-width: 32px;
  }
  
  .eq .col input[type=range] {
    height: 120px;
    width: 6px;
  }
}

@media (max-width: 400px) {
  .promo-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .feature-card {
    padding: 16px;
  }
  
  .controls {
    justify-content: space-between;
  }
  
  .ctrl {
    width: 40px;
    height: 40px;
  }
  
  .controls-grid {
    grid-template-columns: 1fr;
  }
  
  .switch-option {
    min-width: 70px;
    padding: 8px 12px;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card {
  animation: fadeInUp 0.4s ease-out forwards;
}

.card:nth-child(even) {
  animation-delay: 0.1s;
}

.feature-card {
  animation: slideInRight 0.5s ease-out forwards;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }

/* ===== THEME TRANSITIONS ===== */
* {
  transition: background-color 0.3s ease, 
              border-color 0.3s ease, 
              color 0.3s ease,
              box-shadow 0.3s ease !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #808080;
    --text-secondary: #E0E0E0;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .top-nav,
  .faq-modal,
  #notification {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
  
  .promo-section {
    margin-top: 0;
  }
}
/* ===== FIX für Switcher-Buttons ===== */
.switch-option span {
  white-space: nowrap; /* Verhindert, dass der Text umbricht und das Layout stört */
}