/* ==========================================================================
   1. CSS RESET & TEMEL AYARLAR
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--korku-bg-dark);
    color: var(--korku-text-light);
    font-family: var(--korku-font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--korku-transition);
}

a:hover {
    color: var(--korku-red);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. YAPI & LAYOUT
   ========================================================================== */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding-top: 80px; /* Header yüksekliği kadar boşluk */
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   3. HEADER (ÜST MENÜ) TASARIMI
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(7, 7, 7, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--korku-border);
    z-index: 1000;
    transition: var(--korku-transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--korku-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-navigation ul {
    display: flex;
    gap: 20px;
}

.main-navigation a {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 0;
}

.header-actions button {
    background: none;
    border: none;
    color: var(--korku-text-light);
    cursor: pointer;
    transition: var(--korku-transition);
}

.header-actions button:hover {
    color: var(--korku-red);
}

/* ==========================================================================
   4. FOOTER (ALT KISIM) TASARIMI
   ========================================================================== */
.site-footer {
    background-color: var(--korku-bg-card);
    border-top: 1px solid var(--korku-border);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.footer-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-copyright {
    color: var(--korku-text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   5. MOBİL UYUM (RESPONSIVE)
   ========================================================================== */
@media (max-width: 768px) {
    .main-navigation {
        display: none; /* Şimdilik gizli, JS ile toggle menü yapacağız */
    }
}
/* ==========================================================================
   6. TEKİL FİLM/DİZİ DETAY SAYFASI (SINGLE)
   ========================================================================== */
.film-hero {
    position: relative;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    margin-top: -80px; /* Header'ın altına girmesi için */
    padding-bottom: 50px;
}

.film-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Yukarıdan aşağıya karanlık geçiş (Netflix stili) */
    background: linear-gradient(to bottom, rgba(5,5,5,0.3) 0%, rgba(5,5,5,0.8) 60%, rgba(5,5,5,1) 100%);
}

.film-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px;
    align-items: flex-end;
}

.film-poster {
    flex-shrink: 0;
    width: 300px;
    border-radius: var(--korku-radius);
    overflow: hidden;
    box-shadow: var(--shadow-red-glow);
}

.film-details {
    flex: 1;
    padding-bottom: 20px;
}

.film-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
}

.film-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--korku-text-light);
    align-items: center;
}

.meta-item.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
}

.film-genres a {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.film-genres a:hover {
    background: var(--korku-red);
    border-color: var(--korku-red);
}

.film-overview {
    margin-bottom: 20px;
    color: #cccccc;
    font-size: 1.05rem;
}

.film-overview h3 {
    color: var(--korku-text-light);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.film-crew p {
    margin-bottom: 8px;
    color: var(--korku-text-muted);
}
.film-crew a {
    color: #aaaaaa;
}

/* ==========================================================================
   7. VİDEO OYNATICI (PLAYER) TASARIMI
   ========================================================================== */
.film-player-section {
    margin-top: 50px;
}

.korkuflix-player-wrapper {
    background: var(--korku-bg-card);
    border: 1px solid var(--korku-border);
    border-radius: var(--korku-radius);
    overflow: hidden;
}

.player-servers {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #0f0f0f;
    border-bottom: 1px solid var(--korku-border);
    gap: 20px;
    flex-wrap: wrap;
}

.servers-title {
    font-weight: bold;
    color: var(--korku-text-muted);
}

.server-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.server-btn {
    background: #222;
    color: var(--korku-text-light);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--korku-transition);
}

.server-btn:hover {
    background: #333;
}

.server-btn.active {
    background: var(--korku-red);
    box-shadow: 0 0 10px rgba(193, 18, 31, 0.5);
}

.player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.player-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ==========================================================================
   8. FRAGMAN TASARIMI
   ========================================================================== */
.film-trailer-section {
    margin-top: 50px;
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--korku-red);
    padding-left: 10px;
}

.trailer-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--korku-radius);
    overflow: hidden;
}

.trailer-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Responsive Düzenlemeler */
@media (max-width: 992px) {
    .film-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .film-meta, .film-genres {
        justify-content: center;
    }
    .film-poster {
        width: 200px;
    }
    .film-title {
        font-size: 2rem;
    }
}
/* ==========================================================================
   9. DİZİ BÖLÜM LİSTESİ TASARIMI
   ========================================================================== */
.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.episode-item {
    display: flex;
    align-items: center;
    background: var(--korku-bg-card);
    border: 1px solid var(--korku-border);
    padding: 15px 20px;
    border-radius: var(--korku-radius);
    text-decoration: none;
    color: var(--korku-text-light);
    transition: var(--korku-transition);
}

.episode-item:hover {
    background: #1a1a1a;
    border-color: var(--korku-red);
    transform: translateX(5px);
}

.episode-number {
    display: flex;
    gap: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--korku-red);
    width: 80px;
    flex-shrink: 0;
}

.episode-title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
}

.episode-play-icon {
    opacity: 0.5;
    transition: var(--korku-transition);
}

.episode-item:hover .episode-play-icon {
    opacity: 1;
    color: var(--korku-red);
}

.no-episodes-message {
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--korku-radius);
    color: var(--korku-text-muted);
    text-align: center;
}
/* ==========================================================================
   10. ANA SAYFA, GRID VE KART TASARIMLARI
   ========================================================================== */
.korku-section {
    padding: 40px 0 10px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--korku-border);
    padding-bottom: 10px;
}

.section-header .section-title {
    margin: 0;
    border-left: 4px solid var(--korku-red);
    padding-left: 10px;
    font-size: 1.5rem;
}

.view-all {
    color: var(--korku-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--korku-transition);
}

.view-all:hover {
    color: var(--korku-red);
}

/* Grid Yapısı (Otomatik Duyarlı Sütunlar) */
.korku-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Kart Genel Tasarımı */
.korku-card {
    background: var(--korku-bg-card);
    border-radius: var(--korku-radius);
    overflow: hidden;
    transition: var(--korku-transition);
    position: relative;
    border: 1px solid transparent;
}

.korku-card:hover {
    transform: translateY(-8px);
    border-color: var(--korku-red);
    box-shadow: var(--shadow-red-glow);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Poster Alanı Oranı (2:3) */
.card-image-wrapper {
    position: relative;
    padding-top: 150%; 
    background: #111;
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.korku-card:hover .card-image-wrapper img {
    opacity: 0.8;
}

.card-rating {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #f5c518;
}

.card-info {
    padding: 15px 12px;
}

.card-title {
    font-size: 1rem;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--korku-text-light);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--korku-text-muted);
}

.card-type {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Mobil Cihazlar İçin Daraltma */
@media (max-width: 576px) {
    .korku-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
}
/* ==========================================================================
   11. SAYFALAMA (PAGINATION) TASARIMI
   ========================================================================== */
.korku-pagination .nav-links {
    display: inline-flex;
    gap: 5px;
    background: var(--korku-bg-card);
    padding: 10px;
    border-radius: var(--korku-radius);
    border: 1px solid var(--korku-border);
}

.korku-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    color: var(--korku-text-light);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--korku-transition);
    background: #111;
}

.korku-pagination .page-numbers:hover {
    background: #222;
    color: var(--korku-red);
}

.korku-pagination .page-numbers.current {
    background: var(--korku-red);
    color: #fff;
    font-weight: bold;
}
/* ==========================================================================
   12. HEADER VE MENÜ TASARIMI
   ========================================================================== */
.korku-header {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.korku-nav-list {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.korku-nav-list li a {
    color: var(--korku-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--korku-transition);
}

.korku-nav-list li a:hover {
    color: var(--korku-red);
}

/* Aktif (Bulunulan) Sayfa Rengi */
.korku-nav-list li.current-menu-item a {
    color: var(--korku-red);
    font-weight: bold;
}