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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 300;
    flex-shrink: 0;
    position: relative;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

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

.btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
}

.player-controls {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

#playBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    justify-content: center;
}

#repeatBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    justify-content: center;
}

#repeatBtn.active {
    color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.2) !important;
}

.progress-container {
    flex: 1;
    margin-left: 15px;
}

#progressBar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

#volumeSlider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#visualizerSelect {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 11px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    width: 160px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#visualizerSelect option {
    background: #1a1a1a;
    color: white;
}

#visualizerContainer {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#visualizerCanvas {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0c0c0c 100%);
    cursor: pointer;
}

#trackInfo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#trackInfo.playing {
    opacity: 0;
}

#trackTitle {
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

#trackDetails {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.6);
}

/* Settings Panel */
#settingsPanel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

#settingsPanel:not(.hidden) {
    transform: translateX(0);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.settings-content {
    padding: 20px;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    font-weight: 500;
    color: #6366f1;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.setting-item label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 80px;
}

.setting-item input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
}

.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.setting-item select option {
    background: #1a1a1a;
    color: white;
}

.setting-item span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 35px;
    text-align: right;
}

/* Mutation Visual Feedback */
.setting-item.mutated {
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.mutation-indicator {
    position: absolute;
    right: -25px;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Mutation Mode Active Indicator */
#mutateMode:checked+.mutation-status::after {
    content: " 🎲 ACTIVE";
    color: #6366f1;
    font-weight: bold;
    font-size: 11px;
    margin-left: 5px;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}


.hidden {
    display: none;
}

.dragover {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 2px dashed #6366f1 !important;
}

/* Help Panel Styles */
#helpPanel {
    position: fixed;
    top: 75px;
    right: 0;
    width: 320px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 350;
    overflow-y: auto;
    min-height: 100vh;
    max-height: 100vh;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 55px;
}

.help-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.help-content {
    padding: 20px;
}

.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcut-item kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 12px;
    color: #6366f1;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

/* Settings Footer Styles */
.settings-footer {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    width: 50%;
}

.settings-footer .btn {
    flex: 1;
    font-size: 13px;
    padding: 8px 12px;
}

/* Mutation Highlight Animation */
.setting-item.mutated {
    animation: mutationPulse 0.6s ease-in-out;
}

@keyframes mutationPulse {
    0% {
        background: rgba(99, 102, 241, 0.3);
    }

    50% {
        background: rgba(99, 102, 241, 0.5);
    }

    100% {
        background: rgba(99, 102, 241, 0.3);
    }
}

/* Performance indicator (optional) */
.performance-stats {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    z-index: 1000;
    pointer-events: none;
}

/*
 System Audio Capture Styles */
#captureBtn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: #ff6b35;
    animation: captureActive 2s ease-in-out infinite;
}

@keyframes captureActive {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.8);
    }
}

/* Capture button hover state */
#captureBtn:hover:not(:disabled) {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
}/* Playli
st Panel Styles */
#playlistPanel {
    position: fixed;
    top: 70px; /* Start below the header controls */
    left: 0;
    width: 350px;
    height: calc(100vh - 70px); /* Adjust height to account for header */
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: hidden;
}

#playlistPanel:not(.hidden) {
    transform: translateX(0);
}

#playlistPanel:not(.hidden) {
    transform: translateX(0);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.playlist-content {
    font-size: 14px;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.playlist-content::-webkit-scrollbar {
    width: 4px;
}

.playlist-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.playlist-item.current {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
}

.playlist-item.playing {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.playlist-item-title:hover {
    white-space: wrap;
}

.playlist-item-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.playlist-item-controls {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.playlist-item-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.playlist-item-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.playlist-controls {
    margin: auto;
    width: 70%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-controls label {
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.playlist-controls input[type="range"] {
    width: 100%;
    margin-top: 8px;
}

/* Playlist button in header */
#playlistBtn.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
}

#playlistBtn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

/* Previous/Next buttons */
#prevBtn, #nextBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    justify-content: center;
}

#prevBtn:disabled, #nextBtn:disabled {
    opacity: 0.3;
}

/* Add these styles to your vizwiz.css */

/* Playlist top controls styling */
.playlist-top-controls {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.playlist-control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.playlist-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search input styling */
#playlistSearch {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

#playlistSearch::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#playlistSearch:focus {
  border-color: #6366f1;
  box-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
}

/* Compact button styling for playlist controls */
.playlist-top-controls .btn {
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
}

/* Crossfade control styling */
.playlist-control-row label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.playlist-control-row input[type="range"] {
  margin-left: 10px;
  width: 100px;
}

/* Search result highlighting */
mark {
  background: rgba(255, 255, 0, 0.3) !important;
  color: inherit !important;
  padding: 0;
  border-radius: 2px;
}

/* Updated playlist content to account for top controls */
.playlist-content {
  height: calc(100% - 130px); /* Adjusted for header + top controls */
  overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .playlist-control-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .playlist-search-row {
    flex-direction: column;
  }
  
  .playlist-control-row label {
    justify-content: space-between;
  }
}

#playModeBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    justify-content: center;
}

#playModeBtn.single-mode {
    color: #ff6b35 !important;
    background: rgba(255, 107, 53, 0.2) !important;
}

#crossfadeSlider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label input:disabled + span {
    opacity: 0.5;
    cursor: not-allowed;
}

#visualizerSelect:disabled,
#settingsBtn:disabled,
#randomCheckbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
