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

:root {
    --bg-color: #a1e4e4; /* A soft, warm off-white */
    --text-color: #2F4F4F; /* A deep, earthy forest green */
    --primary-color: #CD853F; /* A muted, burnt orange */
    --secondary-color: #F5F5DC; /* A slightly darker cream for containers */
    --border-radius: 8px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

/* New: Styles for the intro banner */
.intro-banner {
    background-color: var(--secondary-color);
    padding: 40px;
    text-align: center;
    border-radius: var(--border-radius);
    margin: 0 auto 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 900px;
}

.intro-banner h2 {
    color: var(--text-color);
    font-size: 1.5em;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.4;
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.banner-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
}

.banner-btn:hover {
    background-color: #e09f54;
    transform: scale(1.05);
}

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

/* --- Homepage Styles --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.artist-card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.artist-card h3 {
    margin-bottom: 5px;
}

.artist-alias {
    font-size: 0.9em;
    color: rgba(47, 79, 79, 0.7);
    margin: 0;
}

.track-count {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 5px 0 0;
}

/* --- Artist Page Styles --- */
.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2em;
    display: inline-block;
    margin-bottom: 20px;
}

/* Re-adding frosted glass to the tiles with a slight blur for subtlety */
.song-list-container {
    background-color: var(--secondary-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-list-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-list-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.song-list-item.active {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.audio-player-container {
    background-color: var(--secondary-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

#song-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-color);
}

#audio-player {
    display: none; /* Hide the default player */
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

#seek-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #ccc;
    border-radius: 3px;
    cursor: pointer;
    margin: 0 10px;
}

#seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

#current-time,
#duration-time {
    font-size: 0.9em;
    color: var(--text-color);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-controls button, .player-controls a {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.player-controls button:hover, .player-controls a:hover {
    transform: scale(1.05);
}

#play-pause-btn {
    width: 60px;
    height: 60px;
    font-size: 2em;
}

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

.volume-control i {
    font-size: 1.2em;
}

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

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

#loop-btn.active {
    background-color: #4CAF50;
    color: var(--text-color);
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    padding-top: 60px;
}

.modal-content {
    background-color: var(--secondary-color);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: var(--border-radius);
    position: relative;
    color: var(--text-color);
    line-height: 1.8;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

#lyrics-content {
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .artist-card {
        padding: 20px;
    }

    /* Change to a single column for mobile */
    .grid-container {
        grid-template-columns: 1fr;
    }

    .song-list-container,
    .audio-player-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    .song-list-item {
        padding: 12px;
    }

    .progress-container {
        flex-direction: column;
    }

    #seek-slider {
        margin: 10px 0;
    }

    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .player-controls button,
    .player-controls a {
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }

    #play-pause-btn {
        width: 55px;
        height: 55px;
        font-size: 1.8em;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}