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

:root {
    --primary: #7fb069; /* Spring Green */
    --primary-dark: #5a824a;
    --accent: #d9a066; /* Warm Gold */
    --text: #f4e1d2; /* Cream */
    --text-muted: rgba(244, 225, 210, 0.7);
    --bg-overlay: rgba(26, 18, 12, 0.85);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --wood-dark: #2c1e14;
    --wood-light: #4a3728;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--wood-dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background.png') no-repeat center center/cover;
    z-index: -2;
    filter: brightness(0.6) blur(2px);
    transition: transform 0.5s ease;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent, var(--bg-overlay));
    z-index: -1;
}

.main-container {
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 40px;
    z-index: 1;
    margin: 40px auto;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Player Section */
.player-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(45deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.header p {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.now-playing-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.disk-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 30px;
}

.disk {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#111, #333, #111);
    box-shadow: 0 0 0 10px rgba(0,0,0,0.2), 0 0 50px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
}

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

.disk::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
}

.disk-center {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    border: 4px solid var(--wood-dark);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.track-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 350px;
}

.track-info p {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 30px;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -5px;
    width: 16px;
    height: 16px;
    background: var(--text);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 8px;
    color: var(--text-muted);
}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.btn-play {
    width: 65px;
    height: 65px;
    background: var(--primary);
    border-radius: 50%;
    color: var(--wood-dark);
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(127, 176, 105, 0.3);
}

.btn-play:hover {
    background: var(--text);
    transform: scale(1.05);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

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

/* Playlist Section */
.playlist-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

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

.playlist-content::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.track-item {
    display: grid;
    grid-template-columns: 40px 1fr 100px;
    padding: 15px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.2s;
    align-items: center;
    margin-bottom: 5px;
}

.track-item:hover {
    background: rgba(255,,255,0.05);
}

.track-item.active {
    background: rgba(127, 176, 105, 0.15);
}

.track-item.active .track-name {
    color: var(--primary);
}

.track-index {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.track-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.track-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.track-duration {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Coffee Steam Animation */
.coffee-steam {
    position: absolute;
    top: -20px;
    right: 40px;
}

.steam-line {
    width: 2px;
    height: 15px;
    background: rgba(255,255,255,0.3);
    border-radius: 1px;
    display: inline-block;
    margin: 0 2px;
    animation: steam 2s infinite ease-in-out;
}

@keyframes steam {
    0% { transform: translateY(0) scaleY(1); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(-20px) scaleY(1.5); opacity: 0; }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 20px;
        margin: 20px auto;
    }
    .player-section {
        padding: 30px;
        min-height: 550px;
    }
    .playlist-section {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .player-section {
        padding: 20px;
        border-radius: 25px;
    }
    .header h1 {
        font-size: 1.8rem;
    }
    .disk-wrapper {
        width: 180px;
        height: 180px;
    }
    .disk-center {
        width: 60px;
        height: 60px;
    }
    .buttons {
        gap: 15px;
    }
    .btn-play {
        width: 55px;
        height: 55px;
    }
    .track-item {
        padding: 12px 10px;
        grid-template-columns: 30px 1fr 60px;
    }
    .track-name {
        font-size: 0.9rem;
    }
    .track-duration {
        font-size: 0.8rem;
    }
}
