/* Reset dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #111;
    color: #fff;
    padding-bottom: 120px; /* agar tidak tertutup footer/sticky ads */
}

/* Header Styling */
header {
    background-color: #0d0d0d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Logo */
header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    height: 50px;
    margin-right: 10px;
}

header .logo h1 {
    font-size: 24px;
    color: #00bcd4;
}

/* Navigasi */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center; /* Tambahan untuk center */
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    padding: 10px;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #00bcd4;
}


/* Back Button (untuk link kembali) */
.back-button {
    display: inline-block;
    margin-right: 20px;
    text-decoration: none;
    font-size: 18px;
    color: #00bcd4;
}
.back-button:hover {
    color: #008c9e;
}

/* Search Bar */
.search-box {
    display: flex;
    align-items: center;
    background: #222;
    padding: 5px 10px;
    border-radius: 5px;
}

.search-box input {
    background: none;
    border: none;
    color: #fff;
    padding: 5px;
    outline: none;
}

.search-box button {
    background: #00bcd4;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: #fff;
    border-radius: 3px;
}

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

/* =========[ Film Page Styles ]========= */

/* Film Page Container */
.film-page-container {
    margin: 20px auto;
    padding: 20px;
    background: #2b2b2b;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* Age Verification Section */
#age-verification {
    text-align: center;
    background: #3a3a3a;
    padding: 20px;
    border-radius: 10px;
}

#age-verification input {
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #999;
    background: #2a2a2a;
    color: #fff;
}

#verify-button {
    margin-top: 10px;
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#verify-button:hover {
    background: #0056b3;
}

/* Restricted Content */
#restricted-content {
    display: none;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    text-align: center;
}

/* Film Items */
.film-item {
    background: #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.film-item h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.film-item iframe {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    border: none;
}

/* Responsive Adjustments for Film Page */
@media (max-width: 768px) {
    .film-item iframe {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .film-item iframe {
        height: 250px;
    }
}

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px;
}

@media screen and (max-width: 480px) {
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 320px) {
    .anime-grid {
        grid-template-columns: 1fr;
    }
}

/* Anime Card */
.anime-card {
    background-color: #2b2b2b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.anime-card:hover {
    transform: scale(1.03);
}

.anime-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.card-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.image-container {
    position: relative;
  }
  
  .type-label {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }  

/* Search and Sort Input Fields */
#search-anime, #sort-anime {
    padding: 10px;
    margin: 10px 5px 20px 0;
    width: 200px;
    border-radius: 4px;
    border: none;
    outline: none;
    transition: 0.3s ease;
}

#search-anime:focus,
#sort-anime:focus,
input:focus-visible,
button:focus-visible {
    border: 2px solid #6c63ff;
    box-shadow: 0 0 8px rgba(108, 99, 255, 0.5);
}

/* Anime Container */
.anime-container {
    max-width: 1200px;
    margin: 0 auto;
}

.anime-info {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.anime-synopsis {
    margin-top: 20px;
    padding: 15px;
    background-color: #030c63;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
}
.anime-trailer {
    margin-top: 20px;
    padding: 10px;
    background: #111;
    color: #fff;
    border-radius: 8px;
}

.trailer-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

#anime-poster {
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    height: 450px;
}

.anime-meta {
    flex: 1;
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
}

.anime-meta p {
    margin: 10px 0;
    font-size: 1.1em;
    line-height: 1.5;
}

/* Player Section */
.player-section {
    margin-bottom: 30px;
}

.embed-container {
    position: relative;
    width: 90%;
    max-width: 720px; /* Player tidak melebihi 720px */
    aspect-ratio: 16 / 9; /* Modern rasio 16:9 */
    margin: 20px auto;
    background-color: #000;
    border: 3px solid #333;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.embed-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .embed-container {
        padding-bottom: 65%;
        max-width: 95%;
    }
}

/* TV / Monitor Lebar */
@media (min-width: 1920px) {
    .embed-container {
        padding-bottom: 38%;
        max-width: 60%;
    }
}

/* Episode List & Navigation */
.episode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

/* Styling untuk setiap kotak episode */
.episode-item {
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.episode-item:hover {
    background-color: #e0e0e0;
}

.episode-item.active-episode {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

@media (max-width: 600px) {
    .episode-item {
        flex: 1 1 100%;
        text-align: center;
    }

    .episode-list {
        flex-direction: column;
    }
}

.episode-list p {
    font-style: italic;
    color: #777;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Animasi Pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Episode Navigation */
.episode-navigation {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.episode-nav-btn {
    padding: 12px 15px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.episode-nav-btn:hover {
    background-color: #0056b3;
}

/* Responsive Adjustments for Player */
@media (max-width: 768px) {
    .embed-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .embed-container {
        height: 300px;
    }
}

/* ===============================
   Tampilan Khusus Episode di player.html
   =============================== */
   .episode-section {
    background-color: #0f0f1b;
    padding: 20px;
    border-radius: 10px;
    color: white;
  }
  
  .episode-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #ffffff;
  }
  
  #player-episode-list {
    max-height: 600px;
    overflow-y: auto;
  }
  
  .player-episode-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1c1c2e;
    padding: 15px 20px;
    margin-bottom: 8px;
    border-left: 5px solid #00ff00; /* indikator hijau */
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }
  
  .player-episode-card:hover {
    background-color: #2a2a3d;
  }
  
  .player-episode-label {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
  }
  
  .player-watch-button {
    background-color: #00ff00;
    color: #000;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease;
  }
  
  .player-watch-button:hover {
    background-color: #00cc00;
  }
  
  .player-watch-button.active {
    background-color: #ffcc00;
    color: #000;
  }

  .player-watch-button:focus {
    outline: 2px solid #ffffff;
    background-color: #005500;
  }
  
  

/* Perbaikan Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    position: relative;
    z-index: 10;
}

.page-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 25px;
    margin: 5px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
}

.page-btn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.page-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.page-btn.active {
    background-color: #28a745;
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px 10px;
    background: #222;
    color: #f9f9f9;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 14px;
    z-index: 1000;
}

footer a {
    color: #f9f9f9;
    text-decoration: none;
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
}

main {
    margin-bottom: 80px;
}

/* Tombol Switch Server */
#switch-server {
    background-color: #28a745;
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 0;
}

#switch-server:hover {
    background-color: #218838;
}

/* Error Handling */
.error {
    color: #ff4444;
    padding: 20px;
    text-align: center;
    background: #ffeeee;
    border-radius: 5px;
}

.no-results {
    color: #666;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 5px;
}

/* Sticky Ads */
.sticky-ads {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: white;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .sticky-ads {
        padding: 5px;
    }
    
    .sticky-ads ins {
        width: 100% !important;
        height: auto !important;
    }
}

/* Advertisement Container */
.ad-container {
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
}

/* Contact Page Container */
.contact-container {
    padding: 20px;
    background: #1a1a1a;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.contact-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-container input,
.contact-container textarea {
    padding: 10px;
    border-radius: 5px;
    border: none;
    outline: none;
    background: #333;
    color: #fff;
}

.contact-container button {
    padding: 10px;
    background: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
    transition: background 0.3s;
}

.contact-container button:hover {
    background: #0056b3;
}

/* Container utama (flex) */
.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  
  /* Konten utama (utama) */
  .main-content {
    flex: 3;
    min-width: 0;
  }

  .pagination-controls {
    text-align: center;
    margin: 20px 0;
  }
  
  .pagination-controls button {
    margin: 0 5px;
    padding: 8px 16px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
  }
  
  .pagination-controls button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
  }
  
  .pagination-controls span {
    margin: 0 10px;
    font-weight: bold;
  }

  /* Grid container untuk 2 iklan */
  #multiplexAds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin: 20px 0;
  }
  .multiplex-slot {
    position: relative;
    min-height: 250px;
    background: #f9f9f9;
  }
  .sticky-ads {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
  }
  .sticky-ads .close-ads {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
  }

  #vignette-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
  /* Box konten iklan */
  #vignette-banner .vignette-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  
  /* Tombol close (“×”) */
  #vignette-banner .vignette-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 4px;
  }
  
  #vignette-banner .vignette-close:hover {
    color: #000;
  }


.ad-slot {
    margin: 16px auto;       /* spasi atas/bawah */
    text-align: center;      /* center banner */
  }
  .ad-slot img {
    width: 100%;             /* lebarnya 100% dari container */
    max-width: 728px;        /* jangan melebihi 728px */
    height: auto;            /* proporsional */
    display: inline-block;
    border: 0;               /* hapus border default kalau ada */
  }
  