/* ==========================================
   LAYOUT HALAMAN NONTON (WATCH)
   ========================================== */
.main-wrapper {
    max-width: 1350px;
    margin: 20px auto;
    padding: 0 16px;
    display: flex;
    gap: 24px;
}

.primary-content {
    flex: 1;
    min-width: 0;
}

/* Sidebar Kanan: Slot Iklan & Terkait */
.sidebar-content {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 1. Kotak Pemutar Video Responsif */
.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Rasio 16:9 */
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 2. Tombol Server & Download */
.control-box {
    background-color: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-label {
    font-size: 0.85rem;
    color: #888;
    width: 75px;
    flex-shrink: 0;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-ctrl {
    background-color: #262626;
    color: #ddd;
    border: 1px solid #333;
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-ctrl:hover {
    background-color: #383838;
    color: #fff;
}

.btn-ctrl.active {
    background-color: #e50914; /* Merah menyala */
    border-color: #e50914;
    color: #fff;
    font-weight: bold;
}

.btn-dl {
    background-color: #1f1f1f;
}

/* 3. Judul Postingan */
.main-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin: 18px 0 14px;
}

/* 4. Deskripsi & Toggle Expand */
.detail-section {
    background-color: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 16px;
}

.section-heading {
    font-size: 0.95rem;
    color: #eee;
    margin-bottom: 8px;
}

.desc-text {
    font-size: 0.88rem;
    color: #aaa;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.desc-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-toggle-capsule {
    background: none;
    border: none;
    color: #e50914;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 8px;
    padding: 0;
    font-weight: 600;
}

/* ==========================================
   TABEL DETAIL METADATA RAPI
   ========================================== */
.metadata-table {
    display: flex;
    flex-direction: column;
    gap: 14px; /* Memberi jarak vertikal antar baris agar tidak dempet */
    background-color: #121212;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center; /* Membuat teks label dan kotak kapsul sejajar tengah */
    min-height: 32px;
}

.meta-key {
    width: 140px; /* Lebar kolom label kiri dibuat seragam */
    color: #888;
    font-size: 0.88rem;
    font-weight: 500;
    flex-shrink: 0;
}

.meta-val {
    color: #e0e0e0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px; /* Jarak antar tombol tag jika ada banyak */
    flex: 1;
}

/* Badge Kapsul (Jenis, Pembuat, Aktris, Genre, Tag) */
.tag-capsule {
    display: inline-flex;
    align-items: center;
    background-color: #1c1c1c;
    color: #ccc;
    border: 1px solid #2e2e2e;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    text-decoration: none;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.tag-capsule:hover {
    background-color: #941b35; /* Merah hati senada aksen menu */
    border-color: #941b35;
    color: #fff;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-capsule {
    display: inline-block;
    background-color: #222;
    color: #bbb;
    border: 1px solid #333;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.tag-capsule:hover {
    background-color: #e50914;
    border-color: #e50914;
    color: #fff;
}

/* 6. Slot Iklan Banner 300x250 */
.ad-slot {
    width: 300px;
    height: 250px;
    background-color: #141414;
    border: 1px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* 7. Video Terkait Sidebar */
.related-list {
    background-color: #141414;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px;
}

.related-card {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
    align-items: center;
}

.related-thumb {
    width: 100px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-title {
    font-size: 0.8rem;
    color: #ccc;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 8. Rekomendasi Grid Bawah */
.bottom-related-section {
    margin-top: 30px;
    border-top: 1px solid #222;
    padding-top: 20px;
}

.bottom-related-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 16px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.grid-card {
    background-color: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.grid-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.grid-card-title {
    padding: 10px;
    font-size: 0.82rem;
    line-height: 1.3;
    color: #ddd;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 992px) {
    .main-wrapper {
        flex-direction: column;
    }
    .sidebar-content {
        width: 100%;
        align-items: center;
    }
}
/* Baris Tombol Episode */
.episode-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.episode-label {
    color: #8a8d93;
    font-size: 14px;
    font-weight: 500;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-btn {
    min-width: 44px;
    text-align: center;
}

.ep-btn:hover {
    background-color: #32353e;
}

.ep-btn.active {
    background-color: #ff5b79;
    color: #ffffff;
    font-weight: 600;
}