/* ============================================
   PLAYER BAR - ИСПРАВЛЕННОЕ РАСПОЛОЖЕНИЕ
   ============================================ */

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    z-index: 2000;
}

/* Контейнер - на всю ширину */
.player-container {
    width: 100%;
    padding: 8px 20px;
    box-sizing: border-box;
}

/* Прогресс-бар - на всю ширину */
.player-progress-area {
    width: 100%;
    margin-bottom: 8px;
}

.player-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.5);
}

.player-progress-bar {
    flex: 1;
    position: relative;
    cursor: pointer;
    padding: 6px 0;
}

.player-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    transition: height 0.2s;
}

.player-progress-bar:hover .player-progress-track {
    height: 5px;
}

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

/* Основная панель */
.player-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

/* Левая часть - информация о треке */
.player-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Винил */
.player-vinyl {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    cursor: pointer;
}

.player-vinyl-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    box-shadow: 0 0 0 2px #444, 0 0 0 4px #222;
    transition: transform 0.1s linear;
    will-change: transform;
    position: relative;
}

.player-vinyl-disc::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b38f00);
    z-index: 3;
}

.player-vinyl-cover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.player-track-text {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

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

.player-track-artist {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: color 0.2s;
}

.player-track-artist:hover {
    color: #ffd700;
}

/* Центральная часть - кнопки управления плеером */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

.player-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.player-btn:hover {
    color: #ffd700;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.player-btn.active {
    color: #ffd700;
}

.player-btn-play {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Правая часть - кнопки лайк, дизлайк, очередь и громкость */
.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* Группа кнопок лайк, дизлайк, очередь */
.player-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 40px;
}

.player-actions-group .player-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.player-actions-group .player-btn.liked {
    color: #ff4b4b;
}

.player-actions-group .player-btn.disliked {
    color: #ff4b4b;
}

/* Громкость */
.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 40px;
}

.player-volume-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    transition: all 0.2s;
}

.player-volume-btn:hover {
    color: #ffd700;
}

.player-volume-slider {
    width: 80px;
    cursor: pointer;
    padding: 6px 0;
}

.player-volume-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
}

.player-volume-fill {
    height: 100%;
    width: 70%;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    border-radius: 2px;
    transition: width 0.1s;
}

.player-volume-value {
    font-size: 10px;
    font-family: monospace;
    color: #ffd700;
    min-width: 36px;
    text-align: right;
}

/* Бейдж очереди */
.player-queue-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ffd700;
    color: #000;
    font-size: 9px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.player-btn {
    position: relative;
}

/* Адаптив */
@media (max-width: 768px) {
    .player-actions-group {
        padding: 4px 8px;
    }
    
    .player-actions-group .player-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .player-volume {
        padding: 4px 8px;
    }
    
    .player-volume-slider {
        width: 60px;
    }
}

@media (max-width: 550px) {
    .player-actions-group {
        display: none;
    }
}
/* ============================================
   УЗКОЕ ОКНО / ПЛАНШЕТ
   На 900-1100 px все элементы плеера не влезают
   в одну строку и наезжают друг на друга.
   ============================================ */
@media (max-width: 1100px) {
    .player-container {
        padding: 8px 12px;
    }

    .player-main {
        gap: 8px;
    }

    .player-controls {
        gap: 8px;
        padding: 5px 12px;
        flex-shrink: 0;
    }

    .player-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .player-btn-play {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    /* Перемешивание и повтор остаются в расширенном плеере и на клавишах */
    #playerShuffleBtn,
    #playerRepeatBtn {
        display: none;
    }

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

    .player-vinyl {
        width: 38px;
        height: 38px;
    }

    .player-track-title {
        font-size: 13px;
    }

    .player-right {
        flex: 0 0 auto;
        gap: 6px;
    }

    .player-volume {
        padding: 4px 6px;
    }

    /* Громкость — кнопкой; ползунок доступен в расширенном плеере */
    .player-volume-slider,
    .player-volume-value {
        display: none;
    }

    .player-extra {
        gap: 2px;
        margin-left: 0;
    }

    .player-extra .player-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    #playerDislikeBtn {
        display: none;
    }

    .player-time {
        font-size: 10px;
        gap: 8px;
    }
}

@media (max-width: 700px) {
    .player-track-info {
        flex: 1 1 auto;
    }

    .player-right {
        display: none;
    }

    .player-controls {
        gap: 4px;
        padding: 4px 10px;
    }

    .player-btn {
        width: 32px;
        height: 32px;
    }

    .player-btn-play {
        width: 40px;
        height: 40px;
    }
}

/* Клик по информации о треке открывает большой плеер */
.player-track-info {
    cursor: pointer;
}

.player-track-info:hover .player-track-title {
    color: var(--accent);
}

/* Артист — только по самому тексту, остальная область открывает плеер */
.player-track-artist {
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100% !important;
}

.player-track-text {
    cursor: pointer;
}

.player-track-title {
    cursor: pointer;
}

.player-main {
    cursor: pointer;
}

.player-controls,
.player-right,
.player-volume,
.player-extra {
    cursor: default;
}

.player-artist-link {
    cursor: pointer;
    transition: color 0.2s ease;
}

.player-artist-link:hover {
    color: var(--accent);
}
