/* 1. GLOBAL STYLES */
body {
    background: #000;
    color: #fff;
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER - Restoring height and spacing */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #800080;
    padding: 20px 30px; /* Increased padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px; /* Ensures it doesn't feel cramped */
}

.site-header h1 {
    font-size: 1.8rem; /* Larger title */
    font-weight: 100;
    margin: 0;
}

/* 3. MASTER VOLUME */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

#master-vol {
    accent-color: #b366ff;
    width: 100px;
    cursor: pointer;
}

/* 4. TRACK CARD - The Grid Fix */
.track-card {
    background: #181818;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    /* Thin purple border as requested */
    border: 1px solid rgba(179, 102, 255, 0.3);
    display: flex;
    flex-direction: column; /* Stacks info row on top of waveform */
    gap: 20px;
    transition: all 0.4s ease;
}

.track-card:hover, .track-card.is-playing {
    border-color: #b366ff;
    background: #1f1f1f;
    box-shadow: 0 0 20px rgba(179, 102, 255, 0.3);
}

/* 5. CARD TOP ROW (Art, Btn, Title) */
.card-top-row {
    display: flex;
    align-items: center;
    gap: 25px;
}

.artwork-container {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.cover-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 0.5px solid #fff;
}

.track-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #b366ff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn svg {
    fill: white;
    width: 30px;
    height: 30px;
}

.track-title {
    margin: 0;
    font-weight: 300;
    font-size: 1.5rem;
}

.genre-tag {
    color: #b366ff;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* 6. DESKTOP WAVEFORM HEIGHT (Default) */
.waveform-box {
    width: 100%;
    height: 75px; /* Restored for desktop */
    background: #222;
    border-radius: 4px;
}

.waveform-box canvas {
    background: #181818;
}

.time-display {
    text-align: right;
    font-size: 0.85rem;
    color: #b366ff;
    margin-top: 5px;
    font-family: monospace;
}

/* 7. MOBILE RESPONSIVE TWEAKS */
@media (max-width: 600px) {
    /* Header: Remove volume overlap by hiding volume and centering title */
    .site-header {
        justify-content: left;
        padding: 15px 20px;
        min-height: 60px;
    }

    .site-header h1 {
        font-size: 1.3rem;
        text-align: left;
        white-space: normal;
    }

    /* Hide the volume slider on mobile as requested */
    .volume-container {
        display: none !important;
    }

    /* Track Card: Tighten spacing for smaller screens */
    .track-card {
        padding: 15px;
        gap: 15px;
    }

    .card-top-row {
        gap: 15px;
    }

    .artwork-container {
        width: 75px;
        height: 75px;
    }

    .track-info {
        gap: 12px;
    }

    .play-btn {
        width: 48px;
        height: 48px;
    }

    .track-title {
        font-size: 1.1rem;
    }

    /* Waveform: Maintain the 40px height you liked for mobile */
    .waveform-box {
        height: 40px !important;
    }

    .time-display {
        font-size: 0.75rem;
        margin-top: 10px;
    }
}

/* FINAL OVERRIDE FOR ICON VISIBILITY - Keep this at the very bottom */
.play-btn svg {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    fill: white !important;
    margin: auto;
}
