/* ===========================================
    Tema: Comic Book (LENGKAP v2)
    File: public/css/style.css
   =========================================== */

/* --- 1. Global & Font --- */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Roboto:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.6;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 10px 10px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

h1, h2 {
    font-family: 'Bangers', sans-serif;
    font-size: 3rem;
    color: #ffd900; 
    letter-spacing: 2px;
    text-shadow: 3px 3px 0px #000;
}
h3 {
    font-family: 'Bangers', sans-serif;
    font-size: 2rem;
    color: #f0f0f0;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0px #000;
}

a {
    color: #00aaff; 
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
a:hover {
    color: #ffd900;
}

img {
    max-width: 100%;
    display: block;
}

/* --- 2. Navbar --- */
.navbar {
    background-color: #222;
    border-bottom: 5px solid #000;
    position: sticky; 
    top: 0;
    z-index: 100;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin: 0 auto;
}
.nav-brand {
    font-family: 'Bangers', sans-serif;
    font-size: 2.5rem;
    color: #ffd900;
    text-shadow: 3px 3px 0px #000;
}
.nav-menu {
    display: flex;
    gap: 20px;
}
.nav-link {
    font-family: 'Bangers', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    padding: 5px 10px;
    text-shadow: 2px 2px 0px #000;
    transition: color 0.2s;
}
.nav-link:hover {
    color: #ffd900;
}

/* --- 3. Tombol Hamburger (Mobile) --- */
.hamburger-btn {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.hamburger-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    border: 1px solid #000;
    transition: all 0.3s ease-in-out;
}
.hamburger-btn.is-active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-btn.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 4. Tombol (COMIC STYLE) --- */
.pixel-btn {
    font-family: 'Bangers', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #000;
    background-color: #ffd900;
    border: 3px solid #000;
    padding: 10px 15px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    width: auto;
    margin-top: 10px;
    box-shadow: 4px 4px 0px #000;
    transform: skew(-10deg);
    transition: all 0.2s ease-out;
}
.pixel-btn:hover {
    transform: skew(-10deg) scale(1.05);
    box-shadow: 6px 6px 0px #000;
}
.pixel-btn:active {
    transform: skew(-10deg) scale(1) translate(2px, 2px);
    box-shadow: 0px 0px 0px #000;
}
.pixel-btn:disabled {
    background-color: #777; 
    color: #ccc;
    transform: skew(-10deg) translate(2px, 2px); 
    box-shadow: 0px 0px 0px #000;
    cursor: not-allowed;
}

/* --- 5. Card Anime (Panel Komik) --- */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px; 
}
.anime-card {
    background-color: #2b2b2b;
    border: 4px solid #000;
    box-shadow: 6px 6px 0px #000;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease-out;
}
.anime-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #000;
}
.poster-container {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-color: #1a1a1a;
    border-bottom: 4px solid #000;
}
.anime-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-content h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f0f0f0;
    text-shadow: none; 
    margin: 0 0 10px 0;
    min-height: 2.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    flex-grow: 1;
}

/* --- 6. Halaman Detail (Panel Besar) --- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 250px 1fr;
    }
}
.detail-poster img {
    border: 4px solid #000;
    box-shadow: 5px 5px 0px #000;
    width: 100%;
}
.detail-info {
    background: #2b2b2b;
    border: 4px solid #000;
    padding: 25px;
    box-shadow: 5px 5px 0px #000;
    position: relative;
    z-index: 1;
}
.detail-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.3) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: -1;
}

/* FIX: Perbaikan Kontras Genre Tag 
  Default-nya Kuning (Kontras Tinggi), Hover-nya Biru
*/
.genre-tag {
    font-family: 'Bangers', sans-serif;
    letter-spacing: 1px;
    background-color: #ffd900; /* Default KUNING */
    color: #000; /* Default HITAM */
    padding: 3px 8px;
    font-size: 1rem;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    transform: skew(-10deg);
    transition: all 0.2s ease-out; /* Transisi */
}
.genre-tag:hover {
    background-color: #00aaff; /* Hover BIRU */
    color: #fff; /* Hover PUTIH */
    transform: skew(-10deg) scale(1.05);
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.episode-btn {
    background-color: #444;
    color: #fff;
    width: 100%; 
    margin-top: 0; 
    text-align: left; 
    padding-left: 20px;
}
.episode-btn:hover {
    background-color: #00aaff;
    color: #fff;
}

/* --- 7. Halaman Nonton (Panel Video) --- */
.video-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border: 5px solid #000;
    box-shadow: 6px 6px 0px #000;
    margin-bottom: 20px;
    border-radius: 0;
    overflow: hidden;
}
.video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.server-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.server-btn {
    background-color: #444;
    color: #fff;
}
.server-btn:hover {
    background-color: #00aaff;
    color: #fff;
}

/* --- 8. Hero Slider (Home) --- */
.hero-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #111;
    border-bottom: 5px solid #000;
}
.hero-slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
    -ms-overflow-style: none;  
}
.hero-slides::-webkit-scrollbar {
    display: none; 
}
.hero-slide {
    flex: 0 0 100%; 
    width: 100%;
    position: relative;
    min-height: 450px;
    padding: 20px 0;
    scroll-snap-align: start; 
    overflow: hidden;
}
.slide-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
}
.slide-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
}
.slide-poster {
    width: 200px;
    height: auto;
    border: 4px solid #000;
    box-shadow: 5px 5px 0px #000;
    flex-shrink: 0;
}
.slide-content {
    flex-grow: 1;
}
.slide-tag {
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    background-color: #ffd900;
    color: #000;
    padding: 5px 10px;
    font-family: 'Bangers', sans-serif;
    font-size: 1.1rem;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px #000;
    margin-bottom: 10px;
}
.slide-tag svg {
    border: 1px solid #000;
}
.slide-title {
    font-family: 'Bangers', sans-serif;
    font-size: 2.8rem;
    color: #fff;
    text-shadow: 3px 3px 0px #000, 3px 3px 0px #000;
    line-height: 1.2;
    margin: 10px 0;
}
.slide-btn {
    background-color: #ffd900;
    color: #000;
    font-size: 1.3rem;
    padding: 12px 20px;
}
.slide-btn:hover {
    background-color: #fff;
}

/* --- 9. Halaman Jadwal --- */
.schedule-day {
    margin-bottom: 40px;
    border-bottom: 4px solid #000;
    padding-bottom: 20px;
}
.schedule-day:last-child {
    border-bottom: none;
}
.schedule-day .day-title {
    color: #ffd900;
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.schedule-day .anime-card .card-content {
    justify-content: space-between;
}
.schedule-day .anime-card .pixel-btn {
    display: none; 
}

/* --- 10. Wadah Tag (Genre) --- */
.tag-container {
    display: flex;
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 40px;
}

/* --- 11. Pagination --- */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}
.pagination-status {
    font-family: 'Bangers', sans-serif;
    font-size: 1.5rem;
    color: #f0f0f0;
    text-shadow: 2px 2px 0px #000;
}
.pagination-btn {
    font-size: 1rem;
    padding: 8px 12px;
    background-color: #444;
    color: #fff;
}
.pagination-btn:hover {
    background-color: #00aaff;
    color: #fff;
}

/* --- 12. Halaman 404 --- */
.not-found-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh; 
    text-align: center;
}
.not-found-box {
    background-color: #2b2b2b;
    border: 4px solid #000;
    box-shadow: 6px 6px 0px #000;
    padding: 40px;
}
.not-found-title {
    font-size: 8rem; 
    color: #ffd900;
    text-shadow: 5px 5px 0px #000;
    margin: 0;
    line-height: 1;
}

/* --- 13. Loading Overlay --- */
#loader-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a; 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; 
    opacity: 1;
    transition: opacity 0.5s ease-out;
}
.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #444; 
    border-top-color: #ffd900; 
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- 14. Halaman Search --- */
.search-page-form {
    display: flex;
    gap: 10px; 
    margin-bottom: 30px;
}
.search-page-input {
    flex-grow: 1; 
    padding: 12px 15px;
    font-size: 1.1rem;
    font-family: 'Roboto', sans-serif;
    background-color: #f0f0f0;
    color: #1a1a1a;
    border: 3px solid #000;
    box-shadow: 4px 4px 0px #000;
}
.search-page-input:focus {
    outline: none;
    border-color: #ffd900;
}
.search-page-form .pixel-btn {
    width: auto; 
    margin-top: 0;
}

/* --- 15. Header Section (Home) --- */
.section-header {
    display: flex;
    justify-content: space-between; 
    align-items: baseline; 
    border-bottom: 4px solid #000; 
    margin-bottom: 20px;
}
.section-header h2 {
    margin-bottom: 10px; 
}
.view-all-link {
    font-family: 'Bangers', sans-serif;
    font-size: 1.3rem;
    color: #ffd900;
    text-shadow: 2px 2px 0px #000;
    flex-shrink: 0; 
    padding-left: 20px;
}
.view-all-link:hover {
    color: #fff;
}

/* --- 16. Kustom Modal Pop-up --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}
.modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    background-color: #2b2b2b;
    border: 4px solid #000;
    box-shadow: 6px 6px 0px #000;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}
.modal-overlay.is-active .modal-box {
    transform: scale(1);
}
.modal-title {
    font-family: 'Bangers', sans-serif;
    font-size: 2rem;
    color: #ffd900;
    text-shadow: 2px 2px 0px #000;
    margin-top: 0;
    margin-bottom: 15px;
}
.modal-text {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 25px;
}
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.modal-actions .pixel-btn {
    margin-top: 0;
}
.modal-actions .btn-danger {
    background-color: #ff4d4d;
    color: #fff;
}
.modal-actions .btn-danger:hover {
    background-color: #ff2d2d;
}
.modal-actions .btn-secondary {
    background-color: #555;
    color: #fff;
}
.modal-actions .btn-secondary:hover {
    background-color: #777;
}

/* --- 17. Halaman "My List" --- */
.history-item-btn {
    background-color: #333;
    color: #fff;
    width: 100%;
    margin-top: 0;
    text-align: left;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; 
}
.history-item-btn:hover {
    background-color: #00aaff;
}
.history-date {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    color: #ccc;
    font-weight: 400; 
    text-shadow: none;
}
.remove-btn {
    background-color: #ff4d4d; 
    color: #fff;
    font-size: 1rem;
    padding: 8px 10px;
}
.remove-btn:hover {
    background-color: #ff2d2d; 
    color: #fff;
}

/* --- 18. Halaman Help (BARU) --- */
.help-section-box {
    background-color: #2b2b2b;
    border: 4px solid #000;
    padding: 25px;
    box-shadow: 5px 5px 0px #000;
    margin-bottom: 25px;
}
.help-title {
    font-family: 'Bangers', sans-serif;
    font-size: 1.8rem;
    color: #ffd900; 
    text-shadow: 2px 2px 0px #000;
    margin-top: 0;
    margin-bottom: 15px;
}
.help-section-box p {
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 10px;
}
.help-section-box ol {
    padding-left: 20px;
}
.help-section-box ol li {
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 5px;
}

.footer {
    background-color: #222;
    border-top: 5px solid #000;
    margin-top: 40px;
    padding-top: 30px;
}
.footer-grid {
    display: grid;
    /* 3 kolom di desktop, 1 di HP */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.footer-col {
    background-color: #2b2b2b;
    border: 4px solid #000;
    padding: 20px;
    box-shadow: 4px 4px 0px #000;
}
.footer-title {
    font-family: 'Bangers', sans-serif;
    font-size: 1.8rem;
    color: #ffd900;
    text-shadow: 2px 2px 0px #000;
    margin-top: 0;
    margin-bottom: 15px;
}
.footer-col p {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li a {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #f0f0f0;
    font-size: 1rem;
    text-decoration: none;
    display: block;
    padding: 5px 0;
}
.footer-links li a:hover {
    color: #ffd900;
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 4px solid #000;
    background-color: #1a1a1a;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
}
.footer-simple {
    text-align: center; /* Teks di tengah */
    padding: 25px 0;
    margin-top: 40px; /* Jarak dari konten di atas */
    border-top: 5px solid #000; /* Garis komik */
    background-color: #1a1a1a; /* Latar gelap (sama dgn body) */
}

.footer-simple p {
    margin: 0;
    font-family: 'Roboto', sans-serif; /* Font baca biasa */
    font-size: 0.9rem;
    color: #888; /* Warna abu-abu */
}
.history-item-btn {
    background-color: #333;
    color: #fff;
    width: 100%;
    margin-top: 0;
    text-align: left;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* Jarak antar item */
}
.install-page-box {
    background-color: #2b2b2b;
    border: 4px solid #000;
    padding: 25px;
    box-shadow: 5px 5px 0px #000;
    margin-bottom: 25px;
    text-align: center; /* Bikin tombol di tengah */
}

/* ===========================================
   20. Responsive (Mobile Fix) - GABUNGAN
   =========================================== */

@media (max-width: 768px) {

    /* --- Perbaikan Font Judul --- */
    h1, h2 {
        font-size: 2.2rem; 
    }
    h3 {
        font-size: 1.8rem;
    }
    .container {
        width: 95%; 
    }

    /* --- Perbaikan Navbar & Hamburger --- */
    .nav-container {
        justify-content: space-between;
    }
    .hamburger-btn {
        display: block; 
    }
    .nav-menu {
        position: absolute;
        top: 60px; 
        left: 0;
        right: 0;
        background-color: #222;
        border-bottom: 5px solid #000;
        flex-direction: column;
        padding: 10px 0;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .nav-menu.is-active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-menu .nav-link {
        text-align: center;
        padding: 15px;
        text-shadow: none;
    }
    .nav-menu .nav-link:hover {
        background-color: #ffd900;
        color: #000;
    }
    .nav-brand {
        font-size: 2rem;
    }

    /* --- Perbaikan Hero Slider --- */
    .hero-slide {
        min-height: 0; 
        padding: 30px 0;
    }
    .slide-content-wrapper {
        flex-direction: column; 
        text-align: center; 
        gap: 20px;
    }
    .slide-poster {
        width: 180px; 
        height: auto;
    }
    .slide-title {
        font-size: 1.8rem; 
        line-height: 1.3;
    }
    .slide-tag {
        font-size: 1rem;
    }
    .slide-btn {
        font-size: 1.1rem;
        padding: 10px 15px;
        transform: skew(-10deg); 
    }
    .hero-slides {
        scroll-snap-type: x mandatory;
    }

    /* --- Perbaikan Grid Anime --- */
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; 
    }
    .anime-card {
        box-shadow: 4px 4px 0px #000; 
    }
    .anime-card:hover {
        transform: none; 
        box-shadow: 4px 4px 0px #000;
    }
    .card-content h3 {
        font-size: 1rem; 
        min-height: 0; 
    }
    .pixel-btn:hover {
        transform: skew(-10deg) scale(1.05); 
    }

    /* --- Perbaikan Halaman Detail --- */
    .detail-grid {
        grid-template-columns: 1fr; 
    }
    .detail-poster img {
        width: 60%; 
        margin: 0 auto; 
    }

    /* --- Perbaikan Header Section (Home) --- */
    .section-header {
        align-items: flex-end; /* Biar rapi saat judul 2 baris */
    }
    .section-header h2 {
        font-size: 1.8rem; /* Perkecil judul section */
    }
    .view-all-link {
        font-size: 1rem;
    }

    /* --- Perbaikan Halaman Search --- */
    .search-page-form {
        flex-direction: column; /* Susun vertikal */
    }
    .search-page-input {
        width: 100%;
    }
    .search-page-form .pixel-btn {
        width: 100%; /* Tombol jadi full-width */
        transform: skew(-10deg); /* Balikin skew-nya */
    }
}