:root {
    --primary-color: #ff6d00; /* Vurgu: Parlak Turuncu */
    --bg-color: #5e2900; /* Ana Arka Plan: Daha koyu, yanık turuncu */
    --sidebar-bg: #121212; /* Sidebar: Koyu Siyah */
    --card-bg: #1e1e1e; /* Kartlar: Koyu Gri */
    --text-color: #ffffff;
    --imdb-yellow: #f5c518;
}

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'Segoe UI', Tahoma, sans-serif; 
    margin: 0; 
    overflow-x: hidden;
}

.container { 
    display: flex; 
    gap: 20px; 
    padding: 5px; 
    max-width: 100%; /* Tüm ekranı kullan */
    margin: 0;
}

/* --- SIDEBAR: Sabit ve Zarif --- */
.sidebar {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px); /* Cam efekti */
    border-radius: 25px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
}

.filter-group { 
    margin-bottom: 15px; 
}

.filter-group label { 
    display: block; 
    font-size: 12px; 
    color: var(--primary-color); 
    margin-bottom: 5px; 
    font-weight: 700;
    text-transform: uppercase;
}

.genre-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 5px; 
    max-height: 140px; 
    overflow-y: auto; 
    background: #000; 
    padding: 8px; 
    border-radius: 6px; 
}

.genre-item { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 10px; 
    background: #222; 
    padding: 4px; 
    border-radius: 4px; 
}

/* Inputlar daha ince ve net */
input, select { 
    background: #000; 
    color: #fff; 
    border: 1px solid #333; 
    padding: 8px; 
    border-radius: 4px; 
    width: 100%; 
    font-size: 13px; 
    box-sizing: border-box;
}

button { 
    cursor: pointer; 
    width: 100%; 
    padding: 12px; 
    border-radius: 4px; 
    border: none; 
    font-weight: bold; 
    font-size: 13px;
    text-transform: uppercase;
    transition: 0.3s; 
    margin-top: 10px;
}

.btn-primary { 
    background: var(--primary-color); 
    color: black; 
}

.btn-primary:hover { 
    background: #fff; 
}

/* --- İÇERİK ALANI: Geniş ve Ferah --- */
.content { 
    flex-grow: 1; /* Kalan tüm alanı kapla */
    padding-left: 10px;
}

.movie-grid { 
    display: grid; 
    /* Ekran genişliğine göre otomatik sığdır */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 20px; 
}

.movie-card { 
    background: rgba(255, 255, 255, 0.05); /* Çok hafif transparan beyaz */
    backdrop-filter: blur(10px); /* Buzlu cam efekti */
    -webkit-backdrop-filter: blur(10px); 
    border-radius: 15px; 
    overflow: hidden; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Zıplama efektli geçiş */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.movie-card:hover { 
    transform: translateY(-10px) scale(1.02); /* Yukarı kalk ve hafif büyü */
    border-color: var(--primary-color);
    box-shadow: 0 15px 45px rgba(255, 109, 0, 0.3); /* Turuncu parlama */
    background: rgba(255, 255, 255, 0.1); /* Biraz daha aydınlan */
}

.movie-card:hover img {
    transform: scale(1.1); /* Resim kartın içinde hafifçe büyüsün */
}

.hover-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Üzerine gelince kararacak */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Normalde görünmez */
    transition: opacity 0.3s ease;
    gap: 10px;
    color: var(--primary-color);
    font-weight: bold;
}

.hover-info span {
    font-size: 20px; /* Yılı daha büyük yaptık */
    font-weight: 900;
}

.view-detail-btn {
    background: var(--primary-color);
    color: black;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px; /* Buton yazısını büyüttük */
    font-weight: bold;
}

.movie-card:hover .hover-info {
    opacity: 1; /* Üzerine gelince görünür yap */
}

.movie-card img { 
    width: 100%; 
    height: 280px; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.movie-info { 
    padding: 15px; 
    text-align: center;
    background: rgba(0, 0, 0, 0.6); /* Biraz daha koyu yaparak yazıları öne çıkardık */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px; /* Tüm kutuların boyu eşit olsun diye sabit yükseklik */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.movie-info h3 {
    font-size: 16px; /* 13px'den 16px'e çıkardık */
    margin: 0 0 10px 0;
    font-weight: 700; /* Daha kalın */
    color: #ffffff;
    line-height: 1.3;
    /* Uzun isimler 2 satırı geçerse üç nokta koyar */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-badge { 
    background-color: var(--imdb-yellow); /* JS'den gelen renk bunu ezecek ama temel kalsın */
    color: #000000 !important; /* Yazı rengi her zaman KESİN siyah olsun */
    padding: 6px 14px; /* Yukarıdan/Aşağıdan 6px, Sağdan/Soldan 14px - Daha ferah */
    border-radius: 8px; /* Daha modern bir yuvarlaklık */
    font-weight: 900; /* En kalın yazı tipi (Extra Bold) */
    font-size: 16px; /* 14px'den 16px'e çıkardık - Okunmama şansı yok */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Yıldız ile rakam arası boşluk */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Rozeti karttan ayırmak için gölge */
    border: 1px solid rgba(0,0,0,0.1); /* Çok ince bir çerçeve netliği artırır */
    margin-top: 5px;
    min-width: 60px; /* Rozetin boyutu puan değişse de çok oynamasın */
}
/* Modal */
.modal-content { 
    background: #1a1a1a; 
    padding: 30px; 
    width: 90%; /* Mobilde geniş durması için */
    max-width: 800px; /* Büyük ekranlarda çok yayılmasın */
    border-radius: 20px; 
    position: relative; 
    border: 2px solid #ff6d00; 
    color: white;
    box-shadow: 0 0 50px rgba(255, 109, 0, 0.3);
    
    /* Sayfa kaydırılsa bile ortada kalsın */
    margin: auto; 
}

.btn-load-more {
    opacity: 0; /* Görünmez yap */
    height: 1px; /* Yer kaplamasın */
    margin: 0;
    padding: 0;
    pointer-events: none; /* Yanlışlıkla tıklanmasın */
}

.modal { 
    display: none; /* JS ile açılacak */
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    backdrop-filter: blur(10px); 
    
    /* --- MERKEZE HİZALAMA İÇİN KRİTİK 3 SATIR --- */
    display: none; /* Başlangıçta gizli */
    align-items: center; /* Dikeyde ortala */
    justify-content: center; /* Yatayda ortala */
}

.hero-banner {
    width: 100%;
    height: 240px; /* Kompakt yükseklik */
    
    /* --- YARI SAYDAMLIK VE KENDİ GÖRSELİN İÇİN DEĞİŞİKLİK --- */
    background-image: 
        /* 1. Katman: Koyu Turuncu ve Siyah Geçişli Saydamlık Maslesi */
        linear-gradient(
            to bottom, 
            rgba(0, 0, 0, 0.5),      /* Üst kısım neredeyse siyah (yazı okunabilsin diye) */
            rgba(138, 61, 0, 0.5)   /* Alt kısım sitenin koyu turuncusu (araya karışsın diye) */
        ),
        /* 2. Katman: Senin Kendi Fotoğrafın */
        url('banner2.png'); /* DOSYA ADINI BURAYA YAZ */
    /* -------------------------------------------------------- */

    background-size: cover;
    background-position: center 30%; /* Görselin neresine odaklanılacağı */
    background-repeat: no-repeat;
    
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 109, 0, 0.2);
}

.hero-content .main-logo {
    font-size: 32px; /* Başlığı da biraz küçülttük */
    color: var(--primary-color);
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 20px;
    color: #fff;
    margin: 10px 0;
    font-weight: 300;
}

.hero-divider {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto;
    border-radius: 2px;
}

.hero-subtext {
    font-size: 13px !important;
    color: rgba(255,255,255,0.8) !important;
    margin-top: 5px;
    letter-spacing: 1px;
    font-weight: 400;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb { background: #ff6d00; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #ff9100; }


.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 109, 0, 0.8); /* Yarı saydam turuncu */
    color: black;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: none; /* Başlangıçta gizli (JS ile görünecek) */
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-to-top:hover {
    background: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 109, 0, 0.5);
}

.poster-wrapper {
    position: relative;
    overflow: hidden;
}

.close {
    color: #ffffff; /* Beyaz renk */
    float: right;
    font-size: 35px; /* 28px'den 35px'e çıkardık */
    font-weight: 900; /* Daha kalın bir çarpı */
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 15px; /* Tıklama alanını genişleten iç boşluk */
    line-height: 1; /* Çarpının kutu içinde ortalanmasını sağlar */
    display: inline-block;
    position: absolute; /* Modal içinde sabit konumlandırmak daha iyidir */
    right: 20px;
    top: 15px;
    z-index: 1001; /* Her şeyin üstünde kalsın */
    background: rgba(0, 0, 0, 0.3); /* Arkasına hafif bir gölge ki poster üzerinde belli olsun */
    border-radius: 50%; /* Yuvarlak bir buton hissi */
    width: 50px;
    height: 50px;
    text-align: center;
}

/* Üzerine gelince turuncuya dönsün ve büyüsün */
.close:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg) scale(1.1); /* Hover yapınca şık bir dönüş efekti */
}

.stats-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 109, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    text-align: center;
    font-size: 13px;
    color: #ccc;
}

#totalMoviesCount {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Zarif ve ince bir çubuk */
    background: rgba(18, 18, 18, 0.85); /* Sidebar ile uyumlu koyu renk */
    backdrop-filter: blur(15px); /* Arkayı bulanıklaştıran cam efekti */
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 109, 0, 0.3); /* Üstten ince turuncu çizgi */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Her şeyin (modal dahil) üstünde kalsın */
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-text {
    color: #ccc;
    font-size: 14px;
    font-weight: 300;
}

.footer-mail {
    color: var(--primary-color); /* Senin turuncu rengin */
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer-mail:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
    letter-spacing: 0.5px;
}

/* --- KRİTİK AYAR: Sayfanın en alt içeriği footer'ın altında kalmasın diye --- */
body {
    padding-bottom: 60px; /* Footer yüksekliğinden biraz fazla boşluk bırakıyoruz */
}