/* =========================================================
   EKRAN SİSTEMİ — TV DISPLAY STİLLERİ
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Ana kapsayıcı ---- */
#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* ---- Video elementi ---- */
#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* ---- Resim elementi ---- */
#mainImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* ========================
   RESİM GERİ SAYIM
   ======================== */
.image-timer {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(0, 0, 0, .55);
    color: rgba(255, 255, 255, .85);
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    z-index: 8;
    pointer-events: none;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}

/* ========================
   YÜKLEME EKRANI (OVERLAY)
   ======================== */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 10;
}

.overlay p {
    margin-top: 18px;
    font-size: 1.05rem;
    color: #94a3b8;
    text-align: center;
    padding: 0 20px;
}

/* Dönen yükleme göstergesi */
.spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255,255,255,.12);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin .85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========================
   BAĞLANTI BANTLARI
   ======================== */
.connection-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(239, 68, 68, .92);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 20;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
}

.connection-bar.warn {
    background: rgba(245, 158, 11, .92);
}

/* ========================
   VIDEO BAŞLIĞI
   ======================== */
.video-title {
    position: absolute;
    bottom: 28px;
    left: 28px;
    right: 28px;
    color: rgba(255, 255, 255, .8);
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 1px 6px rgba(0,0,0,.9), 0 0 16px rgba(0,0,0,.6);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity .6s ease;
    max-width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.video-title.visible { opacity: 1; }
