

.videos {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    box-shadow: rgba(34, 34, 34, 0.9) 0px 0px 9.42px 9.42px;
    background: #000;
    border-radius: 5px;
    overflow: hidden;
}

.video-container {
    position: relative;
    flex: 1;
    background: #000;
}



/* Скрываем стандартные элементы управления */
video::-webkit-media-controls {
    display: none !important;
}

/* Кастомная панель управления */
.custom-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    min-height: 70px;
    box-sizing: border-box;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Прогресс-бар с главами */
.progress-container {
    position: relative;
    flex-grow: 1;
    height: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
   /* overflow: hidden;*/
    margin: 0 10px;
    min-height: 40px;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: transparent;
}

.chapter-segment {
    height: 100%;
    position: relative;
    flex-grow: 1;
    transition: all 0.3s;
    cursor: pointer;
}

.chapter-segment:hover {
    opacity: 0.8;
}

.chapter-segment.watched {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.6));
}

.chapter-segment.current {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.5), rgba(33, 150, 243, 0.7));
}

.chapter-segment.future {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
}

.segment-divider {
    position: absolute;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.segment-divider.left {
    left: 0;
}

.segment-divider.right {
    right: 0;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff444477, #ff000077);
    width: 0%;
    z-index: 2;
    pointer-events: none;
    bottom: auto;
    border-radius: 0;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #ff0000;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
    display: block;
}

.chapter-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    z-index: 4;
    pointer-events: none;
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
    box-sizing: border-box;
}

.chapter-marker.current {
    color: #f8ef02;
    font-weight: bold;
    font-size: 12px;
}

.time-display {
    color: white;
    font-family: monospace;
    font-size: 16px;
    min-width: 120px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 3px;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-filled {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 100%;
    border-radius: 2px;
}

/* Стили для интерактивных кнопок */
.interactive-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.interactive-title {
    color: #f8ef02;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    padding: 0 20px;
    text-shadow: rgb(0, 0, 0) -1px -1px 0px, rgb(255, 255, 255) 1px 1px 3px;
    font-family: Arial, sans-serif;
}

.interactive-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    width: 90%;
}
.interactive-btn.visited {
    background-color: #cccccc;
    color: #666666;
    border-color: #999999;
    opacity: 0.8;
}

.interactive-btn.visited:hover {
    background-color: #bbbbbb;
    border-color: #888888;
}
.interactive-btn {
    background: linear-gradient(135deg, rgba(248, 239, 2, 0.1), rgba(248, 239, 2, 0.05));
    border: 2px solid #f8ef02;
    color: white;
    padding: 18px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    text-align: center;
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.interactive-btn:hover {
    background: linear-gradient(135deg, rgba(248, 239, 2, 0.2), rgba(248, 239, 2, 0.15));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(248, 239, 2, 0.3);
}

video {
    width: 100%;
    object-fit: contain;
    background-color: #000;
}

/* Стиль для состояния загрузки */
.video-container.loading video {
    opacity: 0.7;
}

.video-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid #f8ef02;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {



    .custom-controls {
        padding: 10px;
        gap: 10px;
        flex-wrap: wrap;
        min-height: 90px;
    }

    .progress-container {
        order: 1;
        flex-basis: 100%;
        margin: 5px 0;
    }

    .control-btn {
        font-size: 20px;
        min-width: 35px;
    }

    .time-display {
        font-size: 14px;
        min-width: 100px;
    }

    .interactive-title {
        font-size: 22px;
    }

    .interactive-btn {
        padding: 15px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .volume-container {
        display: none;
    }

    .chapter-marker {
        display: none;
    }

    .interactive-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .interactive-btn {
        padding: 12px;
        font-size: 14px;
    }
}


/* Модальное окно предупреждения */
.alertBg {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    overflow-y: scroll;
}

.modal-alert {
    background: #1a1a1a;
    border: 2px solid #8b0000;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    padding: 30px;
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.5);
    text-align: center;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-alert h2 {
    color: #ff4444;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.modal-alert p {
    color: #e0e0e0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-alert .warning-text {
    color: #ff9900;
    font-weight: bold;
    font-size: 20px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 153, 0, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ff9900;
}

.modal-alert .responsibility-text {
    color: #ff4444;
    font-size: 16px;
    font-style: italic;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.confirm-btn {
    background: linear-gradient(135deg, #8b0000, #a50000);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    min-width: 250px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(139, 0, 0, 0.4);
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #a50000, #cc0000);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.6);
}

.confirm-btn:active {
    transform: translateY(0);
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .modal-alert {
        padding: 20px;
    }

    .modal-alert h2 {
        font-size: 24px;
    }

    .modal-alert p {
        font-size: 16px;
    }

    .confirm-btn {
        padding: 16px 30px;
        font-size: 18px;
        min-width: 200px;
    }
}
.interactive-marker {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 12px;
    background-color: #ff4081;
    border: 2px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s, background-color 0.2s;
}

.interactive-marker:hover {
    transform: translateX(-50%) scale(1.3);
    background-color: #ff79b0;
}

.interactive-marker::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.interactive-marker:hover::after {
    opacity: 1;
    visibility: visible;
}
#failsSection{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}
.eachFail{
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #333;
    height: 180px;
    transform: translateY(0px);
    animation: fadeIn 0.5s ease forwards;
}
.eachFail:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: #8b0000;
}
.eachFail img{
    position: absolute;
    width: 100%;
    object-fit: cover; /* обрезает изображение, сохраняя пропорции */
    display: block;
    overflow-clip-margin: content-box;
    overflow: clip;
    cursor: pointer;
    height: 180px;
}
.bad-scene-overlay-container {
    will-change: transform, width, height, top, left;
}

.fail-close-btn:hover {
    background: rgba(255, 0, 0, 1) !important;
    transform: scale(1.1) !important;
}

.fail-video-player {
    transition: opacity 0.3s ease, object-fit 0.5s ease !important;
}

/* Стилизация контролов видео */
.fail-video-player::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.7);
}

.fail-video-player::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease;
}
