video {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

/* Nicht-blockierender Lade-Indikator (iOS-Gesetz 1.2: pointer-events: none) */
.mc-video-loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none !important;
    z-index: 8;
}

/* Zentraler Play-Button bei pausiertem Video / Safari Autoplay-Sperre */
.mc-video-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: var(--v8-primary, rgba(56, 177, 56, 0.9));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.mc-video-center-play span {
    font-size: 38px;
    margin-left: 3px;
}

.mc-video-center-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Fehler- & Retry-Overlay */
.mc-video-error-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 15;
}

.mc-video-error-card {
    max-width: 420px;
    background: rgba(20, 24, 33, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
}

/* Container für die gesamte Steuerung (Overlay) */
.video-overlay-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease, bottom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Fade-In und Fade-Out Klassen für Autohide */
.video-overlay-controls.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none; /* Keine Klicks durchlassen, wenn unsichtbar */
}

.video-overlay-controls.fade-in {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Neue Progressbar Styles */
.progress-box-new {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.1s ease;
}

.progress-box-new:hover {
    height: 8px;
}

.loading-bar-new {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 3px;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    background-color: var(--v8-primary, #38b138);
    border-radius: 3px;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.1s ease;
}

.progress-box-new:hover .progress-bar-fill::after {
    transform: translateY(-50%) scale(1);
}

/* Steuerungstasten */
.control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 !important;
}

.control-btn span {
    font-size: 20px;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.05);
}

/* Schließen Button */
.close-btn {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: #ff6b6b !important;
    width: auto !important;
    height: 38px !important;
    padding: 0 16px !important; /* Genügend Abstand links und rechts */
    gap: 6px; /* Angenehmer Abstand zwischen X und Text */
}

.close-btn:hover {
    background-color: rgba(220, 53, 69, 0.35) !important;
    border-color: rgba(220, 53, 69, 0.6) !important;
    color: #ffffff !important;
}

.video-time-display {
    letter-spacing: 0.5px;
}

.controls-row {
    padding-right: 90px !important;
}

@media only screen and (max-width: 776px) {
    .controls-row {
        padding-right: 16px !important;
    }
}