/* CSS - SKYX STREAMING */
/* Theme: Dark Neo-Brutalism, High Contrast, Fast Performance */

:root {
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --primary: #d4ff00;
    --border-color: #ffffff;
    --border-width: 3px;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: #ffffff;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    /* Padding bawah ditambah biar feed ga ketutupan menu melayang di HP */
    padding-bottom: 90px; 
}

/* =========================================
   HEADER & NAVBAR (Sejajar Logo & Search)
========================================= */
.navbar {
    display: flex;
    flex-direction: row; 
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: var(--bg-color);
    border-bottom: var(--border-width) solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    white-space: nowrap;
}

/* Kotak logo diperbesar */
.logo-icon {
    background: var(--primary);
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px var(--border-color);
    overflow: hidden;
}

/* Bikin gambar logo otomatis pas di dalam kotak */
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary);
    line-height: 1.2;
}

.search-container {
    display: flex;
    gap: 5px;
    flex: 1; 
    max-width: 400px;
}

#searchInput {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 2px solid var(--border-color);
    background: #000;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
}

#searchBtn {
    padding: 8px 12px;
}

/* =========================================
   BOTTOM NAVIGATION (Khusus Mobile)
========================================= */
.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background-color: var(--card-bg);
    border: var(--border-width) solid var(--primary);
    box-shadow: 4px 4px 0px var(--primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 5px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    width: 100%;
    border: 2px solid transparent;
    padding: 8px 2px;
}

.nav-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item:active, .nav-item:focus {
    background: var(--primary);
    color: #000;
    border-color: #000;
}

/* =========================================
   BUTTONS
========================================= */
button {
    font-family: inherit;
    margin-right: 4px;
    margin-bottom: 4px;
}

#searchBtn, .btn-primary, .btn-secondary, .btn-more, .btn-close {
    padding: 8px 15px;
    font-weight: 900;
    font-size: 14px;
    border: 2px solid var(--border-color);
    background: var(--primary);
    color: #000;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 3px 3px 0px var(--border-color);
}

.btn-secondary {
    background: #fff;
}

.btn-close {
    background: #ff3333;
    color: #fff;
}

button:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px transparent;
}

/* =========================================
   HERO SECTION (SPOTLIGHT)
========================================= */
.hero-section {
    padding: 30px 20px;
    margin: 20px;
    width: calc(100% - 40px);
    border: var(--border-width) solid var(--primary);
    background-color: var(--card-bg);
    box-shadow: 6px 6px 0px var(--primary);
    cursor: pointer;
    transition: background-image 0.5s ease-in-out;
    
    /* KUNCI TINGGI SPOTLIGHT AGAR STATIS */
    height: 300px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-section:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0px var(--primary);
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 4px 10px;
    font-weight: 900;
    border: 2px solid #000;
    margin-bottom: 10px;
}

.hero-section h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 5px;
    line-height: 1.2;
    word-wrap: break-word;
    
    /* Maksimal 2 baris agar layout tidak rusak */
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-info {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #ccc;
    word-wrap: break-word;
}

/* =========================================
   FEED SECTIONS & MOVIE GRID
========================================= */
.feed-section {
    margin: 40px 20px;
    scroll-margin-top: 90px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 1.2rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: auto;
    gap: 15px;
    padding-bottom: 15px;
    padding-top: 5px;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
}

.movie-grid::-webkit-scrollbar {
    height: 8px;
}
.movie-grid::-webkit-scrollbar-track {
    background: var(--bg-color);
    border: 2px solid #444;
}
.movie-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border: 2px solid #000;
}

/* =========================================
   VIEW ALL MODE (Grid Turun ke Bawah)
========================================= */
.movie-grid.view-all-mode {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: hidden;
    padding-bottom: 30px;
}

.movie-grid.view-all-mode .movie-card {
    flex: 0 0 calc(50% - 15px);
    max-width: 180px;
}

/* =========================================
   MOVIE CARDS
========================================= */
.movie-card {
    flex: 0 0 140px;
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 0px var(--border-color);
    color: #fff;
    margin-bottom: 4px;
    margin-right: 4px;
}

.movie-card:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px transparent;
}

.movie-poster-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-bottom: var(--border-width) solid var(--border-color);
    flex-shrink: 0;
}

.movie-poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #333;
}

.movie-type-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 2px solid #fff;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 900;
}

.movie-rating-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--primary);
    color: #000;
    border: 2px solid #000;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 900;
}

.movie-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.movie-year {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 900;
}

.movie-title {
    font-size: 0.9rem;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.2;
}

/* =========================================
   PLAYER SECTION (player.html)
========================================= */
.neo-brutal-box {
    margin: 20px;
    padding: 15px;
    border: var(--border-width) solid var(--border-color);
    background-color: var(--card-bg);
    box-shadow: 6px 6px 0px var(--primary);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 65%; /* Estetik 16:9 dilebarkan biar tombol ga kepotong */
    min-height: 280px; 
    background: #000;
}

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

/* =========================================
   ACCORDION & KATEGORI (Buka-Tutup)
========================================= */
.accordion-box {
    padding: 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: transparent;
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: none;
    margin: 0;
}

.accordion-header:active {
    transform: none;
    box-shadow: none;
}

.accordion-content {
    padding: 0 15px 15px 15px;
    border-top: 1px dashed #444;
    margin-top: 5px;
    padding-top: 15px;
}

.tips-list {
    list-style-type: none;
    font-size: 0.85rem;
    color: #ddd;
}

.tips-list li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.tips-list li::before {
    content: "þ";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.8rem;
}

.server-title {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.server-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-server {
    padding: 8px 12px;
    font-weight: 800;
    font-size: 12px;
    background: var(--bg-color);
    color: #fff;
    border: 2px solid var(--border-color);
    cursor: pointer;
    text-transform: uppercase;
    margin: 0;
    box-shadow: none;
}

.btn-server:hover {
    background: #222;
}

.btn-server.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 3px 3px 0px var(--border-color);
    transform: translate(-3px, -3px);
}

/* =========================================
   DETAIL FILM (player.html)
========================================= */
.detail-section {
    margin: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
}

.detail-section h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.movie-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    align-items: center;
    font-weight: 900;
    font-size: 0.85rem;
}

.badge {
    background: var(--primary);
    color: #000;
    padding: 4px 8px;
    border: 2px solid #000;
}

.movie-desc {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* =========================================
   MODAL / POP-UP PEMBERITAHUAN
========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-box {
    background-color: var(--card-bg);
    max-width: 450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 20px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: 6px 6px 0px var(--primary);
}

.modal-title {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 900;
    border-bottom: 2px dashed #444;
    padding-bottom: 10px;
}

.modal-text {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

.modal-overlay.hidden {
    display: none !important;
}

.btn-wa {
    display: block;
    text-align: center;
    background: #25D366;
    color: #fff;
    padding: 12px;
    font-weight: 900;
    text-decoration: none;
    border: 2px solid #fff;
    box-shadow: 4px 4px 0px #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.btn-wa:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px transparent;
}

.btn-close:disabled {
    background: #666666;
    color: #cccccc;
    border-color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* =========================================
   UTILITIES & FOOTER
========================================= */
.hidden {
    display: none !important;
}

.loading-state {
    padding: 20px;
    font-weight: bold;
    color: var(--primary);
    text-transform: uppercase;
}

.footer {
    text-align: center;
    padding: 20px;
    border-top: var(--border-width) solid var(--border-color);
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 0.8rem;
}

/* =========================================
   PENYESUAIAN KHUSUS DESKTOP (PC/Tablet)
========================================= */
@media (min-width: 768px) {
    .bottom-nav {
        position: static;
        flex-direction: row;
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        justify-content: flex-start;
        gap: 15px;
    }
    
    .nav-item {
        flex-direction: row;
        width: auto;
        padding: 5px 10px;
        border: 2px solid transparent;
    }
    
    .nav-text {
        font-size: 0.9rem;
    }

    body {
        padding-bottom: 0;
    }

    .navbar {
        flex-wrap: wrap;
    }
}
