/* Chrome, Safari ve Edge İçin */
::-webkit-scrollbar {
    width: 0px;
    background: transparent; /* Çubuğu tamamen şeffaf yapar */
    display: none; /* Tamamen gizler */
}

/* Firefox ve IE İçin */
* {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE ve Edge */
}

/* --- INSTAGRAM KEŞFET (GRID) OPTİMİZASYONU --- */

/* Konteynerin kendi kaydırma çubuğunu da garantiye alarak gizleyelim */
.explore-container {
    padding-top: 60px;
    padding-bottom: 60px;
    height: 100vh;
    height: 100dvh; /* Çentikli telefonlar için tam uyum */
    overflow-y: scroll;
    background-color: #000;
    -webkit-overflow-scrolling: touch; /* iOS'ta kaydırmanın kaymak gibi akmasını sağlar */
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px; /* Instagram standardı: Sadece 2px ince siyah çizgi */
    background-color: #000; /* Aradaki boşlukların rengi siyah olsun */
}

.grid-item {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* TikTok/Reels dikey formatı */
    display: block;
    overflow: hidden;
    background: #222; /* Yüklenmeden önceki zemin rengi (Koyu gri) */
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Instagram'ın o yumuşak zoom efekti */
}

/* Sadece masaüstünde üzerine gelince hafif büyüsün (Mobilde tıklama hissi bozmasın) */
@media (min-width: 768px) {
    .grid-item:hover img { 
        transform: scale(1.08); 
    }
}

/* İzlenme Sayısı İkonu (Instagram Sağ Üst/Alt Mantığı) */
.grid-overlay {
    position: absolute;
    bottom: 5px; 
    left: 5px;
    padding: 2px 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); /* Arka plan karartması yerine sadece yazıya gölge */
}
.grid-overlay i { 
    margin-right: 5px; 
    font-size: 10px; 
}
        /* --- TEMEL SIFIRLAMALAR & DEĞİŞKENLER --- */
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent;}
        
        body {
            background-color: #212121; /* Masaüstünde arka plan hafif gri, mobil app'i ön plana çıkarır */
            color: #fff;
            height: 100vh;
            height: 100dvh; /* Yeni nesil mobil tarayıcılar için tam uyum */
            overflow: hidden; /* Ana sayfanın dikey kaymasını engeller */
        }

        /* --- MASAÜSTÜ OPTİMİZASYONU (MOBİL APP GÖRÜNÜMÜ) --- */
        .app-container {
            width: 100%;
            height: 100%;
            position: relative;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0,0,0,0.2);
            background-color: #000; /* Videoların arkası tam siyah */
            transition: all 0.3s ease;
        }

        /* Masaüstü Ekranlar İçin (Max Genişlik ve Sayfa Ortası) */
        @media (min-width: 450px) {
            .app-container {
                max-width: 420px; /* Bir mobil cihaz genişliği (Max Genişlik) */
                max-height: calc(420px * (16 / 9)); /* 9:16 Video Ölçüleri Bozulmadan Korunur (Aspect Ratio) */
                margin: auto; /* Sayfanın tam ortasında durmalı */
                border-radius: 15px; /* Masaüstünde estetik bir kenar ovalliği */
                border: 1px solid #323232;
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%); /* Dikey ve yatay tam ortalama */
            }
        }

        /* --- ÜST MENÜ (HEADER) --- */
        .top-header {
            background-color: #c20000; /* Tema Rengin */
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 100;
            box-shadow: 0 2px 10px rgba(0,0,0,0.5);
            border-bottom: 1px solid #444;
        }
        
        /* HEADER Alanya Gazetesi yazan yerde Logo'muz olsun */
        .header-logo-link {
            text-decoration: none;
            display: flex;
            align-items: center;
        }
        .header-logo-img {
            max-height: 40px; /* Logo verdim, yüksekliği 40px olarak sınırlandırdık */
            width: auto;
        }
        
        .header-icons i { font-size: 20px; color: #fff; margin-left: 20px; cursor: pointer; transition: color 0.2s;}
        .header-icons i:hover { color: #fff; /* Kırmızı Tema Rengi */ }
        .header-icons a { text-decoration: none; }

        /* --- ALT MENÜ (FOOTER) --- */
        .bottom-nav {
            background-color: #c20000; /* Tema Rengin */
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-around;
            position: fixed;
            bottom: 0;
            width: 100%;
            z-index: 100;
            border-top: 1px solid #444;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
        }
        .nav-item {
            color: #aaa; /* Sade ve kullanıcıyı yormayacak */
            font-size: 24px;
            text-decoration: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: color 0.2s;
        }
        .nav-item.active { color: #fff; /* Aktif menü kurumsal kırmızı */ }
        .nav-item span { font-size: 10px; margin-top: 4px; font-weight: 600; color: inherit; }

        /* --- ANA İÇERİK (REELS AKIŞI) --- */
        .reels-scroller {
            flex: 1;
            margin-top: 60px; /* Header */
            margin-bottom: 60px; /* Footer */
            overflow-y: scroll;
            scroll-snap-type: y mandatory; /* Sihirli kaydırma */
            scrollbar-width: none; /* Firefox için gizle */
        }
        .reels-scroller::-webkit-scrollbar { display: none; /* Chrome/Safari için gizle */ }

        /* --- TEKİL VİDEO BLOĞU --- */
        .reel-item {
            width: 100%;
            height: 100%; /* Masaüstü app frame'inin tam yüksekliği */
            scroll-snap-align: start; /* Her videonun tam ekrana oturmasını sağlar */
            position: relative;
            background-color: #000;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .reel-video {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Videoyu ekran oranına göre kesip tam sığdırır */
            cursor: pointer;
        }

        /* --- VİDEO ÜZERİNDEKİ BİLGİLER VE BUTONLAR --- */
        .reel-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 20px 15px 30px 15px;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0) 100%);
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            pointer-events: none; /* Tıklamaların alttaki videoya geçmesi için */
        }
        
        /* Sol Kısım (Metinler) */
        .reel-info { width: 80%; pointer-events: auto; }
        .location-badge {
            background-color: #ed1c24; /* Kırmızı Tema Rengi */
            color: #fff;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            display: inline-block;
            margin-bottom: 10px;
            text-transform: uppercase;
        }
        
        /* Videonun başlık ve açıklama kısmı belirli bir yükseklik ölçüsünde olmalı */
        .read-more-wrapper {
            position: relative;
            max-height: 80px; /* Belirli yükseklik ölçüsü */
            overflow: hidden;
            transition: max-height 0.4s ease; /* Yazıyı okumak istediğinde yukarı doğru genişlemeli */
        }
        .read-more-wrapper.expanded {
            max-height: 300px; /* Detaylı açıklama için genişletilmiş yükseklik */
        }
        
        .reel-title { font-size: 16px; line-height: 1.3; margin-bottom: 4px; font-weight: 700; text-shadow: 1px 1px 3px #000; }
        
        /* 'Devamı...' yapısı */
        .reel-desc-parent { font-size: 13px; font-weight: 400; opacity: 0.85; text-shadow: 1px 1px 2px #000; margin-bottom: 5px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; position: relative;}
        .expanded .reel-desc-parent { display: block; -webkit-line-clamp: initial;}
        
        .read-more-btn { font-size: 12px; color: #aaa; font-weight: 600; pointer-events: auto; }
        .expanded .read-more-btn { display: none;}

        /* Sağ Kısım (Butonlar) */
        .reel-actions { width: 15%; display: flex; flex-direction: column; align-items: center; gap: 15px; pointer-events: auto; margin-bottom: 5px;}
        .action-btn {
            background: none; border: none; color: #fff; font-size: 26px;
            display: flex; flex-direction: column; align-items: center; cursor: pointer;
            text-decoration: none; text-shadow: 0px 2px 4px rgba(0,0,0,0.6);
            transition: transform 0.1s;
        }
        .action-btn:active { transform: scale(0.85); }
        .action-btn span { font-size: 11px; margin-top: 5px; font-weight: 600; text-shadow: none; }
        .action-btn i.liked { color: #ed1c24; } /* Beğenildiğinde Tema Rengi Kırmızı olur */

        /* Haberi Oku Kırmızı Yuvarlak Buton */
        .read-news-btn {
            background-color: #ed1c24; /* Kırmızı Tema Rengi */
            border-radius: 50%;
            width: 45px; height: 45px;
            display: flex; justify-content: center; align-items: center;
            box-shadow: 0 4px 15px rgba(237, 28, 36, 0.5);
            margin-top: 5px;
        }
        .read-news-btn i { font-size: 18px; margin: 0; }
        
        /* Videolar tam ekran da izlenebilmeli, İnstagram gibi, tam ekran iconu */
        .fullscreen-btn {
            position: absolute; top: 75px; right: 15px; /* Header altında, sağ üstte */
            color: #fff; font-size: 20px; text-shadow: 0px 2px 4px rgba(0,0,0,0.6);
            opacity: 0.6; pointer-events: auto; z-index: 10;
        }
        .fullscreen-btn:hover { opacity: 1;}

        /* Ses İkonu Animasyonu (Tıklayınca Belirir) */
        .mute-indicator {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0,0,0,0.6);
            color: #fff; font-size: 30px;
            width: 70px; height: 70px;
            border-radius: 50%;
            display: flex; justify-content: center; align-items: center;
            opacity: 0; pointer-events: none; transition: opacity 0.3s;
        }
        .mute-indicator.show { opacity: 1; }

        /* Masaüstü Tam Ekran Modu (Kapsayıcıyı Genişletir) */
.app-container.fullscreen-active {
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Tam ekran butonunu mobilde daha tıklanabilir yap ve z-index'i artır */
.fullscreen-btn {
    position: absolute; 
    top: 75px; 
    right: 15px; 
    color: #fff; 
    font-size: 24px; /* Mobilde parmak otursun diye biraz büyüttük */
    text-shadow: 0px 2px 4px rgba(0,0,0,0.6);
    opacity: 0.8; 
    pointer-events: auto; 
    z-index: 999; /* Diğer her şeyin üstünde olsun */
    padding: 10px; /* Tıklama alanını genişletir */
}

/* Kapsayıcıyı Sürüklerken Seçimi Engelle (Masaüstü için) */
.reels-scroller {
    user-select: none;
}
/* --- SİNEMA MODU (TAM EKRAN) OPTİMİZASYONU --- */

/* 1. Tam ekrana geçildiğinde Header ve Footer'ı yok et */
.app-container.fullscreen-active .top-header,
.app-container.fullscreen-active .bottom-nav {
    display: none !important; 
}

/* 2. Videonun (Scroller) alt ve üstündeki 60px'lik menü boşluklarını sıfırla */
.app-container.fullscreen-active .reels-scroller {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important; /* Çentikli ekranlar için tam uyum */
}

/* 3. Tam Ekran İkonunun pozisyonunu (Header gidince) yukarı al */
.app-container.fullscreen-active .fullscreen-btn {
    top: 20px !important; 
}
.reel-date {
    font-size: 11px;
    color: #ccc;
    margin-top: 8px;
    font-weight: 600;
    text-shadow: 1px 1px 2px #000;
    display: flex;
    align-items: center;
    gap: 5px;
}
.reel-date i { color: #ed1c24; /* Saat ikonunu kırmızı yaparak şık bir detay katıyoruz */ } 

/* Keşfet Sayfası Ana Kapsayıcı (Header ve Footer Arası) */
.explore-container {
    padding-top: 60px; /* Header boşluğu */
    padding-bottom: 60px; /* Footer boşluğu */
    height: 100vh;
    overflow-y: auto; /* Kendi içinde aşağı kaydırma */
    background-color: #000;
}

/* --- Aktif Video (Tıklanıp Gelinen Video) Tasarımı --- */
.active-reel-wrapper {
    width: 100%;
    background: #111;
    margin-bottom: 2px;
}
.active-reel-wrapper video {
    width: 100%;
    max-height: 70vh; /* Çok uzun olup Grid'i çok aşağı itmesin */
    object-fit: contain;
    background: #000;
}
.active-reel-info { padding: 15px; color: #fff; }
.active-reel-info h2 { font-size: 16px; margin-bottom: 5px; }
.active-reel-info p { font-size: 13px; color: #aaa; margin-bottom: 10px; }
.date-badge { font-size: 11px; color: #ed1c24; font-weight: bold; }

/* --- GRID (Izgara) Tasarımı --- */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Yan yana 3 kare */
    gap: 2px; /* İnstagram gibi aralarda incecik boşluk */
}

.grid-item {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* Dikey video oranı (Kare istersen 1/1 yap) */
    display: block;
    overflow: hidden;
    background: #333;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Resmi sündürmeden alanı doldurur */
    transition: transform 0.3s ease;
}

.grid-item:hover img { transform: scale(1.05); }

/* Kapak Görseli Üzerindeki İzlenme Rakamı Karartması */
.grid-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 5px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.grid-overlay i { margin-right: 5px; }

/* Yükleme İkonu */
.loading-spinner { text-align: center; padding: 20px; color: #aaa; font-size: 14px; }

/* --- AKTİF REEL (TEKİL VİDEO) ETKİLEŞİM BARI - PREMIUM TASARIM --- */
.active-reel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Mobilde sığmazsa alt satıra şıkça kaysın */
    gap: 10px; /* Butonlar arası boşluk */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Çok hafif transparan çizgi */
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Standart Butonlar (Beğen, Yorum, Paylaş) */
.action-btn-inline {
    background: rgba(255, 255, 255, 0); /* Şık, yarı saydam arka plan */
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px; /* Hap (Pill) görünümü */
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn-inline:hover {
    background: rgba(255, 255, 255, 0.2); /* Üzerine gelince hafif parlasın */
}

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

.action-btn-inline i {
    font-size: 16px;
}

.action-btn-inline span {
    font-size: 13px;
    font-weight: 600;
}

/* Beğenildiğinde Kalp Rengi */
.action-btn-inline i.liked {
    color: #ed1c24; /* Kurumsal Kırmızı */
}

/* Haberi Oku Butonu (Sağa Yaslı, Vurgulu) */
.read-news-inline {
    margin-left: auto; /* Otomatik sağa yaslar */
    background-color: #ed1c24;
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(237, 28, 36, 0.3);
    transition: transform 0.2s ease;
}

.read-news-inline:hover {
    transform: translateY(-2px); /* Üzerine gelince hafif yukarı kalksın */
}

/* --- PREMIUM VIDEO PLAYER TASARIMI --- */

/* 1. Tarayıcının Kendi Kaba Kontrollerini Gizle (Garanti Önlem) */
video::-webkit-media-controls {
    display: none !important;
}

/* 2. Instagram Tarzı İnce İlerleme Çubuğu (En Altta) */
.reel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Çok ince, zarif bir çizgi */
    background: rgba(255, 255, 255, 0.2); /* Arka plan hafif şeffaf gri */
    z-index: 50;
    pointer-events: none; /* Tıklamayı engellemesin */
}

.reel-progress-bar {
    height: 100%;
    background: #ed1c24; /* Kurumsal Kırmızı */
    width: 0%;
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear; /* Yağ gibi akmasını sağlar */
}

/* 3. Merkez İkon Animasyonu (Instagram Kalp/Ses efekti gibi) */
.center-action-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5); /* Küçücük başlar */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px); /* Arkasını hafif buzlu cam yapar (iOS hissi) */
    color: #fff;
    font-size: 35px;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Başlangıçta görünmez */
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Zıplama (Bounce) efekti */
    z-index: 20;
}

/* Javascript bu class'ı tetiklediğinde ekranda pop-up gibi patlar */
.center-action-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
/* Video durdurulduğunda ekranda kalıcı olarak duracak ikon sınıfı */
.center-action-indicator.persistent {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background: rgba(237, 28, 36, 0.85); /* Duraklatıldığında kurumsal kırmızı olsun */
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.5);
    cursor: pointer;
}

/* --- VİDEO VE KAPSAYICI (WRAPPER) OPTİMİZASYONU --- */

/* Her bir kaydırma öğesi ekranı tam kaplamalı */
.reel-item {
    position: relative;
    width: 100%;
    height: 100%; /* Kaydırma alanına tam oturur */
    overflow: hidden; /* Taşan köşeleri gizler */
    background-color: #000; /* Yüklenirken arkada siyah zemin görünür */
}

/* Videoyu saran div, reel-item'ın %100'ünü kaplamalı */
.video-player-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* Sihirli Dokunuş: object-fit: cover */
.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Videoyu sündürmeden alanı tamamen dolduracak şekilde keser */
    object-position: center center; /* Kesme işlemini tam merkezden yapar */
    border: none;
    outline: none;
}

/* --- SİNEMA / TAM EKRAN (FULLSCREEN) MODU --- */

/* Senin JS kodunla eklenen fullscreen-active sınıfı devredeyken */
.app-container.fullscreen-active .top-header,
.app-container.fullscreen-active .bottom-nav {
    display: none !important; /* Üst ve alt menüyü gizle */
}

.app-container.fullscreen-active .reels-scroller {
    padding-top: 0 !important; /* Header boşluğunu iptal et */
    padding-bottom: 0 !important; /* Footer boşluğunu iptal et */
    height: 100vh !important; /* Tam ekran yüksekliği ver */
    height: 100dvh !important; /* Mobil tarayıcılar için dinamik yükseklik */
}

/* Tarayıcının Kendi (Native) Tam Ekranı Devreye Girerse (Garanti Önlem) */
:fullscreen .reel-video,
:-webkit-full-screen .reel-video {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
}
