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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #151515;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.maxi-player {
    background: #252a34;
    border-radius: 8px;
    width: 100%;
    height: 630px;
    display: flex;
    overflow: hidden;
}

.playlist-panel {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.sort-controls {
    display: flex;
    gap: 4px;
}

.sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #888;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.sort-btn.active {
    background: rgba(255, 0, 82, 0.3);
    color: #fff;
}

.playlist {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.playlist-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background: rgba(255, 0, 82, 0.2);
}

.playlist-item-num {
    color: #666;
    font-size: 0.7rem;
    min-width: 18px;
}

.playlist-item.active .playlist-item-num {
    color: #FF0052;
}

.playlist-item-main {
    flex: 1;
    min-width: 0;
}

.playlist-item-title {
    color: #ccc;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item.active .playlist-item-title {
    color: #fff;
}

.playlist-item-meta {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.playlist-item-date,
.playlist-item-party {
    color: #666;
    font-size: 0.65rem;
}

.playlist-item.active .playlist-item-date,
.playlist-item.active .playlist-item-party {
    color: #888;
}

.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.playlist::-webkit-scrollbar-thumb {
    background: #88E277;
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: #99ee88;
}

.player-panel {
    width: 350px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.track-display {
    text-align: center;
    margin-bottom: 10px;
}

.track-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 0 8px #88E277, 0 0 16px #88E277, 0 0 24px #88E277;
}

.track-info {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.info-row {
    color: #999;
    font-size: 0.75rem;
    padding: 2px 0;
    display: flex;
    justify-content: space-between;
}

.info-row.hidden {
    display: none;
}

.info-row .info-label {
    color: #888;
}

.info-row .info-value {
    color: #ccc;
}

.main-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ctrl-btn.active {
    color: #FF0052;
}

.play-btn {
    width: 44px;
    height: 44px;
    background: #FF0052;
    font-size: 1.1rem;
}

.play-btn:hover {
    background: #ff3377;
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.time {
    color: #999;
    font-size: 0.75rem;
    min-width: 35px;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #363d4a;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background:
        linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 40%, rgba(0,0,0,0.2) 100%),
        repeating-linear-gradient(
            -45deg,
            #88E277,
            #88E277 10px,
            #5a9e4a 10px,
            #5a9e4a 20px
        );
    background-size: 100% 100%, 28px 28px;
    animation: stripeMove 2.4s linear infinite;
}

@keyframes stripeMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, 28px 28px; }
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.volume-btn {
    font-size: 1rem;
    width: 36px;
    height: 36px;
}

.volume-bar {
    flex: 1;
    height: 6px;
    background: #363d4a;
    border-radius: 3px;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: #FF0052;
    border-radius: 3px;
    width: 100%;
}

.download-btn {
    background: #FF0052;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.2s;
    text-align: center;
    margin-top: auto;
}

.download-btn:hover {
    background: #ff3377;
}

.party-image-container {
    margin-top: auto;
    border-radius: 6px;
    overflow: hidden;
    display: none;
}

.party-image-container.visible {
    display: block;
}

.party-image {
    width: 100%;
    height: auto;
    display: block;
}

.error-msg {
    color: #FF0052;
    text-align: center;
    font-size: 0.9rem;
}

.error-msg code {
    background: rgba(255, 0, 82, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .maxi-player {
        flex-direction: column;
    }

    .playlist-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .player-panel {
        width: 100%;
    }
}
