/* =====================================================
 * R2 VIDEO PLAYER CSS - BASIT VE ÇALIŞAN
 * ===================================================== */

.r2-wrapper {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.r2-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════
   OVERLAY - HER ZAMAN HAZIR, GÖSTER/GİZLE
   ═══════════════════════════════════════════════════ */
.r2-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.8) 0%,
        transparent 25%,
        transparent 75%,
        rgba(0,0,0,0.9) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.r2-overlay.show {
    opacity: 1;
}

.r2-overlay > * {
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════ */
.r2-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.r2-counter {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.r2-close {
    background: rgba(0,0,0,0.7);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.r2-close:active {
    transform: scale(0.9);
}

/* ═══════════════════════════════════════════════════
   CENTER - TAP AREA
   ═══════════════════════════════════════════════════ */
.r2-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.r2-play-icon {
    font-size: 48px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.2s;
}

.r2-play-icon.flash {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   BOTTOM BAR
   ═══════════════════════════════════════════════════ */
.r2-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 20px 20px;
    z-index: 10;
}

.r2-progress-wrap {
    position: relative;
    margin-bottom: 12px;
    padding: 10px 0;
}

.r2-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.r2-track {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.r2-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.5);
    width: 0%;
}

.r2-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #e11d48;
    width: 0%;
}

.r2-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.r2-btn {
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.r2-btn:active {
    background: rgba(255,255,255,0.1);
    transform: scale(0.9);
}

.r2-time {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════
   NAVIGATION ARROWS - HER ZAMAN GÖRÜNÜR
   ═══════════════════════════════════════════════════ */
.r2-nav {
    position: absolute;
    top: 75%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.253);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(3px);
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.r2-prev {
    left: 20px;
}

.r2-next {
    right: 20px;
}

.r2-nav:active {
    transform: translateY(-50%) scale(0.9);
}

/* ═══════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════ */
.r2-loader {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.r2-loader.hidden {
    display: none;
}

.r2-spin {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   ERROR
   ═══════════════════════════════════════════════════ */
.r2-error {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 30;
}

.r2-error.hidden {
    display: none;
}

.r2-error p {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.r2-retry {
    background: #fff;
    color: #000;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.r2-retry:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .r2-top, .r2-bottom {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .r2-nav {
        width: 28px;
        height: 28px;
    }
    
    .r2-prev {
        left: 12px;
    }
    
    .r2-next {
        right: 12px;
    }
}

/* ═══════════════════════════════════════════════════
   LANDSCAPE
   ═══════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 600px) {
    .r2-top {
        padding: 10px 16px;
    }
    
    .r2-bottom {
        padding: 0 16px 10px;
    }
    
    .r2-nav {
        width: 44px;
        height: 44px;
    }
}