/* ============================================================
   MASTER STYLESHEET - Untuk Semua Halaman PHP
   ============================================================ */

/* ---------- RESET & DASAR ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0F0F0F;
    display: flex;
    justify-content: center;
}

:root {
    --bg: #0F0F0F;
    --card: #1A1A1A;
    --surface: #252525;
    --border: #333333;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #9CA3AF;
    --overlay-search: rgba(0, 0, 0, 0.8);
    --nav-bg: rgba(26, 26, 26, 0.95);
    --accent: #E50914;
    --accent-light: #FF4D58;
    --accent-dark: #B20710;
    --section-pad: 16px;
    --max-width: 450px;
}


/* ---------- UTILITY ---------- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.theme-transition {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* ---------- APP SHELL ---------- */
.app-shell {
    width: 100%;
    max-width: var(--max-width);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background: var(--bg) !important;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* ---------- HEADER ---------- */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--section-pad);
    background: var(--bg);
    transition: background-color 0.3s;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-icon i {
    color: white;
    font-size: 18px;
    position: relative;
    z-index: 2;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: skewX(-20deg);
    animation: logo-shine 2.5s infinite;
}

@keyframes logo-shine {
    0% {
        left: -100%;
    }
    60% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s;
    white-space: nowrap;
    text-decoration: none;
}

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

/* ---------- SEARCH BAR ---------- */
.header-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px 3px 3px 12px;
    height: 36px;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.header-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.header-search .search-icon {
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    height: 100%;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.search-action-btn {
    flex-shrink: 0;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-action-btn:hover {
    background: var(--accent-dark);
}
.search-action-btn:active {
    transform: scale(0.92);
}
.search-action-btn i {
    font-size: 14px;
}

/* ---------- MAIN CONTENT ---------- */
.content {
    padding-bottom: 80px;
    height: calc(100dvh - 68px);
    overflow-y: auto;
    background: var(--bg);
    transition: background-color 0.3s;
}

/* ============================================================
   SECTION & LAYOUT COMPONENTS
   ============================================================ */

/* ---------- SECTION HEADER ---------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 var(--section-pad);
    margin-bottom: 16px;
    margin-top: 16px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #E70813, #F29C0B);
    transition: background-color 0.3s;
}

.see-all-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    text-decoration: none;
}

.see-all-btn:hover {
    text-decoration: underline;
}
.see-all-btn i {
    font-size: 14px;
}

/* ---------- SCROLL ROW ---------- */
.scroll-row {
    display: flex;
    gap: 12px;
    padding: 0 var(--section-pad);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.scroll-row::-webkit-scrollbar {
    display: none;
}
.scroll-row {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================================
   CAROUSEL / SLIDER
   ============================================================ */
.carousel-wrapper {
    margin-bottom: 24px;
    margin-top: 16px;
}

.carousel-section {
    position: relative;
    overflow: hidden;
    height: 240px;
    border-radius: 20px;
    margin: 0 var(--section-pad);
}

.featured-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.featured-slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
}

.slide-content {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 0 20px;
}

.slide-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.slide-meta .rating {
    color: #FACC15;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.slide-meta .rating i {
    font-size: 12px;
}

.slide-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.slide-genre {
    color: #D1D5DB;
    font-size: 11px;
    margin-bottom: 16px;
}

.watch-btn {
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    padding: 7px 16px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s, transform 0.15s;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.35);
}

.watch-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.04);
}
.watch-btn:active {
    transform: scale(0.95);
}
.watch-btn i {
    font-size: 14px;
}

/* ---------- DOTS ---------- */
.dots-container {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.featured-dot {
    height: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 9999px;
}

.dot-active {
    background: var(--accent) !important;
    width: 20px !important;
}
.dot-inactive {
    background: rgba(255, 255, 255, 0.4) !important;
    width: 8px !important;
}

/* ============================================================
   CARD COMPONENTS
   ============================================================ */

/* ---------- CARD IMAGE WRAPPER ---------- */
.card-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--surface);
    flex-shrink: 0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s;
    will-change: transform;
    background: var(--surface);
    opacity: 0;
    animation: fadeInImage 0.5s ease forwards;
}

.card-image-wrapper .gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent, transparent);
    pointer-events: none;
}

/* ---------- PLAY OVERLAY ---------- */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    text-decoration: none;
}

.play-overlay .play-circle {
    width: 40px;
    height: 40px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay .play-circle i {
    color: white;
    font-size: 20px;
}

/* ---------- CARD TITLE & GENRE ---------- */
.card-title {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s;
    text-decoration: none;
    line-height: 1.3;
    min-height: 1.3em;
}

a.card-title:hover {
    color: var(--accent);
}

.card-genre {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    color: var(--text-secondary);
    transition: color 0.3s;
    min-height: 1.2em;
}

/* ---------- BADGES ---------- */
.badge-quality {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-quality.hd {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: white;
}
.badge-quality.sd {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
}
.badge-quality.cam {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.badge-eps {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.rank-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    font-weight: 800;
    line-height: 1;
    color: white;
    text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 10;
    font-size: 25px;
}

/* ---------- MOVIE INFO OVERLAY ---------- */
.movie-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.movie-info-overlay .rating {
    color: #FACC15;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.movie-info-overlay .rating i {
    font-size: 10px;
}

.movie-info-overlay .year {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 600;
}

/* ============================================================
   MOVIE CARD (untuk grid)
   ============================================================ */
.movie-card {
    cursor: pointer;
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.movie-card:hover .movie-img {
    transform: scale(1.05);
}
.movie-card:hover .play-overlay {
    opacity: 1;
}

/* ---------- TOP CARD ---------- */
.top-card {
    flex-shrink: 0;
    width: 120px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.top-card .card-image-wrapper {
    aspect-ratio: 2 / 3;
    width: 100%;
}

/* ============================================================
   GRID LAYOUTS (3 KOLOM)
   ============================================================ */
.pop-grid,
.series-grid,
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 var(--section-pad);
}

/* ---------- VIDEO CARD (v-card) ---------- */
.v-card {
    cursor: pointer;
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.v-card-img {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    width: 100%;
    margin-bottom: 8px;
    flex-shrink: 0;
    background: var(--surface);
}

.v-card-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s;
    will-change: transform;
    background: var(--surface);
    opacity: 0;
    animation: fadeInImage 0.5s ease forwards;
}

.v-card:hover .v-card-img img {
    transform: scale(1.05);
}
.v-card:hover .play-overlay {
    opacity: 1;
}

.v-card-title {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s;
    line-height: 1.3;
    text-decoration: none;
}

a.v-card-title:hover {
    color: var(--accent);
}

.v-card-genre {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.category-section {
    margin-bottom: 24px;
    padding: 0 var(--section-pad);
}

.pills-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0 8px 0;
    
    /* Sembunyikan scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pills-row::-webkit-scrollbar {
    display: none;
}

/* Indikator gradient di sisi kanan */
.pills-row::after {
    content: '';
    position: sticky;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    flex-shrink: 0;
}

.cat-btn {
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--surface);
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.cat-btn:hover {
    background: var(--accent);
    color: white;
}
.cat-btn.active-cat {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

/* ============================================================
   CONTINUE WATCHING
   ============================================================ */
.continue-section {
    margin-bottom: 28px;
}

.continue-card {
    flex-shrink: 0;
    width: 260px;
    min-width: 0;
    position: relative;
}

.continue-card-img {
    height: 145px;
}
.continue-card .movie-info-overlay {
    padding-bottom: 10px;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
    transition: width 0.5s ease;
}

.remove-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
}
.remove-btn:hover {
    background: var(--accent);
}

.empty-history {
    padding: 30px 16px;
    text-align: center;
    color: var(--text-muted);
    width: 100%;
}

.empty-history i {
    font-size: 48px;
    display: block;
    margin: 0 auto 12px;
    opacity: 0.5;
}
.empty-history p {
    font-size: 14px;
    margin-bottom: 4px;
}
.empty-history small {
    font-size: 11px;
    opacity: 0.7;
}

/* ============================================================
   COMING SOON
   ============================================================ */
.coming-section {
    margin-bottom: 28px;
}

.coming-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 var(--section-pad);
}

.coming-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--card);
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.coming-item:hover {
    background: var(--surface);
}

.coming-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.coming-thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.coming-thumb .bell-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.coming-thumb .bell-overlay i {
    color: white;
    font-size: 32px;
}

.coming-info {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}

.coming-info .card-title {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.coming-info .card-genre {
    margin-bottom: 6px;
}

.coming-desc {
    font-size: 11px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.coming-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-badge {
    font-size: 9px;
    font-weight: 600;
    background: rgba(229, 9, 20, 0.2);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 6px;
}

.remind-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
    transition: color 0.2s;
}
.remind-btn:hover {
    color: var(--accent);
}
.remind-btn i {
    font-size: 12px;
}

/* ============================================================
   SEARCH & PAGINATION
   ============================================================ */
.search-info {
    padding: 0 var(--section-pad);
    margin: 16px 0;
}

.search-info-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.search-info-text strong {
    color: var(--text-primary);
}

.clear-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: 8px;
    margin-left: 8px;
    text-decoration: none;
}

.clear-search-btn:hover {
    background: var(--accent-dark);
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 20px var(--section-pad);
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.empty-state {
    text-align: center;
    padding: 40px var(--section-pad);
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
}
.empty-state strong {
    color: var(--text-primary);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-img {
    background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    aspect-ratio: 2 / 3;
}

.skeleton-title {
    height: 14px;
    width: 80%;
    background: var(--surface);
    border-radius: 4px;
    margin-top: 8px;
    animation: shimmer 1.5s infinite;
}

.skeleton-genre {
    height: 10px;
    width: 60%;
    background: var(--surface);
    border-radius: 4px;
    margin-top: 4px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* ---------- Image loading state ---------- */
.card-image-wrapper img.loading,
.v-card-img img.loading {
    filter: blur(10px);
    transform: scale(1.02);
}

.card-image-wrapper img.loaded,
.v-card-img img.loaded {
    filter: blur(0);
    transform: scale(1);
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.nav-bar {
    width: 100%;
    max-width: var(--max-width);
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    padding: 0 16px 12px;
    display: flex;
    justify-content: center;
}

.nav-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 80px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
    width: 100%;
    max-width: fit-content;
}

.nav-item {
    border-radius: 12px;
    transition: all 0.25s ease;
    padding: 6px 10px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    flex: 1;
    min-width: 52px;
    text-decoration: none;
    color: inherit;
}

.nav-item .nav-icon {
    font-size: 18px;
    color: var(--text-muted);
    transition: color 0.25s;
}

.nav-item .nav-label {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color 0.25s;
}

.nav-item.active {
    background: rgba(229, 9, 20, 0.1);
}
.nav-item.active .nav-icon {
    color: var(--accent);
}
.nav-item.active .nav-label {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: var(--max-width);
    padding: 0 20px;
    pointer-events: none;
}

.toast {
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease, fadeOut 0.3s ease 2.5s forwards;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---------- 480px ---------- */
@media (max-width: 480px) {
    :root {
        --section-pad: 14px;
    }
    .pop-grid,
    .series-grid,
    .skeleton-grid {
        gap: 8px;
    }
    .top-card {
        width: 110px;
    }
    .card-title,
    .v-card-title {
        font-size: 12px;
    }
    .card-genre,
    .v-card-genre {
        font-size: 10px;
    }
    .badge-quality,
    .badge-eps {
        font-size: 8px;
        padding: 2px 5px;
    }
    .play-overlay .play-circle {
        width: 32px;
        height: 32px;
    }
    .play-overlay .play-circle i {
        font-size: 16px;
    }
}

/* ---------- 390px ---------- */
@media (max-width: 390px) {
    .logo-text {
        display: none;
    }
    .header {
        gap: 8px;
    }
    :root {
        --section-pad: 12px;
    }
    .pop-grid,
    .series-grid,
    .skeleton-grid {
        gap: 6px;
    }
    .top-card {
        width: 100px;
    }
    .card-image-wrapper,
    .v-card-img {
        border-radius: 8px;
    }
    .card-title,
    .v-card-title {
        font-size: 11px;
    }
    .card-genre,
    .v-card-genre {
        font-size: 9px;
    }
    .badge-quality,
    .badge-eps {
        font-size: 7px;
        padding: 1px 4px;
        top: 4px;
        right: 4px;
    }
    .movie-info-overlay .rating {
        font-size: 9px;
    }
    .movie-info-overlay .rating i {
        font-size: 10px;
    }
    .movie-info-overlay .year {
        font-size: 9px;
    }
    .play-overlay .play-circle {
        width: 28px;
        height: 28px;
    }
    .play-overlay .play-circle i {
        font-size: 14px;
    }
    .section-title {
        font-size: 16px;
    }
}

/* ---------- 340px ---------- */
@media (max-width: 340px) {
    :root {
        --section-pad: 10px;
    }
    .pop-grid,
    .series-grid,
    .skeleton-grid {
        gap: 5px;
    }
    .top-card {
        width: 90px;
    }
    .card-title,
    .v-card-title {
        font-size: 10px;
    }
    .card-genre,
    .v-card-genre {
        font-size: 8px;
    }
    .badge-quality,
    .badge-eps {
        font-size: 6px;
        padding: 1px 3px;
        border-radius: 4px;
        top: 3px;
        right: 3px;
    }
    .movie-info-overlay {
        padding: 4px 6px;
    }
    .movie-info-overlay .rating {
        font-size: 8px;
    }
    .movie-info-overlay .rating i {
        font-size: 8px;
    }
    .movie-info-overlay .year {
        font-size: 8px;
    }
    .play-overlay .play-circle {
        width: 24px;
        height: 24px;
    }
    .play-overlay .play-circle i {
        font-size: 12px;
    }
    .section-title {
        font-size: 14px;
    }
}

/* ---------- 300px ---------- */
@media (max-width: 300px) {
    :root {
        --section-pad: 8px;
    }
    .pop-grid,
    .series-grid,
    .skeleton-grid {
        gap: 4px;
    }
    .top-card {
        width: 80px;
    }
    .card-title,
    .v-card-title {
        font-size: 9px;
    }
    .card-genre,
    .v-card-genre {
        font-size: 7px;
    }
    .badge-quality,
    .badge-eps {
        font-size: 5px;
        padding: 1px 2px;
        border-radius: 3px;
        top: 2px;
        right: 2px;
    }
    .movie-info-overlay {
        padding: 3px 4px;
    }
    .movie-info-overlay .rating {
        font-size: 7px;
    }
    .movie-info-overlay .rating i {
        font-size: 7px;
    }
    .movie-info-overlay .year {
        font-size: 7px;
    }
    .play-overlay .play-circle {
        width: 20px;
        height: 20px;
    }
    .play-overlay .play-circle i {
        font-size: 10px;
    }
    .section-title {
        font-size: 12px;
    }
}

/* ---------- Landscape ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .content {
        height: calc(100dvh - 60px);
    }
    .pop-grid,
    .series-grid,
    .skeleton-grid {
        gap: 6px;
    }
    .top-card {
        width: 90px;
    }
    .card-image-wrapper,
    .v-card-img {
        border-radius: 8px;
    }
    .card-title,
    .v-card-title {
        font-size: 11px;
    }
    .card-genre,
    .v-card-genre {
        font-size: 9px;
    }
    .section-header {
        margin-top: 8px;
        margin-bottom: 8px;
    }
    .section-title {
        font-size: 14px;
    }
}

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px var(--section-pad);
    margin-top: 8px;
}

.load-more-btn {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.02);
}

.load-more-btn:active {
    transform: scale(0.95);
}

.load-more-btn i {
    font-size: 14px;
}

.load-more-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.load-more-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Load More untuk mobile ---------- */
@media (max-width: 480px) {
    .load-more-btn {
        font-size: 12px;
        padding: 8px 24px;
    }
}

@media (max-width: 390px) {
    .load-more-btn {
        font-size: 11px;
        padding: 8px 20px;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   FOOTER - LENGKAP & TIDAK MELAYANG
   ============================================================ */

/* --- Perbaikan App Shell agar footer menempel di bawah --- */
.app-shell {
    width: 100%;
    max-width: 450px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: visible; /* PENTING: biarkan konten mengalir */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

/* --- Perbaikan Content agar mengisi ruang --- */
.content {
    flex: 1; /* Mengisi ruang kosong */
    overflow-y: auto;
    padding-bottom: 80px; /* Ruang untuk navbar */
    height: auto; /* Hapus height fixed */
    min-height: 0;
    background: var(--bg);
    transition: background-color 0.3s;
}

/* ============================================================
   FOOTER STYLES
   ============================================================ */

.app-footer {
    flex-shrink: 0; /* Tidak mengecil */
    margin-top: auto; /* Dorong ke bawah */
    background: linear-gradient(180deg, var(--bg) 0%, #0a0a0a 100%);
    border-top: 1px solid var(--border);
    padding: 4px 16px 80px; /* Padding bottom untuk nav */
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
    width: 100%;
    clear: both;
}

/* --- Container --- */
.footer-container {
    max-width: 450px;
    margin: 0 auto;
}

/* --- Brand --- */
.footer-brand {
    margin-bottom: 8px;
    text-align: center;
}

.footer-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    transition: transform 0.3s ease;
}

.footer-brand .logo-icon:hover {
    transform: scale(1.05) rotate(-5deg);
}

.footer-brand .logo-icon i {
    color: white;
    font-size: 14px;
}

.footer-brand h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 auto;
    transition: color 0.3s;
}

/* --- Social Icons --- */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.footer-social a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.35);
}

.footer-social a:active {
    transform: scale(0.95);
}

.footer-social a i {
    font-size: 14px;
}

/* --- Footer Bottom (Copyright & Links) --- */
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    gap: 4px 8px;
}

.footer-bottom .footer-copyright {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-bottom .footer-copyright a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-bottom .footer-copyright a:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

.footer-bottom .footer-links-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-bottom .footer-links-right a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    padding: 2px 4px;
    border-radius: 3px;
}

.footer-bottom .footer-links-right a:hover {
    color: var(--accent);
    background: rgba(229, 9, 20, 0.06);
}

.footer-bottom .footer-links-right .link-divider {
    color: var(--border);
    font-size: 11px;
    user-select: none;
}

/* ============================================================
   NAVBAR - FIXED DI BAWAH
   ============================================================ */

.nav-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    width: 100%;
    max-width: 450px;
    padding: 0 16px 12px;
    display: flex;
    justify-content: center;
    pointer-events: none; /* Biar klik tembus ke konten? */
}

.nav-pill {
    pointer-events: auto; /* Navbar bisa diklik */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 80px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
    width: 100%;
    max-width: fit-content;
}

.nav-item {
    border-radius: 12px;
    transition: all 0.25s ease;
    padding: 6px 10px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    flex: 1;
    min-width: 52px;
    text-decoration: none;
    color: inherit;
}

.nav-item .nav-icon {
    font-size: 18px;
    color: var(--text-muted);
    transition: color 0.25s;
}

.nav-item .nav-label {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color 0.25s;
}

.nav-item.active {
    background: rgba(229, 9, 20, 0.1);
}

.nav-item.active .nav-icon {
    color: var(--accent);
}

.nav-item.active .nav-label {
    color: var(--accent);
    font-weight: 600;
}

.nav-item:hover .nav-icon {
    color: var(--accent);
}

/* ============================================================
   RESPONSIVE FOOTER
   ============================================================ */

@media (max-width: 480px) {
    .app-footer {
        padding: 4px 12px 75px;
    }

    .footer-brand .logo-icon {
        width: 28px;
        height: 28px;
    }

    .footer-brand .logo-icon i {
        font-size: 12px;
    }

    .footer-brand h3 {
        font-size: 13px;
    }

    .footer-brand p {
        font-size: 13px;
    }

    .footer-social a {
        width: 28px;
        height: 28px;
    }

    .footer-social a i {
        font-size: 12px;
    }

    .footer-bottom .footer-copyright {
        font-size: 13px;
    }

    .footer-bottom .footer-links-right a {
        font-size: 13px;
    }

    .footer-bottom .footer-links-right .link-divider {
        font-size: 11px;
    }

    .content {
        padding-bottom: 75px;
    }
}

@media (max-width: 360px) {
    .app-footer {
        padding: 4px 10px 70px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2px;
    }

    .footer-bottom .footer-links-right {
        gap: 8px;
    }

    .footer-brand h3 {
        font-size: 13px;
    }

    .footer-brand p {
        font-size: 13px;
    }

    .footer-bottom .footer-copyright {
        font-size: 13px;
    }

    .footer-bottom .footer-links-right a {
        font-size: 13px;
    }

    .content {
        padding-bottom: 70px;
    }
}

/* --- Safe Area untuk iPhone --- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-footer {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    .nav-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* --- Dark Mode --- */
@media (prefers-color-scheme: dark) {
    .app-footer {
        background: linear-gradient(180deg, var(--bg) 0%, #050505 100%);
    }
}


/* ============================================================
   LOADING STANDAR (SEPERTI BIASA)
   ============================================================ */

/* --- Loading Overlay --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Container --- */
.loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Spinner Standar --- */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #e50914;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- Loading Text --- */
.loader-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 20px;
}

/* --- Animasi Spin --- */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================
   VARIANT DENGAN UKURAN BERBEDA
   ============================================================ */

/* Spinner Kecil */
.loader-spinner.small {
    width: 35px;
    height: 35px;
    border-width: 3px;
}

/* Spinner Sedang (Default) */
.loader-spinner.medium {
    width: 50px;
    height: 50px;
    border-width: 4px;
}

/* Spinner Besar */
.loader-spinner.large {
    width: 65px;
    height: 65px;
    border-width: 5px;
}

/* ============================================================
   VARIANT DENGAN WARNA BERBEDA
   ============================================================ */

/* Warna Merah (Default) */
.loader-spinner.red {
    border-top-color: #e50914;
}

/* Warna Putih */
.loader-spinner.white {
    border-top-color: #ffffff;
}

/* Warna Biru */
.loader-spinner.blue {
    border-top-color: #3b82f6;
}

/* Warna Hijau */
.loader-spinner.green {
    border-top-color: #22c55e;
}

/* Warna Kuning */
.loader-spinner.yellow {
    border-top-color: #f59e0b;
}

/* Warna Ungu */
.loader-spinner.purple {
    border-top-color: #8b5cf6;
}

/* ============================================================
   VARIANT DENGAN BACKGROUND
   ============================================================ */

.page-loader.with-bg {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    .loader-spinner {
        width: 40px;
        height: 40px;
        border-width: 3.5px;
    }

    .loader-text {
        font-size: 12px;
        margin-top: 16px;
        letter-spacing: 1.5px;
    }

    .loader-spinner.small {
        width: 28px;
        height: 28px;
        border-width: 2.5px;
    }

    .loader-spinner.large {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
}

@media (max-width: 360px) {
    .loader-spinner {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }

    .loader-text {
        font-size: 11px;
        margin-top: 14px;
        letter-spacing: 1px;
    }
}

/* ============================================================
   MODAL POPUP - KONFIRMASI
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

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

.modal-box {
    background: var(--card);
    border-radius: 20px;
    padding: 30px 24px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    transform: scale(0.9) translateY(30px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.modal-icon i {
    font-size: 28px;
    color: var(--accent);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    background: var(--surface);
    color: var(--text-secondary);
}

.modal-btn-cancel:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-btn-danger {
    background: var(--accent);
    color: white;
}

.modal-btn-danger:hover {
    background: var(--accent-dark);
    transform: scale(1.02);
}

.modal-btn-danger:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 480px) {
    .modal-box {
        padding: 24px 20px 20px;
        max-width: 320px;
    }
    
    .modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .modal-icon i {
        font-size: 24px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-desc {
        font-size: 13px;
    }
    
    .modal-btn {
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 360px) {
    .modal-box {
        padding: 20px 16px 16px;
        max-width: 280px;
    }
    
    .modal-icon {
        width: 48px;
        height: 48px;
    }
    
    .modal-icon i {
        font-size: 20px;
    }
    
    .modal-title {
        font-size: 15px;
    }
    
    .modal-desc {
        font-size: 12px;
    }
    
    .modal-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ---------- Safe Area ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .nav-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

