@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap');

:root {
    --player-accent: #00ff73;
    --player-buffer: rgba(255, 255, 255, 0.3);
}

.player-container {
    position: relative;
    background: #000;
    font-family: "Google Sans", sans-serif;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    outline: none;
    user-select: none;
}

.player-video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }

.player-container:not(.is-started) .player-controls,
.player-container:not(.is-started) .player-anim-overlay,
.player-container:not(.is-started) .player-loader {
    display: none !important;
}

.player-big-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90px; height: 90px;
    background: var(--player-accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    z-index: 200; cursor: pointer; transition: transform 0.2s;
}
.player-big-play img { width: 40px; height: 40px; }
.player-container.is-started .player-big-play { display: none; }

.player-loader {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px; border: 6px solid rgba(255,255,255,0.2);
    border-top-color: var(--player-accent); border-radius: 50%;
    z-index: 60; display: none; animation: player-spin 0.8s linear infinite;
}
.player-container.is-waiting .player-loader { display: block; }

.player-anim-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90px; height: 90px; background: rgba(0,0,0,0.5); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; z-index: 150;
}
.player-anim-overlay.run { animation: player-pop 0.5s ease-out; }

.player-preview {
    position: absolute; bottom: 70px; transform: translateX(-50%);
    display: none; flex-direction: column; align-items: center; z-index: 110;
}
.player-preview video { width: 170px; aspect-ratio: 16/9; border: 2px solid #fff; border-radius: 8px; background: #000; }
.player-preview-time { margin-top: 5px; background: rgba(0,0,0,0.85); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 13px; }

.player-controls {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; /* Больше отступы */
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    z-index: 100; transition: opacity 0.3s;
}
.player-container:not(.ui-active) .player-controls { opacity: 0; pointer-events: none; }

.player-progress-area {
    height: 6px; background: rgba(255,255,255,0.2); cursor: pointer;
    margin-bottom: 20px; position: relative; display: flex; align-items: center;
    touch-action: none;
}
.player-buffer-bar { position: absolute; height: 100%; background: var(--player-buffer); width: 0; z-index: 1; }
.player-progress-fill { position: absolute; height: 100%; background: var(--player-accent); width: 0; z-index: 2; }

.player-progress-knob {
    position: absolute; 
    right: -10px; 
    top: 50%;
    transform: translateY(-50%);
    width: 20px; 
    height: 20px; 
    background: #fff;
    border-radius: 50%; 
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
    z-index: 3;
}

.player-row { display: flex; align-items: center; gap: 20px; }
.player-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; transition: 0.2s; }
.player-btn:hover { transform: scale(1.1); }
.player-btn img { width: 28px; height: 28px; }

.player-vol-box { display: flex; align-items: center; gap: 10px; }
.player-vol-slider { 
    width: 0; opacity: 0; transition: 0.3s; cursor: pointer; 
    accent-color: #ffffff; 
}
.player-vol-box:hover .player-vol-slider { width: 90px; opacity: 1; }

.player-time { color: #fff; font-size: 15px; min-width: 120px; font-weight: 500; }

.player-menu {
    position: absolute; bottom: 75px; right: 20px; background: rgba(20,20,20,0.95);
    border-radius: 10px; padding: 10px 0; min-width: 180px; display: none; flex-direction: column;
}
.player-menu.open { display: flex; }
.player-menu-item { padding: 12px 18px; color: #fff; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; }
.player-menu-item:hover { background: rgba(255,255,255,0.1); }
.player-menu-item.header { color: var(--player-accent); border-bottom: 1px solid #333; font-weight: bold; }

@keyframes player-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes player-pop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

@media (max-width: 800px) {
    .player-btn .btn-pip { display: none !important; }
    .player-progress-area { height: 5px; }
    .player-progress-knob { width: 18px; height: 18px; right: -12px; }
    .player-btn img { width: 32px; height: 32px; }
    .player-row { gap: 15px; }
}