/*
Theme Name: Anoboy Theme
Version: 1.1
*/


/* ==================================================
   CUSTOM BASIC
================================================== */

.anoboy-header-widget,
.anoboy-custom-header-html {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
    box-sizing: border-box;
    margin: 16px auto 24px;
    padding: 0 10px;
    text-align: center;
    line-height: 0;
}

.anoboy-header-widget a,
.anoboy-custom-header-html a,
.anoboy-footer-widget a,
.anoboy-custom-footer-html a {
    display: inline-block;
    max-width: 100%;
}

.anoboy-header-widget img,
.anoboy-custom-header-html img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Setiap widget header harus tampil sebagai banner terpisah. */
.anoboy-header-widget + .anoboy-header-widget {
    margin-top: 12px;
}

.anoboy-header-widget,
.anoboy-header-widget > * {
    min-height: 1px;
    overflow: visible;
    visibility: visible;
    opacity: 1;
}

.anoboy-footer-widget,
.anoboy-custom-footer-html {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
    box-sizing: border-box;
    margin: 16px auto 15px;
    padding: 0 10px;
    text-align: center;
    line-height: 0;
}

.anoboy-footer-widget img,
.anoboy-custom-footer-html img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Banner dari Tampilan -> Banner & Notifikasi (header & footer) */
.anoboy-banner {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
    box-sizing: border-box;
    margin: 16px auto 24px;
    padding: 0 10px;
    text-align: center;
    line-height: 0;
}

.anoboy-banner a {
    display: block;
    max-width: 100%;
    margin: 0 auto 12px;
}

.anoboy-banner img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.anoboy-footer-right-widget {
    float: right;
    width: 300px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    text-align: center;
}

.anoboy-footer-right-widget img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .anoboy-footer-right-widget {
        float: none;
        width: 100%;
        clear: both;
    }
}

.download {
    text-align: right;
    background: var(--sc-color);
    padding: 5px;
    display: flow-root;
}

.pagetitle {
    margin-bottom: 10px;
}

.sisi.entry-content {
    text-align: center;
}


/* ==================================================
   PAGINATION
================================================== */

.wp-pagenavi {
    clear: both;
    text-align: center;
    padding: 10px 0;
    margin: 15px 0;
}

.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #bfbfbf;
    padding: 3px 6px;
    margin: 2px;
}

.wp-pagenavi a:hover,
.wp-pagenavi span.current {
    border-color: #000;
}

.wp-pagenavi span.current {
    font-weight: bold;
}

/* ==================================================
   ANIMELIST INDEX
================================================== */

.anoboy-anime-list-page .container {
    max-width: 1066px;
}

.anoboy-index-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 18px 0 14px;
    padding: 22px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2e51a2, #5579d2);
    color: #fff;
    box-shadow: 0 8px 22px rgba(46, 81, 162, .2);
}

.anoboy-index-heading h1 { margin: 3px 0 4px; font-size: 28px; }
.anoboy-index-heading p { margin: 0; opacity: .85; }
.anoboy-eyebrow { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; opacity: .8; }
.anoboy-index-badge { border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 10px 13px; font-weight: 700; }

.anoboy-index-toolbar {
    padding: 14px;
    border: 1px solid rgba(46,81,162,.18);
    border-radius: 10px;
    background: var(--sca-color, #f5f7fb);
}

.anoboy-index-label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: .7; }
.anoboy-alphabet-index { display: flex; flex-wrap: wrap; gap: 6px; }
.anoboy-alphabet-index a { min-width: 31px; padding: 7px 8px; border: 1px solid rgba(46,81,162,.2); border-radius: 6px; color: inherit; text-align: center; text-decoration: none; font-size: 12px; font-weight: 700; }
.anoboy-alphabet-index a:hover, .anoboy-alphabet-index a[aria-current="page"] { background: #2e51a2; color: #fff; border-color: #2e51a2; }
.anoboy-active-filters { display: flex; flex-wrap: wrap; gap: 7px; min-height: 8px; margin: 12px 0; }
.anoboy-active-filters span { padding: 5px 9px; border-radius: 999px; background: rgba(46,81,162,.1); color: inherit; font-size: 11px; }
.anoboy-anime-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 12px; }
.anoboy-anime-card { min-width: 0; }
.anoboy-anime-thumb { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: #111; }
.anoboy-anime-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.anoboy-anime-thumb:hover img { transform: scale(1.04); }
.anoboy-title-index { position: absolute; top: 7px; left: 7px; min-width: 28px; padding: 5px 7px; border-radius: 5px; background: rgba(46,81,162,.92); color: #fff; text-align: center; font-size: 11px; font-weight: 800; }
.anoboy-anime-card-title { margin: 8px 2px 0; font-size: 13px; line-height: 1.35; }
.anoboy-anime-card-title a { text-decoration: none; }

@media (max-width: 600px) {
    .anoboy-index-heading { padding: 18px; }
    .anoboy-index-heading h1 { font-size: 23px; }
    .anoboy-anime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
    .anoboy-anime-card-title { font-size: 12px; }
    .anoboy-index-badge { display: none; }
}


/* ==================================================
   FIX WORDPRESS SEARCH BODY
================================================== */

/*
 * CSS theme lama mempunyai class .search.
 * WordPress juga otomatis memberi body class "search".
 * Ini mencegah halaman search menjadi width 25px.
 */

body.search {
    display: block;
    overflow: visible;
    margin-top: 0;
    width: 100%;
    float: none;
}


/* ==================================================
   PLAYER AREA
================================================== */

.anoboy-player-area {
    width: 100%;
    max-width: 1060px;
    margin: 24px auto 10px;
    position: relative;
    z-index: 1;
}


/* PLAYER */

.anoboy-player {
    width: 100%;
    background: #000;
    border: 3px solid #111;
    box-sizing: border-box;
    overflow: hidden;
}

.anoboy-server-content {
    display: none;
    width: 100%;
    background: #000;
}

.anoboy-server-content.active {
    display: block;
}

.anoboy-server-content iframe {
    display: block;
    width: 100%;
    height: 600px;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
}


/* ==================================================
   PLAYER CONTROL
================================================== */

.anoboy-player-controls {
    width: 100%;
    background: #111;
    border-top: 1px solid #333;
    padding: 7px;
    box-sizing: border-box;
}

.anoboy-player-top-controls {
    min-height: 25px;
    margin-bottom: 5px;
}


/* ==================================================
   MATIKAN LAMPU BUTTON
================================================== */

.anoboy-light-button {
    display: inline-block;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 4px 6px;
    margin: 0;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
}

.anoboy-light-button:hover {
    color: #ccc;
}


/* ==================================================
   SERVER BUTTON
================================================== */

.anoboy-server-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.anoboy-server-buttons button {
    border: 1px solid #444;
    background: #222;
    color: #fff;
    padding: 7px 11px;
    margin: 0;
    cursor: pointer;
    border-radius: 2px;
    font-size: 12px;
}

.anoboy-server-buttons button:hover {
    background: #333;
}

.anoboy-server-buttons button.active {
    background: #000;
    border-color: #888;
}


/* ==================================================
   OVERLAY MATIKAN LAMPU
================================================== */

#anoboy-light-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.94);

    z-index: 99990;

    opacity: 0;
    visibility: hidden;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

#anoboy-light-overlay.active {
    opacity: 1;
    visibility: visible;
}


/*
 * Ketika lampu mati hanya PLAYER AREA
 * yang berada di atas overlay.
 */

body.anoboy-lights-off .anoboy-player-area {
    position: relative;
    z-index: 99999;
}

body.anoboy-lights-off .anoboy-player,
body.anoboy-lights-off .anoboy-player-controls {
    position: relative;
    z-index: 99999;
}


/* ==================================================
   DOWNLOAD BOX
================================================== */

.anoboy-download-box {
    width: 100%;
    background: #555;
    color: #fff;

    margin: 10px auto;
    padding: 10px;

    box-sizing: border-box;
}

.anoboy-download-title {
    border-bottom: 1px solid #fff;

    font-size: 12px;
    font-weight: bold;

    padding-bottom: 7px;
    margin-bottom: 8px;
}

.anoboy-download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.anoboy-download-links a {
    display: inline-block;

    background: #222;
    border: 1px solid #444;

    color: #fff;

    padding: 7px 10px;

    text-decoration: none;
    border-radius: 2px;

    font-size: 12px;
}

.anoboy-download-links a:hover {
    background: #000;
    color: #fff;
}


/* ==================================================
   SINGLE ANIME CONTENT
================================================== */

.anoboy-single-content {
    background: var(--sc-color);
    padding: 5px;
    margin-top: 10px;
    box-sizing: border-box;
}


/* ==================================================
   FEATURED IMAGE
================================================== */

.anime-single-thumbnail {
    text-align: center;
    margin: 5px auto 8px;
}

.anime-single-thumbnail {
    text-align: center;
    margin: 0 auto 6px;
    line-height: 0;
}

.anime-single-thumbnail img {
    display: block;
    width: 230px;
    max-width: 100%;
    height: 145px;
    object-fit: cover;
    margin: 0 auto;
    padding: 0;
}


/* ==================================================
   SINGLE TITLE
================================================== */

.anime-single-title {
    text-align: center;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;

    margin: 5px 0 2px;
    padding: 0;
}


/* ==================================================
   AUTHOR + DATE
================================================== */

.anime-single-meta {
    text-align: center;

    font-size: 13px;

    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #222;
}


/* ==================================================
   DESCRIPTION
================================================== */

.anime-single-description {
    text-align: center;

    font-size: 14px;
    line-height: 1.5;

    padding: 0 5px 7px;

    border-bottom: 1px solid #222;
}

.anime-single-description p {
    margin: 0;
}


/* ==================================================
   INFORMATION TITLE
================================================== */

.anime-info-title {
    background: #dcdcdc;
    color: #000;

    font-weight: bold;
    font-size: 16px;

    padding: 10px;
    margin-top: 5px;
    border-bottom: 1px solid #222;

    box-sizing: border-box;
}


/* ==================================================
   INFORMATION TABLE
================================================== */

.anime-information {
    width: 100%;
    margin-top: 5px;
}

.anime-info-row {
    display: grid;

    grid-template-columns: 33% 67%;

    padding: 10px;

    font-size: 14px;
    line-height: 1.4;

    box-sizing: border-box;
}

.anime-info-row:nth-child(even) {
    background: #dcdcdc;
    color: #000;
}

.anime-info-row:nth-child(odd) {
    background: var(--sc-color);
}

.anime-info-row strong {
    font-weight: bold;
}

.anime-info-row span {
    min-width: 0;
}

.anime-info-row a {
    text-decoration: none;
}


/* ==================================================
   MAIN ARTICLE CONTENT
================================================== */

.anime-main-content {
    padding: 10px 0;

    margin-top: 5px;

    border-top: 1px solid #222;
    border-bottom: 1px solid #222;

    line-height: 1.5;
}

.anime-main-content img {
    max-width: 100%;
    height: auto;
}

.anime-main-content iframe {
    max-width: 100%;
}


/* ==================================================
   DARK MODE - SINGLE INFORMATION
================================================== */

[data-theme="dark"] .anoboy-single-content,
[data-theme="dark"] .anime-information,
[data-theme="dark"] .anime-info-row,
[data-theme="dark"] .anime-info-row:nth-child(odd),
[data-theme="dark"] .anime-info-row:nth-child(even) {
    background: #000;
    color: #fff;
}

[data-theme="dark"] .anime-info-title {
    background: #000;
    color: #fff;
}

[data-theme="dark"] .anime-single-description,
[data-theme="dark"] .anime-main-content,
[data-theme="dark"] .anime-single-meta,
[data-theme="dark"] .anime-info-title {
    border-color: #555;
}


/* ==================================================
   MOBILE PLAYER
================================================== */

@media screen and (max-width: 768px) {

    .anoboy-player-area {
        width: 100%;
    }

    .anoboy-server-content iframe {
        height: 260px;
    }

    .anoboy-server-buttons button {
        padding: 6px 8px;
        font-size: 11px;
    }

    .anoboy-download-box {
        padding: 7px;
    }

    .anoboy-download-links a {
        padding: 6px 8px;
        font-size: 11px;
    }

}


/* ==================================================
   MOBILE SINGLE ANIME
================================================== */

@media screen and (max-width: 600px) {

    .anime-single-thumbnail {
        text-align: center;
        margin: 0 auto 5px;
        line-height: 0;
    }

    .anime-single-thumbnail img {
        display: block;
        width: 190px;
        max-width: 100%;
        height: 120px;
        object-fit: cover;
        margin: 0 auto;
    }

    .anime-single-title {
        font-size: 17px;
    }

    .anime-single-meta {
        font-size: 11px;
    }

    .anime-single-description {
        font-size: 12px;
    }

    .anime-info-title {
        padding: 8px;
        font-size: 14px;
    }

    .anime-info-row {
        grid-template-columns: 35% 65%;
        padding: 8px;
        font-size: 12px;
    }
}

.anoboy-search-results {
    width: 100%;
    text-align: center;
    padding: 10px 0;
}

.search-no-results {
    padding: 20px 10px;
    text-align: center;
}

/* Fix thumbnail card search/homepage */
.amv {
    width: 175px;
    height: 110px;
    overflow: hidden;
    position: relative;
    background: #000;
    line-height: 0;
}

.amv > img,
.amv > a > img,
.amv .attachment-medium,
.amv .wp-post-image {
    display: block;
    width: 175px !important;
    height: 110px !important;
    max-width: none;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

/* Judul overlay tetap normal */
.amv .amvj {
    line-height: normal;
}

/* ==================================================
   EPISODE LIST
================================================== */

.anoboy-episode-list {
    padding: 5px 0;
}

.anoboy-episode-item {
    display: block;
    background: var(--sc-color);
    border-bottom: 1px solid #ddd;
    padding: 9px 10px;
    text-decoration: none;
    font-size: 13px;
}

.anoboy-episode-item:hover {
    background: #dcdcdc;
}

[data-theme="dark"] .anoboy-episode-item:hover {
    background: #434557;
}

/* =========================================================
 * SERIES THUMBNAIL DI ATAS JUDUL
 * ========================================================= */

.anime-series-thumbnail-top {
    width: 100%;
    text-align: center;
    margin: 10px auto 8px;
    padding: 0;
    float: none;
    clear: both;
}

.anime-series-thumbnail-top img,
.anime-series-thumbnail-image {
    display: block;
    width: 230px;
    height: 145px;
    max-width: 100%;
    object-fit: cover;
    margin: 0 auto;
    float: none;
}

.anime-single-title {
    clear: both;
    text-align: center;
    margin: 8px 0 3px;
}

.anime-single-meta {
    text-align: center;
    margin-bottom: 8px;
}


/* MOBILE */
@media screen and (max-width: 600px) {

    .anime-series-thumbnail-top img,
    .anime-series-thumbnail-image {
        width: 190px;
        height: 120px;
    }

}

/* =========================================================
 * MOVIE + EPISODE
 * THUMBNAIL DI ATAS JUDUL
 * ========================================================= */

.anoboy-single-content .anime-single-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    clear: both;
    float: none !important;
    position: static !important;
    text-align: center;
    margin: 10px auto 8px;
    padding: 0;
    line-height: 0;
}

.anoboy-single-content .anime-single-thumbnail img,
.anoboy-single-content .anime-single-thumbnail .wp-post-image {
    display: block;
    width: 230px !important;
    height: 145px !important;
    max-width: 100%;
    object-fit: cover;
    float: none !important;
    position: static !important;
    margin: 0 auto !important;
    padding: 0;
}


/* JUDUL */
.anoboy-single-content .anime-single-title {
    display: block;
    width: 100%;
    clear: both;
    float: none !important;
    text-align: center;
    margin: 8px 0 3px;
}


/* AUTHOR + TANGGAL */
.anoboy-single-content .anime-single-meta {
    display: block;
    width: 100%;
    clear: both;
    float: none !important;
    text-align: center;
    margin: 0 0 8px;
}


/* DESKRIPSI */
.anoboy-single-content .anime-single-description {
    display: block;
    width: 100%;
    clear: both;
    float: none !important;
}


/* =========================================================
 * MOBILE
 * ========================================================= */

@media screen and (max-width: 600px) {

    .anoboy-single-content .anime-single-thumbnail {
        margin-top: 8px;
        margin-bottom: 7px;
    }

    .anoboy-single-content .anime-single-thumbnail img,
    .anoboy-single-content .anime-single-thumbnail .wp-post-image {
        width: 190px !important;
        height: 120px !important;
    }

}
