/* =================================
   STYLES UMUM & BOXED LAYOUT
   ================================= */
body {
    background-color: #000;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #121212;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.05);
    min-height: 100vh;
}

/* =================================
   HOMEPAGE CUSTOM STYLES
   ================================= */
.card-hover {
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #1e1e1e;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
    border-color: rgba(220, 53, 69, 0.5);
}
.card-img-top {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.no-results {
    /* Agar pesan "tidak ditemukan" berada di tengah grid */
    grid-column: 1 / -1; 
    text-align: center;
    font-size: 1.1em;
    color: #aaa;
}


/* =================================
   BADGE & OVERLAY STYLES
   ================================= */
.episode-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 10;
}

.title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
    padding: 15px 10px 10px;
    z-index: 9;
}

.overlay-title {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
    display: block;
}

/* =================================
   WATCH PAGE & OTHER STYLES
   ================================= */
.player-container {
    position: relative;
    padding-top: 56.25%;
    background-color: #000;
}
#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.episode-sidebar {
    height: 100vh;
    overflow-y: auto;
}
.episode-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: .5rem;
}
.pagination-controls .page-link.active {
    background-color: #dc3545;
    border-color: #dc3545;
}
.episode-button.active {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    font-weight: bold;
}