/* Контейнер плеера */
.player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    user-select: none;
}

.player video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player.screen-img {
    width: 100% !important;
    max-width: 360px !important;
}

/* Центральная кнопка Play / Pause (скрывается при воспроизведении) */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%) scale(1.05);
    border-color: #fff;
}

/* SVG-иконка внутри кнопки */
.play-btn svg {
    display: block;
    width: 40px;
    height: 40px;
    fill: #fff;
}

/* Нижняя панель управления (прогресс + полноэкранный) */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.player:hover .controls,
.player:focus-within .controls,
.player.fullscreen .controls {
    opacity: 1;
    pointer-events: auto;
}

/* Прогресс-бар */
.progress {
    flex: 1;
    height: 14px;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border-radius: 2px;
    outline: none;
    transition: height 0.2s;
    cursor: pointer;
}

.progress::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.progress::-webkit-slider-thumb {
    margin-top: -5px;
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.15s;
}

.progress::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* Кнопка полноэкранного режима */
.fullscreen-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
