/* style.css */

:root {
    --google-blue: #4285F4;
    --google-grey-100: #F8F9FA;
    --google-grey-300: #E8EAED;
    --google-grey-700: #5F6368;
    --surface-color: #FFFFFF;
    --text-primary: #3c4043;
    --font-family: 'Roboto', sans-serif;
    --border-radius: 12px;
    --shadow-1: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--google-grey-100);
    color: var(--text-primary);
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px; /* Space for the fixed player bar */
}

header {
    padding: 20px 24px;
}

header h1 {
    font-size: 24px;
    font-weight: 500;
}

main {
    padding: 0 24px 24px;
}

.album-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-1);
    overflow: hidden; /* Important for the collapse animation */
}

.album-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
}

.album-art {
    width: 50px;
    height: 50px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--google-grey-300);
    border-radius: 8px;
    color: var(--google-grey-700);
    flex-shrink: 0;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.album-art .material-symbols-outlined {
    font-size: 32px;
}

.album-info {
    flex-grow: 1;
}

.album-info h2 {
    font-size: 18px;
    font-weight: 500;
}

.expand-icon {
    transition: transform 0.3s ease;
}

/* Rotate icon when album is active/expanded */
.album-card.active .expand-icon {
    transform: rotate(180deg);
}

.song-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

/* Set max-height to expand the list */
.album-card.active .song-list {
    max-height: 1000px; /* A large value to accommodate many songs */
    transition: max-height 0.5s ease-in;
}

.song-list li a {
    display: block;
    padding: 12px 16px 12px 82px; /* Indent to align with album title */
    text-decoration: none;
    color: var(--text-primary);
    border-top: 1px solid var(--google-grey-300);
    transition: background-color 0.2s;
    position: relative;
}

.song-list li a:hover {
    background-color: var(--google-grey-100);
}

.song-list li a.playing {
    color: var(--google-blue);
    font-weight: 500;
}

.song-list li a.playing::before {
    content: 'play_arrow';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--google-blue);
    font-size: 20px;
}

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    box-shadow: 0 -2px 5px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 20px;
}

#now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 250px;
    overflow: hidden;
}

#now-playing p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#audio-player {
    width: 100%;
}