/* --- GENEL AYARLAR & RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-body: #202125;
    --bg-header: rgba(32, 33, 37, 0.95);
    --bg-card: #2a2c31;
    --primary: #ffbade;
    --primary-hover: #ff9ecd;
    --text-white: #ffffff;
    --text-gray: #aaaaaa;
    --card-radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--bg-body);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- HEADER --- */
header {
    background-color: var(--bg-header);
    backdrop-filter: blur(10px);
    padding: 0 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    height: 60px;
}

.logo img { height: 30px; width: auto; object-fit: contain; }

.search-box { position: relative; width: 250px; }
.search-box input {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    padding: 8px 35px 8px 15px;
    border-radius: 20px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    transition: all 0.3s;
}
.search-box input:focus { border-color: var(--primary); }
.search-btn {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-gray);
    cursor: pointer; font-size: 12px; padding: 5px;
}

/* --- SPOTLIGHT SLIDER (SIRALI ANİMASYONLU) --- */
.hero-wrapper {
    position: relative; width: 100%; height: 400px;
    overflow: hidden; display: flex; align-items: center; margin-bottom: 20px;
}

/* Arka Plan */
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: blur(15px) brightness(0.4); 
    z-index: 0;
    transform: scale(1.05);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease;
    opacity: 1;
}

/* İçerik Taşıyıcı */
.hero-content {
    position: relative; z-index: 1; width: 100%; max-width: 1200px;
    margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 30px;
}

/* --- SIRALI ANİMASYON TANIMLARI --- */

/* 1. Tüm hareketli parçalar için ortak ayar */
.hero-poster, 
.hero-info h2, 
.hero-info .hero-meta, 
.hero-info p, 
.hero-info .btn-watch {
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1); /* Yumuşak yaylanma */
    opacity: 1;
    transform: translateY(0);
}

/* 2. GİRİŞ SIRASI (Delay Ayarları - Ekrana Gelirken) */
.hero-poster          { transition-delay: 0ms; }   /* 1. Poster */
.hero-info .hero-meta { transition-delay: 100ms; } /* 2. Etiketler */
.hero-info h2         { transition-delay: 200ms; } /* 3. Başlık */
.hero-info p          { transition-delay: 300ms; } /* 4. Açıklama */
.hero-info .btn-watch { transition-delay: 400ms; } /* 5. Buton */


/* --- ÇIKIŞ ANİMASYONU (.changing sınıfı varken) --- */

/* Arka plan kaybolur */
.hero-wrapper.changing #hero-bg {
    opacity: 0;
    transform: scale(1);
}

/* Tüm elemanlar aşağı kayar ve silinir (Delay olmadan, hızlıca) */
.hero-wrapper.changing .hero-poster,
.hero-wrapper.changing .hero-info h2,
.hero-wrapper.changing .hero-info .hero-meta,
.hero-wrapper.changing .hero-info p,
.hero-wrapper.changing .hero-info .btn-watch {
    opacity: 0;
    transform: translateY(30px); /* Aşağı it */
    transition-delay: 0ms !important; /* Hepsini aynı anda sil */
    transition-duration: 0.3s; /* Hızlı çıkış */
}

/* --- SLIDER İÇERİK STİLLERİ --- */
.hero-poster {
    width: 180px; height: 270px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); object-fit: cover; flex-shrink: 0;
}

.hero-info h2 {
    font-size: 32px;
    font-weight: 700; line-height: 1.2; margin-bottom: 10px;
    color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-meta {
    display: flex; gap: 10px; margin-bottom: 15px; font-size: 12px; color: #ddd; align-items: center;
}

.btn-watch {
    background: var(--primary); color: #000; padding: 10px 25px; border-radius: 25px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
    box-shadow: 0 5px 15px rgba(255, 186, 222, 0.3);
}
.btn-watch:hover { transform: scale(1.05); background: var(--primary-hover); }

/* Slider Okları */
.slider-nav-btn {
    position: absolute; bottom: 20px; right: 20px; z-index: 10;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(5px);
    color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 5px;
    cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.slider-nav-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.prev-slide { right: 70px; }
.next-slide { right: 20px; }


/* --- LİSTE VE KARTLAR --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px 20px; width: 100%; }

.section-header {
    margin-bottom: 20px; border-left: 4px solid var(--primary); padding-left: 12px;
}
.section-header h2 { font-size: 18px; font-weight: 700; color: var(--primary); }

#anime-listesi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.anime-card {
    position: relative; border-radius: var(--card-radius); overflow: hidden;
    background: var(--bg-card); transition: transform 0.3s; display: block;
}
.anime-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }

.poster-box { position: relative; width: 100%; aspect-ratio: 2/3; overflow: hidden; }
.poster-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.anime-card:hover .poster-box img { transform: scale(1.05); }

.ep-tag {
    position: absolute; top: 6px; left: 6px; background: rgba(255,255,255,0.9);
    color: #000; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
}

.hover-play {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; justify-content: center;
    align-items: center; opacity: 0; transition: 0.3s;
}
.anime-card:hover .hover-play { opacity: 1; }
.hover-play i { font-size: 40px; color: var(--primary); }

.card-info { padding: 10px; }
.anime-title {
    font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; color: white; display: block; margin-bottom: 3px;
}
.anime-meta {
    font-size: 11px; color: var(--text-gray); display: flex; justify-content: space-between;
}

/* --- KATEGORİ ALANI --- */
.genre-section { margin-top: 30px; }
.genre-row { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px; }
.genre-row::-webkit-scrollbar { height: 6px; }
.genre-row::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.genre-row .anime-card { min-width: 150px; max-width: 150px; }

/* --- YÜKLE BUTONU --- */
.load-more-container { text-align: center; margin-top: 30px; }
.btn-load-more {
    background: #25262b; color: #ccc; border: 1px solid #333;
    padding: 10px 30px; border-radius: 20px; cursor: pointer;
    font-family: 'Poppins', sans-serif; font-size: 13px; transition: 0.3s;
}
.btn-load-more:hover { background: var(--primary); color: #000; border-color: var(--primary); }


/* --- İZLEME SAYFASI --- */
.watch-container {
    display: flex; gap: 25px; max-width: 1200px; margin: 20px auto; padding: 0 20px;
    align-items: flex-start;
}

.main-content { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

.player-box {
    position: relative; padding-bottom: 56.25%; background: #000;
    border-radius: 8px; overflow: hidden; margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.player-box iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.source-selector {
    background: var(--bg-card); padding: 12px; border-radius: 8px; margin-bottom: 20px;
}
.source-title { font-size: 12px; color: var(--primary); margin-bottom: 8px; font-weight: 600; }
.source-btn {
    background: #151618; color: #fff; border: none; padding: 6px 12px;
    margin-right: 8px; border-radius: 4px; cursor: pointer; font-size: 12px;
    transition: 0.2s;
}
.source-btn:hover, .source-btn.active { background: var(--primary); color: #000; font-weight: 600; }

.anime-info-box {
    background: var(--bg-card); padding: 20px; border-radius: 8px; margin-bottom: 20px;
}
.anime-info-box h1 { color: var(--primary); margin-bottom: 10px; font-size: 22px; font-weight: 600; }
.anime-info-box p { color: #ccc; font-size: 13px; line-height: 1.6; }

.comments-section { background: var(--bg-card); padding: 20px; border-radius: 8px; }
.comments-section h2 { font-size: 16px; margin-bottom: 15px; color: white; border-bottom: 1px solid #333; padding-bottom: 10px;}

/* Bölüm Listesi */
.ep-list-header {
    background: #000000; padding: 12px; border-radius: 8px 8px 0 0;
    font-weight: bold; color: var(--primary); font-size: 14px; text-align: center;
}
.ep-list-body {
    background: var(--bg-card); padding: 10px; max-height: 500px;
    overflow-y: auto; border-radius: 0 0 8px 8px;
}

.ep-list-body::-webkit-scrollbar { width: 6px; }
.ep-list-body::-webkit-scrollbar-track { background: #18191d; }
.ep-list-body::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.ep-btn {
    display: flex; align-items: center; padding: 10px 12px; margin-bottom: 5px;
    background: #18191d; border-radius: 5px; cursor: pointer;
    transition: 0.2s; font-size: 12px; color: #ccc; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-btn:hover, .ep-btn.active { 
    background: #333; color: #fff; border-left: 3px solid var(--primary);
}
.ep-btn i { margin-right: 10px; color: var(--primary); font-size: 11px; }


/* --- FOOTER --- */
footer {
    background-color: #111;
    padding: 40px 0 20px 0;
    margin-top: auto;
    border-top: 1px solid #222;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr 0.5fr;
    gap: 30px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px;
    align-items: start;
}

.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-col p { color: #888; font-size: 13px; line-height: 1.6; margin-top: 10px; max-width: 90%; }
.footer-col h3 { 
    color: #fff; font-size: 15px; margin-bottom: 15px; font-weight: 600; 
    border-left: 3px solid var(--primary); padding-left: 10px;
}

.footer-col ul { padding: 0; list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { 
    color: #aaa; font-size: 13px; transition: 0.2s; display: block;
}
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.legal-warning {
    margin-top: 40px;
    padding: 20px;
    background: #0d0d0d;
    border-top: 1px solid #222;
    text-align: center;
}
.legal-text { color: #555; font-size: 11px; margin-bottom: 5px; }
.copyright-text { color: #777; font-size: 12px; }
.dev-credit { color: var(--primary); font-weight: 500; }


/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    header { padding: 0 15px; height: 55px; }
    .search-box { width: 160px; }
    .search-box input { font-size: 11px; padding: 6px 30px 6px 12px; }
    
    /* Spotlight Mobilde Düzenleme */
    .hero-wrapper { height: 350px; }
    .hero-content { 
        flex-direction: column; 
        justify-content: center; 
        align-items: flex-start;
        text-align: left;
        padding-top: 60px;
    }
    .hero-poster { display: none; }
    .hero-info { width: 100%; }
    .hero-info h2 { font-size: 28px; text-shadow: 0 2px 10px #000; }
    .hero-meta { color: #eee; }
    
    .watch-container { flex-direction: column; }
    .sidebar { width: 100%; }
    .ep-list-body { max-height: 300px; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    #anime-listesi { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .anime-card { width: 100%; }
}
