/* Navigation button style for Login/Logout */
.banner-link-btn {
    background: none;
    color: #fff;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 0;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.banner-link-btn:hover {
    color: #9a8c98;
    text-decoration: underline;
}
/* Auth Popup Styles */
.auth-modal {
    display: none;
    position: absolute;
    top: 60px;
    right: 70px;
    z-index: 1000;
}
.auth-popup {
    background: pink;
    border: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(34,34,59,0.12);
    width: 320px;
    position: relative;
    animation: slideInRight 0.2s ease;
}
@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.auth-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #22223b;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.auth-close:hover {
    opacity: 1;
}
.auth-title {
    margin-top: 0;
    font-size: 1.3rem;
    color: #22223b;
    font-weight: 600;
    margin-bottom: 1rem;
}
.auth-input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    background: #f7f7f7;
    transition: border 0.2s;
}
.auth-input:focus {
    border-color: #9a8c98;
    outline: none;
}
.auth-main-btn {
    width: 100%;
    background: #22223b;
    color: #fff;
    border: none;
    padding: 0.5rem 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(34,34,59,0.08);
    transition: background 0.2s;
}
.auth-main-btn:hover {
    background: #4a4e69;
}
.auth-alt-btn {
    width: 60%;
    background: #eee;
    color: #22223b;
    border: none;
    padding: 0.3rem 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0.5rem auto 0 auto;
    display: block;
    opacity: 0.7;
    box-shadow: none;
    transition: background 0.2s, opacity 0.2s;
}
.auth-alt-btn:hover {
    background: #e0e0e0;
    opacity: 1;
}
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f7f7f7;
    padding-bottom: 80px; /* Space for control bar */
}
.banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #22223b;
    color: #fff;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.banner-links {
    display: flex;
    gap: 1.5rem;
}
.banner-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.banner-links a:hover {
    color: #9a8c98;
}
.banner-icon img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}
.music-container {
    padding: 2rem;
    position: relative;
    min-height: 500px;
}
.row-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #22223b;
    letter-spacing: 1px;
}
.scroll-row {
    display: flex;
    overflow-x: auto;
    gap: 1.2rem;
    padding-bottom: 1rem;
}
.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(34,34,59,0.08);
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 0.5rem;
    transition: box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(34,34,59,0.15);
}
.favorite-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background-color: #4a4e69;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #c9c9c9; /* Color for empty heart */
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s;
}

.favorite-icon:hover {
    transform: scale(1.1);
}

.favorite-icon.is-favorite {
    color: #ff4d4d; /* Color for filled heart */
}
.album-cover {
    width: 90px;
    height: 90px;
    background: #9a8c98;
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.7rem;
}
.card-title {
    text-align: center;
    font-size: 1rem;
    color: #22223b;
    font-weight: 500;
}

/* Music Control Bar */
.music-control-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #e0e0e0;
    border-top: 1px solid #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 2rem;
    box-sizing: border-box;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.music-control-bar.empty .song-info {
    visibility: hidden;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
}

.player-title {
    font-weight: 600;
    color: #22223b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-composer {
    font-size: 0.9rem;
    color: #4a4e69;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex: 0 0 auto; /* Don't grow or shrink */
}

.control-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #22223b;
    padding: 0;
}

#play-pause-btn {
    font-size: 2.5rem;
    width: 40px; /* Fixed width for balance */
    text-align: center;
}

.progress-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 3; /* Give more space to progress bar */
    min-width: 0; /* Allow shrinking */
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.progress-bar {
    flex-grow: 1;
    cursor: pointer;
}

/* Range Slider Styles */
input[type=range] {
  height: 15px;
  -webkit-appearance: none;
  margin: 10px 0;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

/* Webkit (Chrome, Safari, Edge) */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: #333;
  border-radius: 5px;
}

input[type=range]::-webkit-slider-thumb {
  height: 15px;
  width: 15px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -5px;
}

/* Firefox */
input[type=range]::-moz-range-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: #333;
  border-radius: 5px;
}

input[type=range]::-moz-range-thumb {
  height: 15px;
  width: 15px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  border: 0;
}

/* IE / Edge Legacy */
input[type=range]::-ms-track {
  width: 100%;
  height: 5px;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

input[type=range]::-ms-fill-lower {
  background: #333;
  border-radius: 5px;
}

input[type=range]::-ms-fill-upper {
  background: #333;
  border-radius: 5px;
}

input[type=range]::-ms-thumb {
  height: 15px;
  width: 15px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  margin-top: 0px;
}

/* Playlist Overlay */
.playlist-overlay {
    display: none;
}

.music-container.playlist-view-active .playlist-overlay {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000;
}

.music-container.playlist-view-active #main-content-items {
    display: none;
}

.playlist-view {
    width: 100%;
    height: 100%;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    box-sizing: border-box;
}

.playlist-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.playlist-section h2 {
    margin-top: 0;
    color: #22223b;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.playlist-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.playlist-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #4a4e69;
}

#now-playing-song .card {
    width: 100%;
    height: auto;
    padding: 0;
    box-shadow: none;
}

#now-playing-song .album-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
}



.playlist-song-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    color: #4a4e69;
    cursor: pointer;
    transition: background-color 0.2s;
}

.playlist-song-item:hover {
    background-color: #f7f7f7;
}

.playlist-song-item.active {
    background-color: #e0e0e0;
    font-weight: bold;
    color: #22223b;
}

#now-playing-section {
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

#now-playing-song {
    flex-grow: 1;
    min-height: 0; /* Important for flex children with overflow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#now-playing-song .card {
    width: 100%;
    max-width: 400px;
    height: 100%; /* Make the card fill the height */
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#now-playing-song .album-cover {
    width: 100%;
    flex-grow: 1; /* Make the image grow to fill space */
    min-height: 0; /* Important for flex children */
    object-fit: cover;
    border-radius: 1rem;
}

#now-playing-song .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem; /* Add margin to the bottom */
    flex-shrink: 0; /* Prevent the title from shrinking */
}

.music-container.playlist-view-active {
    overflow: hidden;
}

.playlist-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    z-index: 1001; /* Above the overlay */
    background: none;
    border: none;
    color: #22223b;
    cursor: pointer;
}

.playlist-toggle-button {
    /* Inherits from .control-button */
    font-size: 1.5rem;
    color: #22223b;
    cursor: pointer;
}

body.no-scroll {
    overflow: hidden;
}
