:root {
    --bg: #0a0a0a;
    --card: #111;
    --line: #222;
    --text: #eee;
    --muted: #bfbfbf;
    --red: #ef4444;
    --red-deep: #b91c1c;
}

/* Page */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 16px 60px;
    color: var(--text)
}

h1 {
    margin: .2rem 0 1rem;
    font-size: clamp(26px,4vw,40px)
}

.lead {
    color: var(--muted);
    margin: 0 0 14px
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 16px
}

.filter {
    border: 1px solid #333;
    background: #0b0b0b;
    color: #ddd;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer
}

    .filter.active {
        background: var(--red-deep);
        color: #fff;
        border-color: #7f1d1d
    }

/* Grid + Card */
.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(1, minmax(0,1fr))
}

@media (min-width:640px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0,1fr))
    }
}

@media (min-width:980px) {
    .grid {
        grid-template-columns: repeat(4, minmax(0,1fr))
    }
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transform: translateY(8px);
    opacity: 0;
    transition: .45s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .card.show {
        transform: none;
        opacity: 1
    }

/* Masaüstünde eşit yükseklik (kompakt) */
@media (min-width:980px) {
    .card {
        height: 300px;
    }

    .media {
        height: 150px;
    }
    /* üst kısım */
    .card-body {
        height: calc(300px - 150px);
    }
    /* alt kısım */
}

.media {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    flex-shrink: 0
}

    .media img, .media video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block
    }

    .media .hover {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,.35), transparent 55%);
        opacity: 0;
        transition: .25s
    }

.card:hover .media .hover {
    opacity: 1
}

.play-badge {
    position: absolute;
    inset: auto auto 10px 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, #ffb3b3, #ef4444 60%, #7f1d1d);
    box-shadow: 0 4px 18px rgba(239,68,68,.45);
    border: 1px solid rgba(255,255,255,.12)
}

    .play-badge svg {
        width: 18px;
        height: 18px;
        fill: #fff;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,.6))
    }

.card-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px
}

.title {
    font-weight: 800;
    margin: 0;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desc {
    margin: 0;
    color: #d8d8d8;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px
}

.chip {
    font-size: 11px;
    border: 1px solid #333;
    background: #0b0b0b;
    color: #ddd;
    padding: 3px 8px;
    border-radius: 999px
}

.code {
    color: #a9a9a9;
    font-size: 11px
}

/* Load more */
.loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px
}

.btn {
    border: 1px solid #333;
    background: #000;
    color: #fff;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer
}

    .btn:hover {
        filter: brightness(1.06)
    }

/* ===== Modal (fixli & ortalanmış) ===== */
.overlay {
    position: fixed;
    inset: 0;
    display: none; /* başlangıçta kapalı */
    align-items: center;
    justify-content: center; /* tam ortala */
    z-index: 9999;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(6px);
}

    .overlay.show {
        display: flex !important;
    }
    /* muhtemel çakışmayı ez */

    /* Bazı framework'lerde .modal {display:none} gelir; ezmek için !important */
    .overlay .modal {
        display: flex !important;
        flex-direction: column;
        margin: 0 auto;
        position: relative;
        width: min(900px,94vw);
        max-height: 90vh;
        background: #111;
        border: 1px solid #222;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,.5);
        animation: pop .16s ease-out;
        transform: translate3d(0,0,0);
    }

@keyframes pop {
    from {
        transform: scale(.96);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #222
}

    .modal-head .title {
        font-size: 15px
    }

.close {
    background: transparent;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer
}

.modal-body {
    background: #000;
    overflow: auto; /* içerik taşarsa scroll */
}

    .modal-body img,
    .modal-body video {
        width: 100%;
        height: auto;
        display: block;
        max-height: 72vh;
        object-fit: contain;
        background: #000
    }

.modal-foot {
    padding: 10px 12px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center
}

    .modal-foot .desc {
        color: #dcdcdc
    }
