/*
Theme Name: FilmKu
Theme URI: https://javxindo.cc
Description: Custom theme untuk FilmKu
Version: 1.0
Author: Kamu
*/

/* ============================================
   RESET & BASE
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f5f5f5;
    color: #333;
}
a { text-decoration: none; }
img { max-width: 100%; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: #111;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.site-logo {
    color: #e50914;
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}
.site-logo span { color: #fff; }

.header-search {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 400px;
}
.header-search input {
    flex: 1;
    padding: 7px 12px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
}
.header-search button {
    padding: 7px 14px;
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.header-search button:hover { background: #b0060f; }

/* ============================================
   NAV
   ============================================ */
.site-nav {
    background: #1a1a1a;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
}
.site-nav a {
    color: #ccc;
    font-size: 13px;
    transition: color 0.2s;
    white-space: nowrap;
}
.site-nav a:hover { color: #e50914; }

/* ============================================
   ARCHIVE - WRAP & HEADER
   ============================================ */
.archive-wrap {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
}
.archive-header {
    text-align: center;
    margin-bottom: 25px;
}
.archive-header h1 {
    font-size: 1.8em;
    color: #111;
}
.archive-header p {
    color: #888;
    margin-top: 5px;
    font-size: 14px;
}

/* ============================================
   ARCHIVE - SEARCH
   ============================================ */
.film-search {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.film-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.film-search input:focus { border-color: #e50914; }
.film-search button {
    padding: 10px 20px;
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.film-search button:hover { background: #b0060f; }

/* ============================================
   ARCHIVE - GRID & CARD
   ============================================ */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.film-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.film-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Thumb 16:9 */
.film-card-thumb {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #111;
}
.film-card-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s;
}
.film-card:hover .film-card-thumb img {
    transform: scale(1.05);
}
.film-card-thumb::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
    z-index: 1;  /* ← lebih rendah dari play button */
    pointer-events: none;
}
.film-card:hover .film-card-thumb::after {
    background: rgba(0,0,0,0.3);
}
/* Play button z-index lebih tinggi dari overlay */
.film-card-play {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 45px;
    height: 45px;
    background: rgba(229,9,20,0.9);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    pointer-events: none;
}
.film-card-play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent #fff;
}
.film-card:hover .film-card-play { opacity: 1; }
.film-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e50914;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    z-index: 2;
}
.film-card-no-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 40px;
}
.film-card-info { padding: 10px; }
.film-card-kode {
    font-size: 11px;
    color: #e50914;
    font-weight: bold;
    margin-bottom: 4px;
}
.film-card-title {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.film-card-artis {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.film-card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: #aaa;
}

/* ============================================
   ARCHIVE - PAGINATION
   ============================================ */
.film-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 30px;  /* ← tambah ini */
    flex-wrap: wrap;
    width: 100%;          /* ← tambah ini */
    padding: 0 15px;      /* ← tambah ini */
}
.film-pagination a,
.film-pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    display: inline-block; /* ← tambah ini */
}
.film-pagination a:hover { background: #ddd; }
.film-pagination .current {
    background: #e50914;
    color: #fff;
}

/* Fix pagination list dari WordPress */
.film-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.film-pagination ul li a,
.film-pagination ul li span {
    padding: 8px 14px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    display: inline-block;
}
.film-pagination ul li a:hover { background: #ddd; }
.film-pagination ul li span.current {
    background: #e50914;
    color: #fff;
}

/* ============================================
   SINGLE FILM - PLAYER
   ============================================ */
.film-wrap {
    max-width: 960px;
    margin: 30px auto;
    padding: 0 15px;
}
.player-wrap {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.player-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.server-list {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.server-btn {
    padding: 8px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.server-btn:hover { background: #555; }
.server-btn.active { background: #e50914; }

/* ============================================
   SINGLE FILM - INFO
   ============================================ */
.tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0088cc;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    transition: background 0.2s;
}
.tg-btn:hover {
    background: #006699;
    color: #fff;
}
.film-info {
    display: flex;
    gap: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
}
.film-cover img {
    width: 200px;
    border-radius: 8px;
    display: block;
}
.film-detail { flex: 1; }
.film-detail h1 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.4;
}
.film-meta {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.film-meta li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}
.film-meta li span:first-child {
    color: #888;
    min-width: 80px;
}
.film-meta li span:last-child { color: #eee; }
.film-synopsis {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.7;
}
.film-synopsis h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.film-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.film-empty p:first-child {
    font-size: 3em;
    margin-bottom: 10px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 13px;
}
.site-footer a { color: #e50914; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .film-info { flex-direction: column; }
    .film-cover img { width: 100%; }
    .header-inner { flex-wrap: wrap; }
    .header-search { max-width: 100%; }
}
@media (max-width: 480px) {
    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .film-search { flex-direction: column; }
    .site-logo { font-size: 1.2em; }
}

/* ============================================
   RELATED FILMS
   ============================================ */
.film-related {
    margin-top: 30px;
    margin-bottom: 30px;
}
.film-related h3 {
    color: #fff;
    font-size: 1em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e50914;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}
.related-card:hover { transform: translateY(-3px); }
.related-thumb {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #111;
}
.related-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.related-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.related-info strong {
    font-size: 11px;
    color: #e50914;
}
.related-info span {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}