:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #e50914; /* Kırmızı vurgu (CBH renklerine göre değiştirebilirsin) */
    --card-hover: #2a2a2a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* Header */
header {
    background: linear-gradient(to bottom, #000000, #121212);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #333;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logo { height: 60px; }
h1 { font-weight: 800; letter-spacing: 1px; }
.header-text p { color: var(--text-secondary); }

/* Arama */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-size: 1rem;
    outline: none;
}
.search-container .fa-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* GRID YAPISI (Klasörler) */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 2rem 5%;
    max-width: 1600px;
    margin: 0 auto;
}

.loading { text-align: center; grid-column: 1/-1; padding: 50px; color: #666; font-size: 1.2rem; }

/* Klasör Kartı */
.folder-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: #555;
    background: var(--card-hover);
}

/* Kapak Resmi */
.folder-cover {
    height: 180px;
    background-color: #000;
    position: relative;
    overflow: hidden;
}
.folder-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.folder-card:hover .folder-cover img { transform: scale(1.1); }

/* İkon (Resim yoksa) */
.folder-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 4rem;
}

.folder-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.folder-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #eee;
}

.folder-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* MODAL (Detay Görünümü) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background-color: #1a1a1a;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    min-height: 80vh;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 35px;
    cursor: pointer;
    color: #888;
}
.close-modal:hover { color: #fff; }

.modal-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.modal-description-box {
    background: #252525;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 30px;
    line-height: 1.6;
    color: #ddd;
    font-size: 1.05rem;
    white-space: pre-line; /* Satır başlarını korur */
}

/* Modal İçindeki Galeri Grid */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16/9; /* Video/Resim oranı */
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #333;
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.gallery-item:hover img { opacity: 0.8; }

.type-badge {
    position: absolute;
    top: 5px; right: 5px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
}

/* LIGHTBOX (Tam Ekran Medya) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
}
.lightbox-content { max-width: 90%; max-height: 90vh; }
.lightbox-content img, .lightbox-content video { 
    max-width: 100%; max-height: 90vh; border-radius: 5px; 
}
.close-lightbox {
    position: absolute; top: 20px; right: 30px;
    font-size: 40px; color: #fff; cursor: pointer;
}