/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #36393F; /* Abu-abu monyet */
    color: white; /* Font putih */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: #181818;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #36393F; /* Abu-abu monyet */
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 600;
    min-width: 0; /* Allow text to wrap if needed */
}

.nav-item a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.playlist-count {
    color: #7a7a7a;
    font-size: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.playlist-count {
    color: #7a7a7a;
    font-size: 12px;
    margin-left: auto;
}

.nav-item:hover {
    color: #fff;
    background-color: #282828;
}

.nav-item.active {
    color: #fff;
    background-color: #282828;
}

.icon {
    margin-right: 16px;
    font-size: 18px;
}

.divider {
    height: 1px;
    background-color: #36393F; /* Abu-abu monyet */
    margin: 10px 0;
}

/* Main Panel */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 12px;
}

.nav-arrows {
    display: flex;
    gap: 16px;
}

.nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #282828;
    color: #b3b3b3;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.nav-arrow:hover {
    background-color: #333;
    color: #fff;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-user {
    color: #b3b3b3;
    font-size: 14px;
}

.logout-btn {
    background-color: #4a75ff; /* Biru */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #3a65e0;
    transform: translateY(-2px);
}

.content {
    flex: 1;
    padding: 0 32px 40px;
    overflow-y: auto;
}

h1 {
    font-size: 32px;
    margin-bottom: 24px;
}

h2.section-title {
    font-size: 24px;
    margin: 24px 0 16px;
    border-left: 4px solid #FFD700; /* Aksen garis kuning nyala */
    padding-left: 12px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card {
    background-color: #282828;
    border-radius: 6px;
    overflow: hidden;
    transition: background-color 0.3s;
    position: relative;
    cursor: pointer;
}

.card:hover {
    background-color: #333;
}

.card img {
    width: 100%;
    display: block;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-overlay {
    opacity: 1;
}

.play-overlay {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #4a75ff; /* Biru */
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.play-overlay:hover {
    background-color: #3a65e0;
}

.card h3 {
    padding: 12px;
    font-size: 14px;
}

/* Track List */
.track-list {
    background-color: #282828;
    border-radius: 4px;
    overflow: hidden;
}

.track-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #333;
    transition: background-color 0.3s;
}

.track-row:last-child {
    border-bottom: none;
}

.track-row:hover {
    background-color: #333;
}

.track-number {
    width: 30px;
    color: #b3b3b3;
    font-size: 12px;
    text-align: center;
}

.track-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* Allows flex child to shrink */
}

.small-cover {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    flex-shrink: 0;
}

.track-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-album {
    flex: 1;
    color: #b3b3b3;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    color: #b3b3b3;
    font-size: 12px;
    margin-left: auto;
    padding-left: 16px;
}

.track-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.add-to-playlist-btn {
    background-color: transparent;
    border: 1px solid #b3b3b3;
    color: #b3b3b3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: bold;
}

.add-to-playlist-btn:hover {
    background-color: #b3b3b3;
    color: #000;
}

/* Navbar Styles (for login page) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2a2d34;
    border-bottom: 2px solid #FFD700; /* Aksen garis kuning nyala */
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.nav-subtitle {
    font-size: 0.9rem;
    color: #aaa;
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #ddd;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.login-btn {
    background-color: #4a75ff; /* Biru */
    color: white;
}

/* Main Content (for login page) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.main-content {
    padding-top: 2rem;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #4a75ff; /* Biru */
    color: white;
}

.btn-primary:hover {
    background-color: #3a65e0;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Music Section */
.music-section {
    margin-top: 3rem;
}

.music-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #FFD700; /* Aksen garis kuning nyala */
    padding-left: 0.5rem;
}

.tracks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.track-item {
    display: flex;
    align-items: center;
    background-color: #2a2d34;
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.track-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.album-cover {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.track-info {
    flex: 1;
}

.track-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.track-info p {
    color: #aaa;
    font-size: 0.9rem;
}

.play-btn {
    background-color: #4a75ff; /* Biru */
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #3a65e0;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #36393F; /* Abu-abu monyet */
}

.auth-box {
    background-color: #2a2d34;
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ddd;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #3a3d45;
    color: white;
}

.form-group input:focus {
    outline: none;
    border-color: #4a75ff; /* Biru */
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #aaa;
}

.auth-link a {
    color: #4a75ff; /* Biru */
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Player section */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #282828;
    padding: 12px 16px;
    border-top: 2px solid #FFD700; /* Aksen garis kuning nyala */
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
}

.current-track {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 30%;
}

.current-track img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
}

.track-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-details h3 {
    font-size: 14px;
    margin: 0;
}

.track-details p {
    font-size: 12px;
    color: #b3b3b3;
    margin: 0;
}

.like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    margin-top: 4px;
}

.like-btn:hover {
    color: #fff;
}

.like-btn.liked {
    color: #4a75ff;
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.playback-info {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.progress-container {
    flex: 1;
    padding: 0 16px;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background-color: #535353;
    border-radius: 5px;
    cursor: pointer;
}

.progress {
    height: 100%;
    background-color: #b3b3b3;
    width: 30%;
    border-radius: 5px;
}

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

.player-btn {
    background-color: transparent;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.3s;
}

.player-btn:hover {
    color: #fff;
}

.player-btn.play-pause {
    width: 64px;
    height: 64px;
    background-color: #4a75ff; /* Biru */
    color: white;
    font-size: 24px;
    border-radius: 50%;
}

.player-btn.play-pause:hover {
    background-color: #3a65e0;
}

.player-options {
    width: 30%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 12px;
    }
    
    .nav-item {
        display: inline-block;
        margin-right: 16px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .player-container {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .current-track, .player-options {
        width: 100%;
    }
    
    .current-track {
        justify-content: space-between;
    }
    
    .player-controls {
        order: 3;
        width: 100%;
    }
    
    .playback-info {
        justify-content: center;
    }
}

/* Player section */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #282828;
    padding: 12px 16px;
    border-top: 2px solid #FFD700; /* Aksen garis kuning nyala */
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    min-height: 80px;
}

.current-track {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0; /* Allow flex item to shrink */
    flex: 1;
    min-width: 200px;
    max-width: 30%;
}

.current-track img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.track-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.track-details h3 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.track-details p {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.track-details .like-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    margin-top: 4px;
    align-self: flex-start;
    flex-shrink: 0;
}

.track-details .like-btn:hover {
    color: #fff;
}

.track-details .like-btn.liked {
    color: #4a75ff;
}

.player-controls {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.player-btn {
    background-color: transparent;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.3s, background-color 0.3s;
    flex-shrink: 0;
}

.player-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.player-btn.play-pause {
    width: 56px;
    height: 56px;
    background-color: #4a75ff; /* Biru */
    color: white;
    font-size: 20px;
    border-radius: 50%;
}

.player-btn.play-pause:hover {
    background-color: #3a65e0;
    transform: scale(1.05);
}

.playback-info {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 0 8px;
}

.current-time, .total-time {
    font-size: 12px;
    color: #b3b3b3;
    min-width: 40px;
    text-align: center;
}

.progress-container {
    flex: 1;
    padding: 0 8px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #535353;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background-color: #b3b3b3;
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.player-options {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 120px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: #535353;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4a75ff;
    cursor: pointer;
}

/* Shuffle, repeat, and other controls */
.player-btn.shuffle.active,
.player-btn.repeat.active,
.player-btn.repeat-one.active {
    color: #4a75ff;
    background-color: rgba(74, 117, 255, 0.2);
}

/* Responsive design */
@media (max-width: 1024px) {
    .current-track {
        max-width: 40%;
    }
    
    .player-options {
        min-width: 100px;
    }
    
    .volume-container {
        max-width: 100px;
    }
    
    .volume-slider {
        width: 60px;
    }
}

@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        padding: 10px 12px;
        min-height: 100px;
    }
    
    .current-track {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .current-track img {
        width: 48px;
        height: 48px;
    }
    
    .player-controls {
        order: 2;
        width: 100%;
    }
    
    .player-buttons {
        gap: 12px;
    }
    
    .player-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .player-btn.play-pause {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .playback-info {
        padding: 0 4px;
    }
    
    .current-time, .total-time {
        min-width: 32px;
        font-size: 11px;
    }
    
    .progress-container {
        padding: 0 4px;
    }
    
    .player-options {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .volume-container {
        justify-content: center;
        max-width: 150px;
    }
    
    .volume-slider {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .player-container {
        padding: 8px;
    }
    
    .current-track img {
        width: 40px;
        height: 40px;
    }
    
    .track-details h3 {
        font-size: 13px;
    }
    
    .track-details p {
        font-size: 11px;
    }
    
    .player-buttons {
        gap: 8px;
    }
    
    .player-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .player-btn.play-pause {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .current-time, .total-time {
        font-size: 10px;
        min-width: 28px;
    }
    
    .volume-container {
        max-width: 120px;
    }
    
    .volume-slider {
        width: 80px;
    }
}