/* Global Styles */
:root {
    --primary-color: #8861FF;
    --secondary-color: #7B47FB;
    --accent-color: #fd79a8;
    --text-color: #f5f6fa;
    --background-color: #1e272e;
    --card-background: #2f3640;
    --hover-color: #a29bfe;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --progress-bar-bg: #44475a;
    --purple-gradient: linear-gradient(135deg, #8861FF 0%, #5F3DC4 100%);
    --vibrant-gradient: linear-gradient(135deg, #8861FF 0%, #ff7675 50%, #fd79a8 100%);
    --cool-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --neon-gradient: linear-gradient(45deg, #00aeff 0%, #a000bc 50%, #ff1361 100%);
}

.light-theme {
    --primary-color: #574b90;
    --secondary-color: #786fa6;
    --accent-color: #e84393;
    --text-color: #2f3640;
    --background-color: #f5f6fa;
    --card-background: #dcdde1;
    --hover-color: #686de0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --progress-bar-bg: #c8d6e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: 
        radial-gradient(circle at top right, rgba(136, 97, 255, 0.2), transparent 70%),
        radial-gradient(circle at bottom left, rgba(253, 121, 168, 0.1), transparent 70%);
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 450px;
}

/* Login Page Styles */
.login-container {
    width: 100%;
}

.login-card {
    background-color: var(--card-background);
    background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px var(--shadow-color);
    transition: transform 0.3s ease;
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--vibrant-gradient);
    z-index: 1;
}

.login-header {
    text-align: center;
    padding: 20px;
    position: relative;
}

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: transparent;
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
}

.login-header p {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

.login-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--card-background);
}

.login-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, var(--card-background));
    pointer-events: none;
}

.login-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.login-card:hover .login-image img {
    transform: scale(1.05);
}

.login-content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.login-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.login-content h2 span {
    display: block;
    color: transparent;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
}

.login-content p {
    margin-bottom: 25px;
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 300;
}

.password-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#password-input {
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#password-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(136, 97, 255, 0.2);
}

#login-btn {
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: var(--vibrant-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

#login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

#login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(136, 97, 255, 0.4);
}

#login-btn:hover::before {
    left: 100%;
}

#login-btn:active {
    transform: translateY(0);
}

/* Music Player Styles */
.music-player-container {
    width: 100%;
}

.music-player {
    background-color: var(--card-background);
    background-image: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
    border-radius: 20px;
    box-shadow: 0 15px 30px var(--shadow-color);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.music-player:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--vibrant-gradient);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.theme-toggle:hover {
    transform: rotate(30deg);
    color: var(--hover-color);
    background: rgba(0, 0, 0, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: transparent;
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--vibrant-gradient);
    border-radius: 3px;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Music Info */
.music-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.cover-art {
    min-width: 100px;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.cover-art::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(45deg, rgba(136, 97, 255, 0.3), transparent);
    mix-blend-mode: overlay;
}

.cover-art:hover {
    transform: scale(1.05) rotate(2deg);
}

.cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    flex: 1;
    overflow: hidden;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: none; /* Animation will be added via JavaScript for long texts */
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.track-info h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.track-info p {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Visualizer */
.visualizer-container {
    height: 60px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.visualizer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
                            rgba(0, 0, 0, 0.05) 0%, 
                            rgba(0, 0, 0, 0) 50%,
                            rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

#visualizer {
    width: 100%;
    height: 100%;
}

/* Progress Bar */
.progress-area {
    margin-bottom: 25px;
}

.progress-bar {
    height: 6px;
    background-color: var(--progress-bar-bg);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    margin-bottom: 5px;
    overflow: hidden;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 8px;
}

.progress-bar:hover .progress::after {
    transform: scale(1);
}

.progress {
    height: 100%;
    width: 0%;
    background: var(--vibrant-gradient);
    border-radius: 10px;
    transition: width 0.1s linear;
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(253, 121, 168, 0.7);
    transition: transform 0.2s ease;
}

.timer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.8;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.03));
}

.controls button {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.controls button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(136, 97, 255, 0.5);
}

.controls button:active {
    transform: scale(0.95);
}

#play-pause {
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

#play-pause::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cool-gradient);
    opacity: 0.3;
    z-index: -1;
    transition: opacity 0.3s ease;
}

#play-pause:hover::before {
    opacity: 0.5;
}

#play-pause:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#play-pause i {
    position: relative;
    left: 2px; /* Small adjustment for play icon alignment */
}

/* Volume Control */
.volume-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    position: relative;
}

.volume-container i {
    margin-right: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

#volume {
    width: 100%;
    -webkit-appearance: none;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
}

#volume:hover {
    height: 8px;
}

#volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

#volume::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(136, 97, 255, 0.5);
}

/* Fill track to the left of thumb */
#volume::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--volume-position, 0%);
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    pointer-events: none;
}

/* Upload Button */
.upload-container {
    margin-bottom: 25px;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--purple-gradient);
    color: white;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

#upload-music {
    display: none;
}

/* Playlist */
.playlist {
    margin-top: 30px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
    position: relative;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari, newer Edge) */
.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb {
    background: var(--vibrant-gradient);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: var(--cool-gradient);
}

.playlist h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

.playlist h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--cool-gradient);
    border-radius: 2px;
}

#music-list {
    list-style: none;
}

.music-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.music-item:hover {
    background-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.music-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent-color);
    padding-left: 17px;
    background-image: linear-gradient(to right, rgba(253, 121, 168, 0.05), rgba(0, 0, 0, 0));
}

.music-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--vibrant-gradient);
    animation: pulseHighlight 2s infinite;
}

@keyframes pulseHighlight {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.music-item-info {
    flex: 1;
    overflow: hidden;
    padding-right: 10px;
}

.music-item-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    position: relative;
}

.music-item-info p {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

.music-item-date {
    display: block;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 3px;
    font-style: italic;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.music-item-duration {
    font-size: 0.8rem;
    opacity: 0.9;
    background: linear-gradient(to right, rgba(136, 97, 255, 0.2), rgba(253, 121, 168, 0.2));
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 45px;
    text-align: center;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.playing .cover-art {
    animation: pulse 2s infinite;
    box-shadow: 0 5px 15px rgba(136, 97, 255, 0.4);
}

/* Login Page Styles - Already in your CSS */

/* Responsive Design */
@media (max-width: 576px) {
    .container {
        padding: 10px;
    }
    
    .music-player, .login-card {
        padding: 20px;
    }
    
    .header h1, .login-header h1 {
        font-size: 1.8rem;
    }
    
    .cover-art {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .track-info h2 {
        font-size: 1.2rem;
    }
    
    .controls button {
        font-size: 1.5rem;
        margin: 0 10px;
    }
    
    #play-pause {
        font-size: 1.8rem;
        width: 50px;
        height: 50px;
        margin: 0 15px;
    }
    
    .visualizer-container {
        height: 40px;
    }
    
    .login-content h2 {
        font-size: 1.3rem;
    }
    
    .login-image {
        height: 150px;
    }
    
    .playlist {
        max-height: 250px;
    }
    
    .music-item {
        padding: 10px;
    }
    
    .music-item-info h4 {
        font-size: 0.9rem;
    }
    
    .music-item-info p, .music-item-date {
        font-size: 0.7rem;
    }
    
    .music-item-duration {
        font-size: 0.7rem;
        padding: 2px 6px;
        min-width: 40px;
    }
} 