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


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

.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;
}


/* ==================================================
   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: 0 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;
}


/* ==================================================
   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;

    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"] .anime-info-title {
    background: #434557;
    color: #fff;
}

[data-theme="dark"] .anime-info-row:nth-child(even) {
    background: #434557;
    color: #fff;
}

[data-theme="dark"] .anime-single-description,
[data-theme="dark"] .anime-main-content {
    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;
}