/* Music Player V2 - Premium Bright Theme */
.mp-pro-container {
    background: #ffffff;
    /* Bright theme background */
    color: #1c1c1e;
    border-radius: 16px;
    padding: 24px;
    font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    max-width: 480px;
    margin: 20px auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.mp-pro-container * {
    box-sizing: border-box;
}

.mp-pro-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mp-pro-art {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 24px auto;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    /* Soft shadow for premium look */
    overflow: hidden;
}

.mp-pro-cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f5;
    transition: background-image 0.4s ease-in-out;
}

.mp-pro-details {
    text-align: left;
    width: 100%;
    margin-bottom: 20px;
}

.mp-pro-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #1c1c1e;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress Bar */
.mp-pro-controls-wrapper {
    width: 100%;
}

.mp-pro-progress-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #86868b;
    margin-bottom: 12px;
    gap: 10px;
}

.mp-pro-progress-bar {
    flex-grow: 1;
    height: 6px;
    background: #e5e5ea;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.mp-pro-progress-bar:hover .mp-pro-progress-fill {
    background: #007aff;
    /* iOS Blue highlight on hover */
}

.mp-pro-progress-bar:hover .mp-pro-progress-handle {
    opacity: 1;
}

.mp-pro-progress-fill {
    height: 100%;
    background: #1c1c1e;
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
    transition: background 0.2s;
}

.mp-pro-progress-handle {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    left: 0%;
}

/* Controls */
.mp-pro-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
}

.mp-btn {
    background: none;
    border: none;
    color: #a1a1a6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mp-btn:hover {
    color: #1c1c1e;
    transform: scale(1.1);
}

.mp-btn:active {
    transform: scale(0.9);
}

.mp-play-btn {
    color: #fff;
    background: #1c1c1e;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.mp-play-btn:hover {
    transform: scale(1.08);
    color: #fff;
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.mp-play-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mp-shuffle-btn.active,
.mp-loop-btn.active {
    color: #1db954;
    /* Active green state */
    position: relative;
    transform: scale(1.1);
}

.mp-shuffle-btn.active:hover,
.mp-loop-btn.active:hover {
    color: #1ed760;
    /* Brighter green on hover */
    transform: scale(1.15);
}

.mp-shuffle-btn.active::after,
.mp-loop-btn.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #1db954;
    transition: background-color 0.25s;
}

.mp-shuffle-btn.active:hover::after,
.mp-loop-btn.active:hover::after {
    background-color: #1ed760;
}

.mp-loop-btn.active-one {
    color: #1db954;
}

.mp-loop-btn.active-one::after {
    content: '1';
    position: absolute;
    font-size: 9px;
    font-weight: 800;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #121212;
    background: none;
    width: auto;
    height: auto;
}

/* Queue List */
.mp-pro-queue-section {
    margin-top: 24px;
    border-top: 1px solid #e5e5ea;
    padding-top: 16px;
}

.mp-pro-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mp-pro-queue-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1e;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mp-collapse-btn {
    background: none;
    border: none;
    color: #a1a1a6;
    cursor: pointer;
    padding: 8px;
    /* Larger touch area */
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    margin-right: -4px;
    /* offset padding */
    -webkit-tap-highlight-color: transparent;
}

.mp-collapse-btn:hover {
    color: #1c1c1e;
    background: rgba(0, 0, 0, 0.05);
}

.mp-collapse-btn.collapsed {
    transform: rotate(180deg);
}

.mp-pro-queue-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease-in-out;
}

.mp-pro-queue-list.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
}

.mp-pro-queue-list::-webkit-scrollbar {
    width: 6px;
}

.mp-pro-queue-list::-webkit-scrollbar-track {
    background: transparent;
}

.mp-pro-queue-list::-webkit-scrollbar-thumb {
    background: #c7c7cc;
    border-radius: 3px;
}

.mp-pro-queue-list::-webkit-scrollbar-thumb:hover {
    background: #aeaeb2;
}

.mp-queue-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.mp-queue-item:hover {
    background: #f2f2f7;
    transform: translateX(4px);
}

.mp-queue-item.playing {
    background: #e5e5ea;
}

.mp-queue-item.playing .mp-q-title {
    color: #007aff;
}

.mp-q-cover {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f5;
    margin-right: 12px;
    flex-shrink: 0;
}

.mp-q-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mp-q-title {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

/* --- V3 DESKTOP LAYOUT OVERHAUL --- */
@media (min-width: 769px) {
    .mp-pro-container {
        display: flex;
        flex-direction: row;
        max-width: 900px;
        padding: 0;
        height: 450px;
        /* Fixed height forces scroll internally */
        background: linear-gradient(135deg, #ffffff 0%, #f4f5f7 100%);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(0, 0, 0, 0.06);
    }

    .mp-pro-main {
        flex: 1;
        /* Take up remaining space */
        padding: 32px 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mp-pro-art {
        max-width: 250px;
        aspect-ratio: 1 / 1;
        margin-bottom: 30px;
    }

    .mp-pro-queue-section {
        width: 320px;
        margin-top: 0;
        border-top: none;
        border-left: 1px solid rgba(0, 0, 0, 0.06);
        background: #ffffff;
        padding: 32px 24px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        /* Prevent parent expanding */
    }

    .mp-pro-queue-list {
        max-height: 100%;
        flex-grow: 1;
        overflow-y: auto;
    }

    /* Hide the collapse button on desktop since we have space */
    .mp-collapse-btn {
        display: none;
    }
}

/* Responsive adjustments - Mobile Polish */
@media (max-width: 480px) {
    .mp-pro-container {
        padding: 20px 16px;
        border-radius: 20px;
        max-width: 100%;
        margin: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        /* soft bright shadow */
        border: 1px solid rgba(0, 0, 0, 0.06);
    }

    .mp-pro-art {
        max-width: 100%;
        margin-bottom: 20px;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
        /* soft shadow */
    }

    .mp-pro-cover {
        border-radius: 12px;
    }

    .mp-pro-details {
        text-align: left;
        margin-bottom: 24px;
        padding: 0 5px;
    }

    .mp-pro-title {
        font-size: 22px;
        margin-bottom: 6px;
        letter-spacing: -0.5px;
    }

    .mp-pro-artist {
        font-size: 15px;
        opacity: 0.8;
    }

    .mp-pro-progress-area {
        padding: 0 5px;
        margin-bottom: 18px;
    }

    .mp-pro-progress-bar {
        height: 6px;
        /* slightly thicker for mobile touch */
    }

    .mp-pro-progress-handle {
        width: 14px;
        /* easier to grab */
        height: 14px;
        opacity: 1;
        /* always show handle on mobile */
    }

    .mp-pro-buttons {
        padding: 0;
    }

    .mp-btn {
        padding: 10px;
        /* larger touch target */
    }

    .mp-play-btn {
        width: 64px;
        /* prominent play button */
        height: 64px;
    }

    .mp-play-btn svg {
        width: 32px;
        height: 32px;
    }

    .mp-pro-queue-section {
        margin-top: 28px;
        padding-top: 20px;
    }

    .mp-queue-item {
        padding: 10px 8px;
        /* more breathing room between tracks */
    }

    .mp-q-cover {
        width: 52px;
        height: 52px;
        border-radius: 6px;
        margin-right: 14px;
    }

    .mp-q-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .mp-q-artist {
        font-size: 13px;
        opacity: 0.8;
    }
}