/* ===================================
   Video Player Modal
   Vollbild-Player mit App-Feeling
   =================================== */

/* Modal Overlay */
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-modal.active {
    display: flex;
    opacity: 1;
}

/* Video Container - Kein Padding, Full Screen */
.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

/* Video Element */
.modal-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

/* ===================================
   TAP TO PLAY OVERLAY (Deep-Link only)
   =================================== */

.tap-to-play-overlay {
    position: fixed; /* GEÄNDERT: fixed statt absolute */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none; /* Default hidden */
    align-items: center;
    justify-content: center;
    z-index: 10005; /* Über Video, unter Close-Button */
    cursor: pointer;
}

.tap-to-play-content {
    text-align: center;
}

.tap-play-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.25);
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    animation: pulseIcon 2s ease-in-out infinite;
}

.tap-to-play-overlay:hover .tap-play-icon {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.tap-play-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   Desktop Navigation Arrows
   =================================== */

.video-nav-arrows {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 10001;
    pointer-events: none;
}

.nav-arrow {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto;
    opacity: 0.6;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transform: scale(1.1);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow-up {
    margin-bottom: 40px;
}

.nav-arrow-down {
    margin-top: 40px;
}

/* Auf Mobile verstecken */
@media (max-width: 1024px) {
    .video-nav-arrows {
        display: none;
    }
}

/* ===================================
   Vertical Action Bar - Rechts
   =================================== */

.video-action-bar {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10002;
}

.action-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    padding: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.action-bar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.action-bar-btn:active {
    transform: scale(0.95);
}

.action-bar-btn.active {
    background: rgba(59, 130, 246, 0.8);
    border-color: rgba(59, 130, 246, 1);
}

/* Like Button - Special Styling */
.action-bar-btn#actionLikeBtn.active {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 1);
}

.action-bar-btn#actionLikeBtn.active .action-icon {
    fill: currentColor;
    animation: heart-beat 0.3s ease;
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Favorite Button - Special Styling */
.action-bar-btn#actionFavoriteBtn.active {
    background: rgba(251, 191, 36, 0.8);
    border-color: rgba(251, 191, 36, 1);
}

.action-bar-btn#actionFavoriteBtn.active .action-icon {
    fill: currentColor;
}

/* Icon Styling */
.action-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: all 0.2s ease;
}

/* Count Badge */
.action-count {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    border: 2px solid #000;
}

.action-count:empty {
    display: none;
}

/* Label (für Share, Favorite, Download) */
.action-label {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.action-bar-btn:hover .action-label {
    opacity: 1;
}

/* Close Button - Oben Rechts */
.video-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010; /* Über allem */
    transition: all 0.2s ease;
}

.video-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-close-btn:active {
    transform: scale(0.95);
}

.video-close-btn svg {
    width: 24px;
    height: 24px;
}

/* Creator Logo - Oben Links */
.video-creator-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    padding: 8px;
    z-index: 10002;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-creator-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Video Info Overlay - Unten */
.video-info-overlay {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 20px 20px;
    z-index: 10001;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.video-info-overlay.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.video-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.video-stats {
    display: flex;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 15px;
}

.video-stats span::after {
    content: '•';
    margin-left: 12px;
    opacity: 0.5;
}

.video-stats span:last-child::after {
    display: none;
}

/* Video Actions */
.video-actions {
    display: flex;
    gap: 15px;
    pointer-events: auto;
}

.video-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.video-action-btn:active {
    transform: scale(0.95);
}

.video-action-btn span:first-child {
    font-size: 1.25rem;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .video-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .video-creator-logo {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
        padding: 6px;
    }
    
    /* Action Bar - Kleiner auf Mobile */
    .video-action-bar {
        right: 10px;
        gap: 15px;
    }
    
    .action-bar-btn {
        width: 48px;
        height: 48px;
        padding: 8px;
    }
    
    .action-icon {
        width: 20px;
        height: 20px;
    }
    
    .action-count {
        font-size: 0.5625rem;
        padding: 1px 4px;
        min-width: 16px;
        bottom: -6px;
        right: -6px;
    }
    
    .action-label {
        display: none; /* Verstecke Labels auf Mobile */
    }
    
    .video-info-overlay {
        bottom: 60px;
        left: 10px;
        right: 10px;
        padding: 20px 10px 10px;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .video-stats {
        font-size: 0.8125rem;
    }
    
    .video-action-btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
    
    /* Tap to Play - Kleiner auf Mobile */
    .tap-play-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
    
    .tap-play-text {
        font-size: 1rem;
    }
}

/* Verhindere Scrollen wenn Modal offen */
body.modal-open {
    overflow: hidden;
}

/* Safe Area Support für Notch Geräte */
@supports (padding: env(safe-area-inset-top)) {
    .video-close-btn {
        top: calc(20px + env(safe-area-inset-top));
    }
    
    .video-creator-logo {
        top: calc(20px + env(safe-area-inset-top));
    }
    
    .video-info-overlay {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Loading Spinner (optional) */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10000;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}



