/**
 * Media Player Styles
 * Modern, responsive styling for the media player modal
 */

.media-player-modal {
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: #121212;
    color: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    transition: all 0.3s ease;
    width: 95%;
    max-width: 1400px;
    min-height: 600px;
}

/* ===== MINIMIZED PLAYER STYLES ===== */
.media-player-modal.minimized {
    top: auto;
    left: 20px;
    bottom: 20px;
    transform: none;
    width: 320px;
    max-width: 100%;
    height: auto;
    min-height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mini-player {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 8px;
}

.mini-album-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mini-album-cover:hover {
    transform: scale(1.05);
}

.mini-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.mini-player-controls {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mini-track-info {
    margin-bottom: 8px;
}

.mini-track-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.mini-album-title {
    font-size: 0.75rem;
    color: #a0a0a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-control-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.8rem;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.mini-control-btn:hover:not(:disabled) {
    color: #0d7f3e;
    background: rgba(255, 255, 255, 0.05);
}

.mini-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mini-control-btn.play-pause {
    color: #0d7f3e;
    font-size: 0.9rem;
}

/* ===== FULL PLAYER STYLES ===== */
.player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #0d7f3e 0%, #0a6030 100%);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.player-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-controls-header {
    display: flex;
    gap: 8px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

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

.header-btn.close-btn:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* ===== LAYOUT PANELS ===== */
.player-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.albums-panel,
.tracks-panel {
    width: 300px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.albums-panel {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.tracks-panel {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    width: 350px;
}

.now-playing-panel {
    flex: 1;
    background: #121212;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.panel-title {
    padding: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 127, 62, 0.2);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== ALBUMS LIST ===== */
.albums-list,
.tracks-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.albums-list::-webkit-scrollbar,
.tracks-list::-webkit-scrollbar {
    width: 8px;
}

.albums-list::-webkit-scrollbar-track,
.tracks-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.albums-list::-webkit-scrollbar-thumb,
.tracks-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.albums-list::-webkit-scrollbar-thumb:hover,
.tracks-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.album-item {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
}

.album-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.album-item.active {
    background: rgba(13, 127, 62, 0.3);
    border: 1px solid rgba(13, 127, 62, 0.6);
}

.album-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.album-info {
    flex: 1;
    min-width: 0;
}

.album-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-track-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== NOW PLAYING AREA ===== */
.current-album-compact {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 30px;
}

.album-artwork-small {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.album-artwork-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-artwork {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 2rem;
}

.album-details-compact {
    flex: 1;
    min-width: 0;
}

.current-album-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-track-title {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== PLAYER CONTROLS ===== */
.player-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.control-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover:not(:disabled) {
    transform: scale(1.1);
    color: #0d7f3e;
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.control-btn.active {
    color: #0d7f3e;
}

.control-btn i {
    font-size: 1.2rem;
}

.control-btn.main-play-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0d7f3e 0%, #0a6030 100%);
    box-shadow: 0 4px 12px rgba(13, 127, 62, 0.4);
}

.control-btn.main-play-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0f9347 0%, #0c7038 100%);
    box-shadow: 0 6px 16px rgba(13, 127, 62, 0.6);
    transform: scale(1.15);
    color: #fff;
}

.control-btn.main-play-btn i {
    font-size: 1.4rem;
}

.repeat-one {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    font-weight: bold;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    cursor: pointer;
    padding: 10px 0;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: height 0.2s ease;
}

.progress-container:hover .progress-bar {
    height: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d7f3e 0%, #0f9347 100%);
    border-radius: 10px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-container:hover .progress-fill::after {
    opacity: 1;
}

/* ===== TIME DISPLAY ===== */
.time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== VOLUME CONTROL ===== */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.volume-control i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.volume-control i:hover {
    color: #fff;
}

.volume-slider {
    width: 120px;
    cursor: pointer;
    padding: 8px 0;
}

.volume-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: height 0.2s ease;
}

.volume-slider:hover .volume-track {
    height: 6px;
}

.volume-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    transition: width 0.1s linear;
}

/* ===== TRACK LIST ===== */
.track-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.track-item.active {
    background: rgba(13, 127, 62, 0.3);
    border: 1px solid rgba(13, 127, 62, 0.6);
}

.track-number {
    width: 30px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-right: 10px;
    font-weight: 500;
}

.track-item.active .track-number {
    color: #0d7f3e;
    font-weight: 700;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.track-status {
    font-size: 0.75rem;
    color: #0d7f3e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.track-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.track-item:hover .track-actions {
    opacity: 1;
}

.track-item.active .track-actions {
    opacity: 1;
    color: #0d7f3e;
}

.track-play-btn,
.track-indicator {
    padding: 4px;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state p {
    font-size: 0.9rem;
}

.no-tracks {
    text-align: center;
    padding: 40px 20px;
}

.no-tracks p {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .media-player-modal {
        max-width: 95%;
    }

    .albums-panel,
    .tracks-panel {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .media-player-modal {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .player-content {
        flex-direction: column;
    }

    .albums-panel,
    .tracks-panel {
        width: 100%;
        max-height: 200px;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .now-playing-panel {
        padding: 20px;
    }

    .volume-control {
        display: none;
    }
}

@media (max-width: 576px) {
    .media-player-modal.minimized {
        left: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: 280px;
    }

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

    .current-album-compact {
        padding: 15px;
    }

    .album-artwork-small {
        width: 70px;
        height: 70px;
    }

    .current-album-title {
        font-size: 1.1rem;
    }

    .current-track-title {
        font-size: 0.9rem;
    }
}
