/* ==========================================================================
   YouTube Video Player & Mini Media Player Styles (qr_audio_player.css)
   ========================================================================== */

/* 1. Tam Ekran Karartma & Olay Yutucu Overlay */
#qr-radio-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483690 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    pointer-events: none;
}

#qr-radio-player-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Video modunda: Ekranı karartan ve ortalanmış modal overlay */
#qr-radio-player-overlay.is-video-active {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    touch-action: none;
    pointer-events: auto !important;
}

/* Ses modunda: Kitabın altındaki çubuğu gösteren, tamamen şeffaf ve tıklama geçiren overlay */
#qr-radio-player-overlay.is-audio-active {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: block !important;
    padding: 0 !important;
    pointer-events: none !important; /* Alttaki tüm sayfa tıklamaları ve işaretlemeleri engelsiz geçer */
}

/* 2. Etkileşim Kilitleri: SADECE Video modunda alttaki sayfa etkileşimlerini kitle */
body.qr-video-active #page-target-overlay,
body.qr-video-active #drawing-canvas,
body.qr-video-active canvas,
body.qr-video-active .interaction-zone,
body.qr-video-active .interaction-item,
body.qr-video-active svg.interaction-svg {
    pointer-events: none !important;
}

/* Ses çalarken sayfadaki tüm tıklama, işaretleme, çizim ve eşleştirmeler %100 açık ve aktiftir */
body.qr-audio-active #page-target-overlay,
body.qr-audio-active #drawing-canvas,
body.qr-audio-active .interaction-zone,
body.qr-audio-active .interaction-item,
body.qr-audio-active svg.interaction-svg {
    pointer-events: auto;
}

/* 3. Ana Oynatıcı Kartı */
.mini-media-player {
    position: relative;
    background: #0f0f0f;
    color: #ffffff;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Arial, sans-serif;
    z-index: 2147483695 !important;
    pointer-events: auto !important;
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* 4. YouTube Video Modu (16:9) */
.mini-media-player.is-youtube-video {
    width: min(840px, 94vw);
    max-width: 94vw;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 6px 20px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
}

.mini-media-player.is-youtube-video .yt-video-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 75vh;
    background: #000000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mini-media-player.is-youtube-video .yt-video-viewport video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.mini-media-player.is-youtube-video .yt-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 56px;
    padding: 10px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 25;
    box-sizing: border-box;
    transition: opacity 0.25s ease-out;
}

.yt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.yt-logo-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.yt-logo-text {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: #ffffff;
    font-family: "YouTube Sans", Roboto, sans-serif;
    line-height: 1;
}

.yt-title-container { min-width: 0; flex: 1; }

.mini-player-title.yt-title {
    font-size: 14px;
    font-weight: 500;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-subtitle.yt-subtitle {
    font-size: 11px;
    color: #aaaaaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yt-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #ffffff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.yt-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.yt-center-play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.15);
}

.yt-big-play-icon {
    width: 68px; height: 48px;
    cursor: pointer;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yt-big-play-icon:hover { transform: scale(1.15); }

.yt-tap-feedback {
    position: absolute;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 22;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.6);
}

.yt-tap-feedback.is-animating {
    animation: yt-tap-pulse 0.45s ease-out forwards;
}

@keyframes yt-tap-pulse {
    0% { opacity: 0.9; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(1.4); }
}

.mini-media-player.is-youtube-video .yt-bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    padding: 0 14px 8px;
    z-index: 25;
    box-sizing: border-box;
    transition: opacity 0.25s ease-out;
}

.yt-progress-container {
    width: 100%; height: 18px;
    display: flex; align-items: center;
    cursor: pointer; position: relative;
}

.yt-progress-rail {
    width: 100%; height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px; position: relative;
    transition: height 0.12s ease;
}

.yt-progress-container:hover .yt-progress-rail { height: 6px; }

.yt-progress-buffer {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: rgba(255, 255, 255, 0.45); border-radius: 2px;
}

.yt-progress-played {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: #FF0000; border-radius: 2px;
}

.yt-scrubber-handle {
    position: absolute; top: 50%; left: 0%;
    width: 13px; height: 13px;
    background: #FF0000; border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.12s ease;
}

.yt-progress-container:hover .yt-scrubber-handle,
.mini-media-player.is-dragging-track .yt-scrubber-handle {
    transform: translate(-50%, -50%) scale(1);
}

.yt-controls-row {
    display: flex; align-items: center; justify-content: space-between;
    height: 42px; width: 100%;
}

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

.yt-btn {
    background: none; border: none; color: #ffffff;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; outline: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

.yt-btn:hover { background: rgba(255, 255, 255, 0.18); }

.yt-volume-box { display: flex; align-items: center; }

.yt-volume-slider-wrap {
    width: 0px; overflow: hidden;
    transition: width 0.22s ease, margin 0.22s ease;
    display: flex; align-items: center; margin-left: 0;
}

.yt-volume-box:hover .yt-volume-slider-wrap { width: 65px; margin: 0 6px 0 4px; }

.yt-volume-slider { width: 60px; height: 4px; accent-color: #FF0000; cursor: pointer; }

.yt-time-display { font-size: 12px; color: #dddddd; margin-left: 8px; white-space: nowrap; }

.yt-badge-cc {
    font-size: 10px; font-weight: 800; border: 1.5px solid #ffffff;
    border-radius: 3px; padding: 1px 3px;
}

.mini-media-player.is-youtube-video.yt-controls-hidden .yt-header,
.mini-media-player.is-youtube-video.yt-controls-hidden .yt-bottom-bar,
.mini-media-player.is-youtube-video.yt-controls-hidden .yt-center-play-overlay {
    opacity: 0; pointer-events: none;
}

/* 5. Kitabın Altında Sabitlenen Kompakt Ses Oynatıcı Dock Çubuğu */
.mini-media-player.is-audio-only {
    position: fixed !important;
    bottom: 44px !important; /* Kitabın tam altında, alt araç çubuğunun hemen üstünde yatay ortalı */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(540px, 94vw) !important;
    max-width: 94vw !important;
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    padding: 6px 14px 7px !important;
    box-sizing: border-box !important;
    z-index: 2147483695 !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    animation: qrAudioDockSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes qrAudioDockSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.mini-media-player.is-audio-only .yt-video-viewport,
.mini-media-player.is-audio-only .yt-controls-right {
    display: none !important;
}

.mini-media-player.is-audio-only .yt-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    cursor: default !important;
}

.mini-media-player.is-audio-only .yt-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.mini-media-player.is-audio-only .mini-player-icon {
    font-size: 14px !important;
    line-height: 1 !important;
    display: inline-block !important;
    animation: soundPulse 1.8s infinite ease-in-out !important;
}

@keyframes soundPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 4px #60a5fa); }
}

.mini-media-player.is-audio-only .yt-title-container {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
}

.mini-media-player.is-audio-only .mini-player-title.yt-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: 0.2px !important;
}

.mini-media-player.is-audio-only .mini-player-subtitle.yt-subtitle {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.mini-media-player.is-audio-only .yt-close-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: #e2e8f0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.mini-media-player.is-audio-only .yt-close-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: scale(1.15) !important;
}

.mini-media-player.is-audio-only .yt-bottom-bar {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 28px !important;
}

.mini-media-player.is-audio-only .yt-play-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5) !important;
    transition: transform 0.12s ease, filter 0.12s ease !important;
}

.mini-media-player.is-audio-only .yt-play-btn:hover {
    transform: scale(1.1) !important;
    filter: brightness(1.15) !important;
}

.mini-media-player.is-audio-only .yt-play-btn svg {
    width: 15px !important;
    height: 15px !important;
}

.mini-media-player.is-audio-only .yt-replay-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    border-radius: 50% !important;
    background: none !important;
    border: none !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: color 0.12s ease, transform 0.12s ease !important;
}

.mini-media-player.is-audio-only .yt-replay-btn:hover {
    color: #ffffff !important;
    transform: scale(1.12) !important;
}

.mini-media-player.is-audio-only .yt-replay-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.mini-media-player.is-audio-only .yt-progress-container {
    flex: 1 !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    position: relative !important;
    padding: 0 !important;
}

.mini-media-player.is-audio-only .yt-progress-rail {
    width: 100% !important;
    height: 5px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border-radius: 3px !important;
    position: relative !important;
    transition: height 0.1s ease !important;
}

.mini-media-player.is-audio-only .yt-progress-container:hover .yt-progress-rail {
    height: 6px !important;
}

.mini-media-player.is-audio-only .yt-progress-played {
    background: linear-gradient(90deg, #38bdf8 0%, #3b82f6 100%) !important;
    border-radius: 3px !important;
}

.mini-media-player.is-audio-only .yt-scrubber-handle {
    width: 11px !important;
    height: 11px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.9) !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.mini-media-player.is-audio-only .yt-time-display {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
    margin-left: 2px !important;
    flex-shrink: 0 !important;
}

.mini-media-player.is-audio-only .yt-volume-box {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.mini-media-player.is-audio-only .yt-mute-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    background: none !important;
    border: none !important;
    color: #94a3b8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: color 0.12s ease !important;
}

.mini-media-player.is-audio-only .yt-mute-btn:hover {
    color: #ffffff !important;
}

.mini-media-player.is-audio-only .yt-mute-btn svg {
    width: 17px !important;
    height: 17px !important;
}

.mini-media-player.is-audio-only .yt-volume-slider-wrap {
    width: 0px !important;
    overflow: hidden !important;
    transition: width 0.22s ease, margin 0.22s ease !important;
    display: flex !important;
    align-items: center !important;
}

.mini-media-player.is-audio-only .yt-volume-box:hover .yt-volume-slider-wrap,
.mini-media-player.is-audio-only .yt-volume-box:focus-within .yt-volume-slider-wrap {
    width: 52px !important;
    margin: 0 4px !important;
}

.mini-media-player.is-audio-only .yt-volume-slider {
    width: 50px !important;
    height: 4px !important;
    accent-color: #38bdf8 !important;
    cursor: pointer !important;
}

/* 6. QR & Medya Kapsül Hotspot Butonu (Kulaklık + Karekod Kapsülü) */
.qr-audio-hotspot {
    position: absolute;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 20px;
    z-index: 2147483670 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
}

.qr-audio-hotspot:hover,
.qr-audio-hotspot:focus,
.qr-audio-hotspot:active {
    background: transparent !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 7. Sayfa Kıvırma ve Köşe Çevirme Butonlarını Kesin Olarak Kapat */
.flip_button_left,
.flip_button_right,
.flip_button_first,
.flip_button_last,
#flipshortcutbutton,
.phoneFlipShortcutButton,
.corner-curl,
.corner-fold {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

