/* ByTamer TUBE Custom Player */
.bytamer-player {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Poppins', -apple-system, sans-serif;
}

.bp-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.bp-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bp-video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bp-video-frame iframe {
    pointer-events: none !important;
}

/* Watermark */
.bp-watermark {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 30;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.bp-wm-text {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.bp-wm-by {
    color: #8b5cf6;
}

/* Top Gradient - YouTube logo gizleme */
.bp-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    z-index: 20;
    pointer-events: none;
}

/* Center Play Button */
.bp-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bp-play-circle {
    width: 80px;
    height: 80px;
    background: rgba(139, 92, 246, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
    transition: all 0.3s ease;
}

.bp-center-play:hover .bp-play-circle {
    transform: scale(1.1);
    background: rgba(139, 92, 246, 1);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
}

.bp-play-circle svg {
    width: 36px;
    height: 36px;
    color: #fff;
    margin-left: 4px;
}

/* Click Overlay */
.bp-click-overlay {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 60px;
    z-index: 22;
    cursor: pointer;
}

/* Controls */
.bp-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    padding: 20px 16px 14px;
    transition: all 0.3s ease;
}

/* Progress Bar */
.bp-progress-bar {
    position: relative;
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 12px;
}

.bp-progress-bar:hover {
    height: 7px;
}

.bp-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.bp-progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
    left: 0%;
}

.bp-progress-bar:hover .bp-progress-handle {
    opacity: 1;
}

/* Controls Row */
.bp-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-left-controls,
.bp-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.bp-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-btn:hover {
    background: rgba(255,255,255,0.15);
}

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

/* Time */
.bp-time {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bp-separator {
    color: rgba(255,255,255,0.5);
}

.bp-duration {
    color: rgba(255,255,255,0.7);
}

/* Fullscreen */
.bp-wrapper:fullscreen {
    padding-bottom: 0;
    height: 100vh;
}

.bp-wrapper:fullscreen .bp-video-container,
.bp-wrapper:fullscreen .bp-video-frame,
.bp-wrapper:fullscreen .bp-video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bp-wrapper:fullscreen .bp-play-circle {
    width: 100px;
    height: 100px;
}

.bp-wrapper:fullscreen .bp-play-circle svg {
    width: 44px;
    height: 44px;
}

.bp-wrapper:fullscreen .bp-controls {
    padding: 30px 24px 20px;
}

.bp-wrapper:fullscreen .bp-btn svg {
    width: 28px;
    height: 28px;
}

.bp-wrapper:fullscreen .bp-time {
    font-size: 15px;
}

/* Responsive */
@media (max-width: 640px) {
    .bp-watermark {
        padding: 6px 10px;
        top: 10px;
        left: 10px;
    }
    
    .bp-wm-text {
        font-size: 12px;
    }
    
    .bp-play-circle {
        width: 60px;
        height: 60px;
    }
    
    .bp-play-circle svg {
        width: 28px;
        height: 28px;
    }
    
    .bp-controls {
        padding: 15px 12px 10px;
    }
    
    .bp-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .bp-time {
        font-size: 12px;
    }
}

/* Shorts Player - Dikey Format */
.shorts-video-frame .bp-wrapper {
    padding-bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
}

.shorts-video-frame .bp-video-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

.shorts-video-frame .bp-video-container iframe,
.shorts-video-frame .bp-video-frame {
    width: 100% !important;
    height: 100% !important;
}

/* Shorts Player Override - Tam Boyut */
.shorts-video-frame .bytamer-player {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.shorts-video-frame .bp-wrapper {
    padding-bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
    position: relative !important;
}

.shorts-video-frame .bp-video-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.shorts-video-frame .bp-video-frame {
    width: 100% !important;
    height: 100% !important;
}

.shorts-video-frame .bp-video-frame iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.shorts-video-frame .bp-controls {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
}

.shorts-video-frame .bp-watermark {
    top: 10px !important;
    left: 10px !important;
}

.shorts-video-frame .bp-center-play {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* ===== SHORTS MODE ===== */
.bp-shorts-mode {
    width: 100% !important;
    height: 100% !important;
}

.bp-shorts-mode .bp-wrapper {
    padding-bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
}

.bp-shorts-mode .bp-video-container {
    position: relative !important;
    width: 100% !important;
    height: calc(100% - 50px) !important;
}

.bp-shorts-mode .bp-video-frame {
    width: 100% !important;
    height: 100% !important;
}

.bp-shorts-mode .bp-video-frame iframe {
    width: 100% !important;
    height: 100% !important;
}

.bp-shorts-mode .bp-controls {
    position: absolute !important;
    bottom: 0 !important;
    width: 100% !important;
}

.bp-shorts-mode .bp-watermark {
    font-size: 0.7rem !important;
}

/* ===== YouTube Elementlerini Gizle ===== */
.bytamer-player iframe {
    pointer-events: none;
}

.bp-click-overlay {
    pointer-events: auto;
}

/* YouTube branding, subscribe button, title vb. gizle */
.bytamer-player .ytp-chrome-top,
.bytamer-player .ytp-show-cards-title,
.bytamer-player .ytp-pause-overlay,
.bytamer-player .ytp-watermark,
.bytamer-player .ytp-youtube-button,
.bytamer-player .ytp-impression-link,
.bytamer-player .ytp-title,
.bytamer-player .ytp-title-channel,
.bytamer-player .ytp-subscribe-button-visible,
.bytamer-player .ytp-ce-element,
.bytamer-player .ytp-ce-covering-overlay,
.bytamer-player .ytp-ce-element-show,
.bytamer-player .ytp-endscreen-content,
.bytamer-player .ytp-cards-teaser,
.bytamer-player .ytp-paid-content-overlay,
.bytamer-player .ytp-gradient-top,
.bytamer-player .annotation {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Shorts modunda üst gradient ile YouTube elementlerini kapat */
.bp-shorts-mode .bp-top-gradient {
    height: 80px !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%) !important;
}

/* İframe üstüne overlay ekle - üst kısım için */
.bp-shorts-mode::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent);
    pointer-events: none;
    z-index: 5;
}
