@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --color-bg: #1a1f2b;
  --color-sidebar: rgba(30, 38, 50, 0.95);
  --color-window: rgba(40, 48, 60, 0.95);
  --color-window-header: rgba(50, 58, 70, 0.95);
  --color-primary: #00adb5;
  --color-primary-hover: #00fff5;
  --color-text: #eee;
  --color-text-muted: #9ca3af;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-hover: rgba(255, 255, 255, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
  --transition: all 0.2s ease;
  --neon-color: #ff00ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* Entfernt alle Scrollbars */
}

body {
  background: var(--color-bg);
  font-family: 'Inter', sans-serif;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  overflow: hidden; /* Entfernt alle Scrollbars */
  width: 100vw;
  height: 100vh;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1; /* Hintergrund-Layer */
}

#three-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--color-sidebar);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden; /* Verhindert horizontalen Scrollbalken */
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--color-border);
  z-index: 10;
  box-sizing: border-box; /* Wichtig für korrektes Sizing */
}

/* Flexbox-Container für Tool-Windows */
.tool-windows-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px; /* Konsistenter Abstand zwischen Tool-Windows */
  overflow-y: auto;
  min-height: 0;
  padding: 4px 0; /* Kleiner Padding für besseren Abstand */
}

/* Tool Windows */
.tool-window {
  background: var(--color-window);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 60px;
  margin-bottom: 2px; /* Konsistenter Abstand zwischen Windows */
}

.tool-window.hidden {
  display: none;
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px; /* Einheitlicher Padding */
  background: var(--color-window-header);
  border-bottom: 1px solid var(--color-border);
  cursor: move;
  min-height: 40px; /* Feste Header-Höhe */
}

.tool-title {
  display: flex;
  align-items: center;
  gap: 8px; /* Konsistenter Gap */
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.tool-icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.tool-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px; /* Größerer Klickbereich */
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.tool-close:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.tool-content {
  padding: 14px; /* Etwas reduziert von 16px */
  display: flex;
  flex-direction: column;
  gap: 10px; /* Reduziert von 12px */
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden; /* Verhindert horizontalen Scrollbalken */
  box-sizing: border-box;
}

/* Tool Menu */
.tool-menu {
  background: var(--color-window);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-top: 8px;
  flex-shrink: 0;
}

.tool-menu-header {
  padding: 10px 12px; /* Konsistent mit tool-header */
  background: var(--color-window-header);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px; /* Konsistent mit tool-title */
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  min-height: 40px; /* Gleiche Höhe wie tool-header */
}

.tool-menu-items {
  padding: 8px; /* Etwas mehr Padding */
  display: flex;
  flex-direction: column;
  gap: 4px; /* Konsistenter Abstand */
}

.tool-menu-item {
  background: none;
  border: none;
  color: var(--color-text);
  padding: 10px 12px; /* Konsistenter Padding */
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px; /* Konsistenter Abstand */
  font-size: 12px;
  text-align: left;
  height: 36px; /* Feste Höhe */
}

.tool-menu-item:hover {
  background: var(--color-hover);
  color: var(--color-primary);
}

.tool-menu-item.active {
  background: var(--color-primary);
  color: white;
}

/* Tool Content Scrollbar - Neue benutzerdefinierte Scrollbar */
.tool-content::-webkit-scrollbar {
  width: 8px;
}

.tool-content::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

.tool-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  border: 1px solid #bbb;
}

.tool-content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Sidebar Scrollbar - Gleiche Style */
#sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  border: 1px solid #bbb;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Tool Windows Container Scrollbar */
.tool-windows-container::-webkit-scrollbar {
  width: 8px;
}

.tool-windows-container::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

.tool-windows-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  border: 1px solid #bbb;
}

.tool-windows-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Results Container Scrollbar */
.results-container::-webkit-scrollbar {
  width: 8px;
}

.results-container::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
  border: 1px solid #bbb;
}

.results-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Button Styles */
.button-row {
  display: flex;
  gap: 8px; /* Konsistenter Abstand zwischen Buttons */
  flex-wrap: wrap;
  align-items: center; /* Zentrale Ausrichtung */
  justify-content: center; /* Zentrierte Ausrichtung */
}

.icon-btn {
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  padding: 10px; /* Etwas größerer Padding für bessere Klickbarkeit */
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; /* Konsistente Mindestbreite */
  height: 40px; /* Feste Höhe für alle Buttons */
  font-size: 13px;
  flex-shrink: 0; /* Verhindert Schrumpfen */
}

.icon-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn .icon {
  font-size: 16px; /* Größere Icons für bessere Sichtbarkeit */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spotify Button */
.spotify-btn {
  background: #1db954;
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  padding: 12px 16px; /* Bessere Proportionen */
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  height: 40px; /* Gleiche Höhe wie andere Buttons */
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotify-btn:hover {
  background: #1ed760;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.spotify-btn:disabled {
  background: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Slider Styles */
.slider-row {
  display: flex;
  align-items: center;
  justify-content: center; /* Zentrierte Ausrichtung */
  gap: 10px; /* Konsistenter Abstand */
  margin: 8px 0; /* Vertikaler Abstand */
}

.slider-row label {
  display: flex;
  align-items: center;
  margin: 0;
  min-width: 20px; /* Etwas mehr Platz für Icons */
}

.slider-icon {
  font-size: 14px; /* Etwas größer für bessere Sichtbarkeit */
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-row input[type="range"] {
  flex: 1;
  margin: 0;
}

.slider-row span {
  font-size: 11px;
  color: var(--color-text-muted);
  min-width: 40px; /* Mehr Platz für Werte */
  text-align: right;
  font-weight: 500;
}

/* Color Controls */
.color-row {
  display: flex;
  align-items: center;
  justify-content: center; /* Zentrierte Ausrichtung */
  gap: 20px; /* Größerer Abstand für bessere Trennung */
  margin: 8px 0; /* Vertikaler Abstand */
}

.color-row input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 32px; /* Etwas größer */
  height: 32px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
  flex-shrink: 0;
}

.color-row input[type="color"]:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-row input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px; /* Konsistenter Abstand */
  cursor: pointer;
  font-size: 12px;
  margin-left: 15px; /* Zusätzlicher Abstand zu den Farbfeldern */
}

.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  width: 32px; /* Gleiche Größe wie Color-Inputs */
  height: 32px; /* Gleiche Größe wie Color-Inputs */
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm); /* Gleicher Radius wie Color-Inputs */
  background: var(--color-hover);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px; /* Größeres Häkchen für größere Checkbox */
  font-weight: bold;
}

/* Range Input Styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 20px;
    position: relative;
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: var(--color-border);
    height: 4px;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 2px solid white;
    transition: var(--transition);
    margin-top: -7px;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--color-primary-hover);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    background: var(--color-border);
    height: 4px;
    border-radius: 2px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 2px solid white;
    transition: var(--transition);
}

/* File Input Styles */
.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  display: block;
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 12px;
}

.file-input-label:hover {
  background: var(--color-primary);
  color: white;
}

/* === SECTION STYLING === */
.section-divider {
  height: 1px;
  background: var(--color-border);
  margin: 8px 0; /* Reduziert von 16px auf 8px */
  opacity: 0.5;
}

#spotify-section {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Kleinerer Gap für weniger Abstand */
}

#spotify-search {
  transition: var(--transition);
}

#spotify-search.hidden {
  display: none;
}

/* Search Input */
.search-input-group {
  display: flex;
  gap: 6px; /* Reduziert von 8px auf 6px */
  align-items: stretch;
  margin: 4px 0; /* Reduziert von 8px auf 4px */
  width: 100%; /* Stellt sicher, dass die Gruppe die volle Breite nutzt */
  box-sizing: border-box;
}

.search-input {
  flex: 1;
  background: var(--color-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--color-text);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  height: 40px;
  box-sizing: border-box;
  min-width: 0; /* Verhindert Overflow */
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 173, 181, 0.2);
}

.search-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

.search-btn {
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  padding: 8px; /* Reduziert von 10px 12px auf 8px */
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px; /* Feste Breite statt min-width */
  flex-shrink: 0;
}

.search-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.search-btn:disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

.search-btn .icon {
  font-size: 16px;
}

/* Tab Styles */
.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 12px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-size: 13px;
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Results Container */
.results-container {
  max-height: 200px; /* Reduziert von 240px */
  overflow-y: auto;
  overflow-x: hidden; /* Verhindert horizontalen Scrollbalken */
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px; /* Reduziert von 8px */
  margin-top: 6px; /* Reduziert von 8px */
  box-sizing: border-box;
}

.results-container:empty {
  display: none;
}

.track-item, .playlist-item {
  padding: 10px; /* Reduziert von 12px */
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 4px; /* Reduziert von 6px */
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden; /* Verhindert Text-Overflow */
}

.track-item:last-child, .playlist-item:last-child {
  margin-bottom: 0;
}

/* Message Styles */
.loading-message, .error-message, .info-message {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-style: italic;
}

.error-message {
  color: #ff6b6b;
}

.loading-message {
  color: var(--color-primary);
}

/* Track Name and Artist Styling */
.track-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.2;
}

.track-artist {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    position: relative;
    max-height: 50vh;
    overflow-y: auto;
  }
  
  .tool-windows-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tool-window {
    flex: 1;
    min-width: 280px;
    max-height: calc(50vh - 60px);
  }
  
  .tool-content {
    max-height: calc(50vh - 120px);
  }
  
  .tool-menu {
    width: 100%;
    margin-top: 8px;
  }
  
  .tool-menu-items {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .tool-menu-item {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  #sidebar {
    padding: 4px;
    max-height: 40vh;
  }
  
  .tool-window {
    min-width: 100%;
    max-height: calc(40vh - 60px);
  }
  
  .tool-content {
    padding: 8px;
    max-height: calc(40vh - 120px);
  }
  
  .button-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .icon-btn {
    min-width: 36px;
    height: 36px;
  }
}

/* === ANIMATION === */
.tool-window {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ACCESSIBILITY === */
.tool-close:focus,
.tool-menu-item:focus,
.icon-btn:focus,
.spotify-btn:focus,
.search-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(255, 255, 255, 0.3);
    --color-hover: rgba(255, 255, 255, 0.15);
    --color-window: rgba(0, 0, 0, 0.8);
    --color-window-header: rgba(0, 0, 0, 0.9);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === SPOTIFY-UI STYLES === */
.track-item, .playlist-item {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.track-item:hover, .playlist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.track-item.selected, .playlist-item.selected {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
}

.track-name, .playlist-name {
    font-weight: 500;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist, .playlist-info {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.loading-message, .error-message, .info-message {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    border-radius: 4px;
    margin: 8px 0;
}

.loading-message {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.info-message {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === SPOTIFY TABS === */
.search-tabs {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.tab-content {
    display: none;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Results Container mit korrekten Styles für Spotify-Items */
.results-container {
    max-height: 240px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    margin-top: 8px;
}

.results-container .track-item,
.results-container .playlist-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.results-container .track-item:hover,
.results-container .playlist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.results-container .track-item.selected,
.results-container .playlist-item.selected {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
}

/* === UNIFIED PLAYER STYLES === */
.player-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 12px; /* Reduziert von 16px auf 12px */
    border: 1px solid var(--color-border);
    margin-top: 6px; /* Reduziert von 12px auf 6px */
}

.player-controls {
    margin: 8px 0; /* Reduziert von 12px auf 8px */
}

.track-source {
    font-size: 10px;
    color: var(--color-primary);
    margin-top: 2px; /* Reduziert von 4px auf 2px */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#current-track-info {
    margin-bottom: 8px; /* Reduziert von 12px auf 8px */
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#current-track-name {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 3px; /* Reduziert von 4px auf 3px */
    font-size: 13px;
    line-height: 1.2;
}

#current-track-artist {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.2;
}

.player-controls .button-row {
    justify-content: center;
    gap: 8px; /* Reduziert von 10px auf 8px */
}

#player-progress {
    margin-top: 8px; /* Reduziert von 12px auf 8px */
}

/* Progress Bar Verbesserungen */
.progress-container {
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 4px; /* Etwas dicker */
    background: var(--color-border);
    border-radius: 3px; /* Etwas runder */
    overflow: hidden;
    margin-bottom: 8px; /* Mehr Abstand */
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* === BEAT DETECTION STATUS === */
.beat-status {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin: 4px 0;
    border: 1px solid;
    text-align: center;
}

.beat-status.active-local {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.3);
}

.beat-status.active-spotify {
    background: rgba(29, 185, 84, 0.1);
    color: #1db954;
    border-color: rgba(29, 185, 84, 0.3);
}

.beat-status.active-fallback {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.beat-status.inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.3);
}

/* === BEAT VISUALIZATION INDICATOR === */
.beat-visual-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 173, 181, 0.8), rgba(0, 173, 181, 0.2));
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    pointer-events: none;
}

.beat-visual-indicator.active {
    opacity: 1;
    transform: scale(1.2);
    animation: beatPulse 0.6s ease-out;
}

@keyframes beatPulse {
    0% {
        transform: scale(1.2);
        box-shadow: 0 0 0 0 rgba(0, 173, 181, 0.7);
    }
    50% {
        transform: scale(1.4);
        box-shadow: 0 0 0 10px rgba(0, 173, 181, 0.3);
    }
    100% {
        transform: scale(1.2);
        box-shadow: 0 0 0 20px rgba(0, 173, 181, 0);
    }
}

/* === ENHANCED BEAT STATUS === */

/* SVG Icon System */
.tool-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  fill: #ffffff;
  stroke: none;
  transition: var(--transition);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: #ffffff;
  stroke: none;
  transition: var(--transition);
}

.slider-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  fill: #ffffff;
  stroke: none;
  transition: var(--transition);
}

/* Icon-Button spezifische SVG-Styles */
.icon-btn .icon {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.icon-btn:hover .icon {
  fill: var(--color-primary-hover);
  transform: scale(1.1);
}

/* Tool-Header Icon Styles */
.tool-title .tool-icon {
  margin-right: 8px;
  fill: #ffffff;
}

/* Tool-Menu Icon Styles */
.tool-menu-header .tool-icon {
  fill: #ffffff;
}

.tool-menu-item .tool-icon {
  fill: #ffffff;
}

.tool-menu-item:hover .tool-icon {
  fill: var(--color-primary);
}

.tool-menu-item.active .tool-icon {
  fill: white;
}

/* Search Button Icon */
.search-btn .icon {
  width: 16px;
  height: 16px;
}

/* Kombinierte Styles für alle Icon-Typen */
.tool-icon, .icon, .slider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}