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

body {
    background-color: #0d0d0d;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== HEADER ========== */
.header {
    background-color: #111111;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #ffffff;
}

.logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

.sidebar-header .logo img {
    height: 36px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 420px;
    margin: 0 20px;
}

.search-box input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: #e50914;
}

.search-box button {
    background: #e50914;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.search-box button:hover {
    background: #c40812;
}

.menu-btn {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px;
}

/* ========== SECTION ========== */
.section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 18px;
}

.see-all {
    color: #aaa;
    font-size: 13px;
}

.see-all:hover {
    color: #e50914;
}

/* ========== VIDEO GRID ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 1100px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ========== VIDEO CARD ========== */
.video-card {
    background: #161616;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.12);
}

.thumb-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    background: #222;
    overflow: hidden;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #0066ff;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge.sub {
    background: #00aa55;
}

.badge.decensored {
    background: #0066ff;
}

.heart {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.5);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.heart:hover {
    background: #e50914;
}

.code-year {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 16px 6px 6px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
}

.code-year .code {
    color: #fff;
}

.code-year .year {
    color: #e50914;
}

.card-info {
    padding: 8px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: #eee;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* ========== DETAIL PAGE ========== */
.detail-header {
    margin-bottom: 20px;
}

.detail-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
}

.player-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 24px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    height: auto;
}

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

.player-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 600px) {
    .player-wrapper {
        border-radius: 0;
        max-width: 100%;
    }
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: #e50914;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.play-btn:hover {
    background: #c40812;
    transform: translate(-50%, -50%) scale(1.05);
}

.server-box {
    background: #161616;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.server-label {
    color: #aaa;
    font-size: 14px;
    margin-right: 8px;
}

.server-btn {
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.server-btn.active {
    background: #e50914;
    border-color: #e50914;
}

.server-btn:hover {
    border-color: #e50914;
}

.server-btn.terabox {
    background: #0066ff;
    border-color: #0066ff;
}

.info-box {
    background: #161616;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    width: 80px;
    color: #888;
    flex-shrink: 0;
}

.info-value {
    color: #fff;
}

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

.genre-tag {
    background: #222;
    border: 1px solid #333;
    color: #ddd;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.genre-tag:hover {
    border-color: #e50914;
    color: #e50914;
}

.star-tag {
    background: #e50914;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== FOOTER ========== */
.footer {
    background: #111;
    border-top: 1px solid #222;
    padding: 30px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer h3 {
    color: #e50914;
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.footer p {
    color: #666;
    font-size: 12px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== ALERT ========== */
.alert-box {
    background: #e50914;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* ========== RESPONSIVE / MOBILE (SukaJAV-like) ========== */
@media (max-width: 700px) {
    .header {
        padding: 0;
    }
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px 12px;
    }
    .logo img {
        height: 36px;
    }
    .search-box {
        order: 3;
        max-width: 100%;
        margin: 0;
        width: 100%;
        flex: 1 1 100%;
    }
    .search-box input {
        font-size: 15px;
        padding: 10px 12px;
    }
    .search-box button {
        padding: 10px 16px;
        font-size: 14px;
    }
    .container {
        padding: 12px 10px 24px;
    }
    .section {
        margin-bottom: 24px;
    }
    .section-header {
        margin-bottom: 12px;
    }
    .section-title {
        font-size: 16px;
        font-weight: 700;
    }
    /* accent bar like SukaJAV */
    .section-title::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 18px;
        background: #e50914;
        border-radius: 2px;
        margin-right: 4px;
        vertical-align: middle;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .video-card {
        border-radius: 8px;
        background: #141414;
    }
    .video-card:hover {
        transform: none;
        box-shadow: none;
    }
    .thumb-wrapper {
        aspect-ratio: 2 / 3;
        border-radius: 8px 8px 0 0;
    }
    .card-info {
        padding: 8px 8px 10px;
    }
    .card-title {
        font-size: 12px;
        font-weight: 600;
        color: #f0f0f0;
        line-height: 1.35;
        -webkit-line-clamp: 2;
    }
    .badge {
        font-size: 10px;
        padding: 3px 7px;
        border-radius: 4px;
        top: 8px;
        right: 8px;
    }
    .detail-title {
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    /* Player full-width - tinggi lebih besar biar area video tidak ketutup tombol embed */
    .player-wrapper {
        max-width: 100%;
        width: 100%;
        border-radius: 8px;
        aspect-ratio: auto;
        min-height: 480px;
        margin-bottom: 12px;
    }
    .player-wrapper iframe {
        min-height: 480px;
    }
    @media (orientation: landscape) {
        .player-wrapper {
            min-height: 85vh;
        }
        .player-wrapper iframe {
            min-height: 85vh;
        }
    }
    .server-box {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 0;
    }
    .server-btn {
        font-size: 13px;
        padding: 8px 14px;
    }
    .info-box {
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .card-title {
        font-size: 11px;
    }
    .section-title {
        font-size: 15px;
    }
}

/* ========== SIDEBAR MENU ========== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #111;
    z-index: 210;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid #222;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #222;
}


.sidebar-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.sidebar-close:hover {
    background: #222;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: #ddd;
    font-size: 15px;
    transition: all 0.2s;
}

.sidebar-menu li a:hover {
    background: #1a1a1a;
    color: #e50914;
}

.sidebar-menu .menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: #222;
    margin: 10px 20px;
}

.sidebar-section-title {
    padding: 12px 20px 6px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ========== AD SLOTS ========== */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    overflow: hidden;
    text-align: center;
}
.ad-slot img,
.ad-slot iframe {
    max-width: 100%;
    height: auto;
}


/* ========== BOTTOM NAV (mobile only) ========== */
.bottom-nav {
    display: none;
}

@media (max-width: 700px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 150;
        background: #0d0d0d;
        border-top: 1px solid #222;
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
        justify-content: space-around;
        align-items: center;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: #888;
        text-decoration: none;
        font-size: 10px;
        padding: 4px 8px;
        min-width: 60px;
    }
    .bottom-nav-item .bn-icon {
        font-size: 20px;
        line-height: 1;
    }
    .bottom-nav-item.active,
    .bottom-nav-item:active {
        color: #e50914;
    }
    body {
        padding-bottom: 64px;
    }
    /* Mobile header: logo center like SukaJAV */
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        padding: 10px 12px 12px;
    }
    .header-inner .logo {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        order: 0;
    }
    .header-inner .logo img {
        height: 40px;
    }
    .header-inner .menu-btn {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        order: 0;
        z-index: 2;
    }
    .header-inner .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
        order: 0;
        margin-top: 4px;
    }
    .header {
        border-bottom: 2px solid #e50914;
    }
    /* Hide desktop-style menu btn visual conflict - keep functional */
    .menu-btn {
        background: #1a1a1a;
        border: 1px solid #333;
        color: #fff;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        font-size: 18px;
    }
}
