/* Custom styles */
:root {
    /* Dark theme variables */
    --spotify-green: #1DB954;
    --dark-bg: rgba(13, 13, 13, 0.95);
    --darker-bg: rgba(18, 18, 18, 0.95);
    --nav-bg: rgba(0, 0, 0, 0.9);
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --glass-gradient: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(147, 0, 255, 0.2));
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);

    /* Light theme variables */
    --light-bg: rgba(255, 255, 255, 0.95);
    --lighter-bg: rgba(245, 245, 245, 0.95);
    --light-nav-bg: rgba(255, 255, 255, 0.9);
    --light-text-primary: #000000;
    --light-text-secondary: #666666;
    --light-glass-gradient: linear-gradient(135deg, rgba(255, 192, 203, 0.3), rgba(147, 0, 255, 0.1));
    --light-glass-border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Light mode styles */
[data-theme="light"] {
    --current-bg: var(--light-bg);
    --current-nav-bg: var(--light-nav-bg);
    --current-text-primary: var(--light-text-primary);
    --current-text-secondary: var(--light-text-secondary);
    --current-glass-gradient: var(--light-glass-gradient);
    --current-glass-border: var(--light-glass-border);
}

[data-theme="light"] {
    --text-white: var(--light-text-primary);
    --text-gray-300: var(--light-text-secondary);
    --text-gray-400: var(--light-text-secondary);
}

[data-theme="light"] .text-white {
    color: var(--light-text-primary) !important;
}

[data-theme="light"] .text-gray-300,
[data-theme="light"] .text-gray-400 {
    color: var(--light-text-secondary) !important;
}

[data-theme="light"] .glass-panel {
    background: var(--light-glass-gradient);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .upload-zone {
    border-color: rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.5);
}

/* Audio wave animation */
.wave-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(147, 0, 255, 0.2));
    opacity: 0.5;
    border-radius: 8px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, #ff1493, #9400d3);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23fff' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    animation: wave 4s ease-in-out infinite;
    transform-origin: bottom;
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.5);
    }
}

.playing .wave {
    animation-play-state: running;
}

.paused .wave {
    animation-play-state: paused;
}

/* Dark mode styles */
[data-theme="dark"] {
    --current-bg: var(--dark-bg);
    --current-nav-bg: var(--nav-bg);
    --current-text-primary: var(--text-primary);
    --current-text-secondary: var(--text-secondary);
    --current-glass-gradient: var(--glass-gradient);
    --current-glass-border: var(--glass-border);
}

/* Theme Switch */
.theme-switch {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--current-glass-gradient);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.theme-switch::after {
    content: '🌙';
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .theme-switch {
    background: linear-gradient(135deg, #ffd1dc, #e6e6fa);
}

[data-theme="light"] .theme-switch::after {
    content: '☀️';
    transform: translateX(28px) translateY(-50%);
    background: #FFD700;
}

.theme-switch:hover::after {
    transform: translateY(-50%) scale(1.1);
}

[data-theme="light"] .theme-switch:hover::after {
    transform: translateX(28px) translateY(-50%) scale(1.1);
}

/* Video background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--current-text-primary);
    position: relative;
    min-height: 100vh;
    backdrop-filter: blur(10px);
}

/* Glass morphism styles */
.glass-panel {
    background: var(--current-glass-gradient);
    backdrop-filter: blur(10px);
    border: var(--current-glass-border);
    border-radius: 16px;
}

.glass-nav {
    background: var(--current-nav-bg);
    backdrop-filter: blur(15px);
    border-right: var(--current-glass-border);
}

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.progress-bar {
    background: linear-gradient(to right, var(--spotify-green) var(--progress, 0%), #4D4D4D var(--progress, 0%));
    cursor: pointer;
    height: 4px;
    border-radius: 2px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #4D4D4D;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.upload-zone {
    border: 2px dashed #4D4D4D;
    transition: all 0.3s ease;
    background-color: var(--darker-bg);
}

.upload-zone:hover {
    border-color: var(--spotify-green);
    background-color: rgba(29, 185, 84, 0.1);
}

.upload-zone.drag-over {
    border-color: var(--spotify-green);
    background-color: rgba(29, 185, 84, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.song-card {
    animation: fadeIn 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: #4D4D4D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Playlist styles */
.playlist-item {
    padding: 8px 16px;
    margin: 4px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.playlist-item.active {
    background-color: rgba(29, 185, 84, 0.2);
}

/* Player controls */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.control-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-button:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.play-pause-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-pause-button:hover {
    transform: scale(1.1);
    background-color: #FFFFFF;
}
