/*
 * KissAnime — theme additions.
 *
 * style.min.css is the original KissAnime stylesheet and styles the markup of
 * every template. This file holds (1) the inline <head> styles the original
 * pages carried and (2) rules for WordPress parts the original never had
 * (comments, member popups, page content, widgets, pagination states …).
 */

/* ── 1. Original inline styles ─────────────────────────────────────────── */
.search_suggest_img {
                width: 40px;
                height: 50px;
                float: left;
                margin-right: 10px;
            }
            #result_box a.item_search_link {
                margin-bottom: 5px;
            }
            #formSearch input {
                width: 250px;
            }
            #formSearch label {
                position: relative;
                text-indent: -9999999999px;
                width: 0;
                height: 0;
                overflow: hidden;
                float: left;
            }
            #result_box {
                display: none;
                max-height: 300px;
                overflow-y: auto;
                overflow-x: hidden;
            }
            .like_head > div {
                float: left;
                width: 90px;
            }
            .like_head > a {
                float: right;
            }
            .like_head > a img {
                vertical-align: middle;
            }
            .topHolderBox_hi {
                color: #888;
            }
            .topHolderBox_drop {
                color: #8d65a0;
            }
            .topHolderBox_usersmall_notloged {
                vertical-align: middle;
                margin-bottom: 5px;
            }
            .right_head #search {
                position: relative;
            }
            .item_movies_in_cat_thumb .thumb_in_cat img {
                display: none;
            }
            .item_movies_in_cat_thumb .thumb_in_cat {
                float: left;
                width: 50px;
                height: 65px;
                background-position: center center;
                background-size: cover;
                padding: 0;
                margin: 5px;
                border-radius: 3px;
                overflow: hidden;
            }
            .item_movies_in_cat_thumb .title_in_cat_container {
                float: left;
                width: calc(100% - 60px);
            }
            .item_movies_in_cat_thumb .listing > div > div {
                float: left;
            }
            .item_movies_in_cat_thumb .listing > div > div:last-child {
                float: right;
            }
            .item_movies_in_cat_thumb .item_movies_link {
                display: table-cell;
                height: 75px;
                padding: 0 60px 0 10px;
                vertical-align: middle;
                width: 100%;
                float: none;
            }
            .item_movies_in_cat_thumb .status_in_cat_container a {
                padding: 0;
            }
            .item_movies_in_cat_thumb .status_text_vertical {
                height: 75px;
                vertical-align: middle;
                display: table-cell;
            }
            .item_movies_in_cat_thumb .img_in_movies_link_inner {
                height: 75px;
                vertical-align: middle;
                display: table-cell;
            }
            @media screen and (max-width: 768px) {
                .listing > div {
                    border-radius: 3px;
                }
                .item_movies_in_cat_thumb .img_in_movies_link_inner {
                    height: auto;
                }
                .item_movies_link:before {
                    display: none;
                }
                .item_movies_in_cat_thumb .item_movies_link {
                    height: auto;
                    display: block;
                    padding: 5px 0 5px 10px;
                }
                .item_movies_in_cat_thumb .status_text_vertical {
                    height: auto;
                }
                .item_movies_in_cat_thumb .status_in_cat_container {
                    padding: 0 5px !important;
                    margin: 5px 0;
                    box-sizing: border-box;
                }
                .item_movies_in_cat_thumb .status_in_cat_container a {
                    display: block;
                    padding: 5px 6px;
                    background: #000;
                    border-radius: 3px;
                }
            }

.jtitle_block {
                            float: right;
                        }
                        .quicktoggler .switch {
                            position: relative;
                            display: inline-block;
                            width: 25px;
                            height: 12px;
                            margin: 0 5px;
                            vertical-align: -2px;
                        }
                        .quicktoggler .slider.round {
                            border-radius: 34px;
                        }
                        .quicktoggler .slider {
                            position: absolute;
                            cursor: pointer;
                            top: 0;
                            left: 0;
                            right: 0;
                            bottom: 0;
                            background-color: #ccc;
                            -webkit-transition: 0.4s;
                            transition: 0.4s;
                            background: #ccc;
                        }
                        .quicktoggler .slider:before {
                            position: absolute;
                            content: "";
                            height: 10px;
                            width: 10px;
                            left: 1px;
                            bottom: 1px;
                            background-color: #fff;
                            -webkit-transition: 0.4s;
                            transition: 0.4s;
                        }
                        .quicktoggler .slider.round:before {
                            border-radius: 50%;
                            background: #b720ff;
                        }
                        .quicktoggler .text {
                            color: #eee;
                            text-transform: uppercase;
                            font-size: 0.7rem;
                            padding: 5px 0;
                        }
                        .quicktoggler .slider.active {
                            background-color: #000;
                        }
                        .quicktoggler .slider.active:before {
                            -webkit-transform: translateX(13px);
                            -ms-transform: translateX(13px);
                            transform: translateX(13px);
                        }
                        @media screen and (max-width: 768px) {
                            .jtitle_block {
                                float: left;
                                margin-bottom: 3px;
                                padding: 7px;
                                background-color: #222222;
                                width: 100%;
                            }
                            .bigChar {
                                letter-spacing: 0;
                            }
                        }

/* ── 2. Theme additions ────────────────────────────────────────────────── */

/* Search suggestion boxes (header + splash). */
#search form { position: relative; }
.result_box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 100%;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px;
    box-sizing: border-box;
    color: #fff;
    text-align: left;
    background: #353535;
    opacity: .97;
    font: normal 13px Tahoma, Verdana, Arial;
    border-radius: 0 0 6px 6px;
}
.result_box a { display: block; color: #eee; line-height: 16px; padding: 3px; margin-bottom: 5px; text-decoration: none; overflow: hidden; }
.result_box a:hover { background: #5d666f; }
.result_box .w { color: #fff; font-weight: 700; }
.result_box em { color: #ce6aff; font-style: normal; }
#home_index .search-form .result_box { top: 44px; }

/* Loading spinner. */
.ka-loader {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin: 5px auto;
    border: 3px solid #333;
    border-top-color: #578d17;
    border-radius: 50%;
    animation: ka-spin .8s linear infinite;
}
@keyframes ka-spin { to { transform: rotate(360deg); } }
#divLoading { text-align: center; }

/* Header tagline (div variant of #navsubbar h1). */
#navsubbar div.navsub_title { margin: 0 auto; padding: 2px 0; text-indent: 20px; width: 970px; color: #fff; text-align: left; }
@media screen and (max-width: 768px) {
    #navsubbar div.navsub_title { width: 100%; text-indent: 0; font-size: 12px; }
}

/* Random anime. */
#divRandomAnime #aRandomAnimeResult img { float: left; width: 120px; max-height: 170px; object-fit: cover; margin: 0 10px 5px 0; }
#divRandomAnime .random_summary p { margin: 10px 0 0; }
#divRandomAnime:after { content: ""; display: block; clear: both; }
#divRandomAnime { padding-bottom: 34px; }

/* Carousel thumbs keep their poster ratio. */
.thumb_slide img { width: 100%; height: 100%; object-fit: cover; }

/* Splash. */
#home_index .home_content { text-align: left; padding: 0 10px 20px; }
#home_index .splash_popular { margin-top: 5px; }

/* Listing status column as a link. */
.item_movies_in_cat .status_in_cat_container a.status_text_vertical { padding: 0; }
.listing .no-result { padding: 10px; color: #888; }
.listing8515 .current a { color: #fff; background: #578d17; }

/* Pagination. */
.pagination { float: left; width: 100%; margin-top: 15px; }
.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px 6px 0;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    background: #fff;
    border-radius: 3px;
}
.wp-pagenavi span.current { color: #fff; background: #578d17; }
.wp-pagenavi span.pages,
.wp-pagenavi span.extend { color: #ccc; background: #222; }

/* Anime page. */
.static_single .item_static { margin: 4px 0; }
.watch_buttons .btn { display: inline-block; padding: 0 12px; margin-right: 5px; height: 28px; line-height: 28px; color: #fff; }
.summary { margin-bottom: 10px; }
.cover_anime img { max-width: 100%; height: auto; }

/* Homepage announcement (top of main column). */
.home_notice p { margin: 0 0 6px; font-weight: 700; }
.home_notice p:last-child { margin-bottom: 0; }

/* Watch page. */
.watch_notice { padding: 8px 0; color: #ccc; }
.watch_title a { color: inherit; }
#player_container { background-size: cover; background-position: center; }
#player_container iframe { display: block; }
.ka-player-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.info_player label.lbl { margin-right: 5px; }
.info_player select { padding: 3px; background: #393939; color: #ccc; border: 1px solid #666; }
.ovf_watch { display: none; z-index: 99998; }
#bar-player:after { content: ""; display: block; clear: both; }
.popular_animes { border-bottom: 1px solid #2f2f2f; padding-bottom: 15px; margin-bottom: 10px; }
.ka-watch-episodes .listing { max-height: 420px; overflow-y: auto; }
.error_movie { padding: 20px; color: #f33; }

/* Popups (report + login / register). */
.ka-popup { float: left; width: 100%; height: 100%; position: fixed; left: 0; top: 0; z-index: 100000000000; }
.pop_content { color: #333; padding: 20px; border-radius: 5px; }
.pop_content input[type=text],
.pop_content input[type=email],
.pop_content input[type=password] { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid #ccc; border-radius: 3px; }
.pop_content .btn { display: inline-block; height: auto; padding: 6px 15px; line-height: 18px; color: #fff; border: 0; cursor: pointer; }
.pop_content .ka-form-msg { color: #c00; min-height: 1px; }
.pop_content .textDark a { color: #4d820f; }

/* Login / Register popup: dark box like .bigBarContainer instead of the white legacy panel. */
#ka-auth .pop_ovf { background: rgba(0, 0, 0, .75); }
#ka-auth .pop_content { background: #111; color: #ccc; border: 1px solid #2f2f2f; box-shadow: 0 0 20px rgba(0, 0, 0, .8); }
#ka-auth .pop_content strong { color: #fff; font-size: 16px; }
#ka-auth .pop_content input[type=text],
#ka-auth .pop_content input[type=email],
#ka-auth .pop_content input[type=password] { background: #1c1c1c; color: #fff; border-color: #393939; }
#ka-auth .pop_content input:focus { border-color: #4d820f; outline: 0; }
#ka-auth .pop_content input::placeholder { color: #777; }
#ka-auth .pop_content .btn { float: none; width: auto; height: auto; padding: 6px 15px; font-size: 13px; line-height: 18px; text-transform: uppercase; }
#ka-auth .pop_content .btn_cancel { background: #393939; color: #ddd; }
#ka-auth .pop_content .btn_cancel:hover { background: #4a4a4a; color: #fff; }
#ka-auth .pop_content .ka-form-msg { color: #e05656; }
#ka-auth .pop_content .textDark { color: #999; }
#ka-auth .pop_content .textDark a { color: #89ce19; }

/* Pages, posts and the 404 page. */
.page_content { text-align: left; line-height: 1.6; }
.page_content img { max-width: 100%; height: auto; }
.page_content a { text-decoration: underline; }
.error_page { padding: 40px 10px; text-align: center; }
.error_page img { max-width: 100%; }
.error_page h1 { font-size: 26px; color: #b1ca05; }

/* Comments. */
.ka-comments { text-align: left; }
.ka-comments .comment-list { list-style: none; margin: 0; padding: 0; }
.ka-comments .comment-list .children { list-style: none; padding-left: 30px; }
.ka-comments .comment-body { padding: 10px; margin-bottom: 8px; background: #161616; border-radius: 3px; }
.ka-comments .comment-meta { color: #888; margin-bottom: 5px; }
.ka-comments .comment-author img { float: left; margin-right: 8px; border-radius: 3px; }
.ka-comments textarea,
.ka-comments input[type=text],
.ka-comments input[type=email],
.ka-comments input[type=url] { width: 100%; box-sizing: border-box; padding: 6px; background: #393939; color: #ccc; border: 1px solid #666; border-radius: 3px; }
.ka-comments .submit { padding: 6px 15px; color: #fff; background: #578d17; border: 0; border-radius: 3px; cursor: pointer; }

/* Widgets in the right column. */
.rightBox.widget > :not(.barTitle) { padding: 10px; }
.rightBox.widget ul { margin: 0; padding-left: 18px; }

/* Ads. */
.ads_place { width: 100%; max-width: 970px; margin: 10px auto; clear: both; }

/* Member area. */
.ka-member-nav a { display: inline-block; margin: 0 8px 8px 0; padding: 5px 10px; background: #222; border-radius: 3px; }
.ka-member-nav a.active,
.ka-member-nav a:hover { background: #578d17; color: #fff; }
.ka-watch-episodes .barContent,
.popular_animes .barContent { text-align: left; }
.alphabet a { white-space: nowrap; }

/* Watch page: side padding for the sections under the player. */
#adsIfrme .popular_animes .barContent { padding: 10px 15px; }
#adsIfrme .ka-comments { padding-left: 15px; padding-right: 15px; box-sizing: border-box; }

/* ── 3. Phones and tablets ─────────────────────────────────────────────────
 * style.min.css squeezes the header tabs into three equal columns and hides
 * the last one, so any menu with more items lost entries. Below 992px the
 * header becomes logo + menu button, then search, then the member links, and
 * the tabs open as a full-width list behind the button.
 */
#kissMenuBtn { display: none; }

@media screen and (max-width: 991px) {
    body { overflow-x: hidden; }

    #head { display: flex; flex-wrap: wrap; align-items: center; width: 100%; padding: 8px 10px 0; box-sizing: border-box; }
    #head .left_head { order: 1; float: none; flex: 1 1 auto; min-width: 0; width: auto; height: 58px; margin: 0; padding: 0; background-size: auto 56px; background-position: 0 50%; }
    #head .left_head a.logo { width: 190px; max-width: 100%; height: 58px; }
    #head .right_head { order: 3; float: none; display: flex; flex-direction: column; width: 100%; margin: 8px 0 0; padding: 0; }
    #head .right_head #search { order: 1; padding-right: 0; }
    #head .right_head .right_head_inner { order: 2; margin: 0; padding: 8px 0 0; text-align: center; }
    #head .right_head .right_head_inner:empty,
    #head .right_head .right_head_inner > br:only-child { display: none; }
    #search form p { display: flex; align-items: center; margin: 0; }
    #search form p input.text { flex: 1 1 auto; width: auto !important; min-width: 0; height: 40px; padding: 6px 8px; font-size: 16px; box-sizing: border-box; }
    #search form p button { position: static; flex: 0 0 auto; height: 40px; margin: 0 0 0 6px; padding: 0 12px; }

    #kissMenuBtn { order: 2; display: block; flex: 0 0 auto; position: relative; width: 44px; height: 44px; padding: 0; background: #111; border: 1px solid #2f2f2f; border-radius: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    #kissMenuBtn span { position: absolute; left: 10px; width: 22px; height: 3px; border-radius: 2px; background: #dadada; transition: transform .2s, opacity .2s, top .2s; }
    #kissMenuBtn span:nth-child(1) { top: 13px; }
    #kissMenuBtn span:nth-child(2) { top: 20px; }
    #kissMenuBtn span:nth-child(3) { top: 27px; }
    body.kissNavOpen #kissMenuBtn { border-color: #578d17; }
    body.kissNavOpen #kissMenuBtn span:nth-child(1) { top: 20px; transform: rotate(45deg); }
    body.kissNavOpen #kissMenuBtn span:nth-child(2) { opacity: 0; }
    body.kissNavOpen #kissMenuBtn span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

    #headnav { margin: 8px 0 10px; }
    #headnav #navbar { display: none; float: none; height: auto; padding: 0; background: #161616; border-top: 1px solid #2f2f2f; }
    body.kissNavOpen #headnav #navbar { display: block; }
    #headnav #navcontainer { top: 0; width: auto; }
    #headnav #navcontainer ul { text-align: left; font: bold 14px/44px Arial, Helvetica, sans-serif; }
    #headnav #navcontainer li,
    #headnav #navcontainer li:last-child { display: block !important; float: none; width: auto; }
    #headnav #navcontainer li a,
    #headnav #navcontainer li a:link,
    #headnav #navcontainer li a:visited,
    #headnav #navcontainer li a:hover { float: none; display: block; width: auto; height: 44px; line-height: 44px; margin: 0; padding: 0 16px; box-sizing: border-box; color: #dadada; background: #1d1d1d linear-gradient(#2a2a2a, #1b1b1b); border: 0; border-bottom: 1px solid #0c0c0c; border-radius: 0 !important; }
    #headnav #navcontainer li a:hover { color: #b1ca05; }
    #headnav #navcontainer li a#currentTab { color: #fff; background: #578d17; }
    #navsubbar { height: auto; }
    #navsubbar .navsub_title { width: auto; padding: 5px 10px; text-indent: 0; line-height: 20px; box-sizing: border-box; }

    #container { width: 100%; padding: 0 8px; box-sizing: border-box; }
    #container img, #container iframe { max-width: 100%; }
    .barContent { word-wrap: break-word; overflow-wrap: anywhere; }
    .rightBox .barContent a { display: inline-block; padding: 3px 0; }

    #divRandomAnime #aRandomAnimeResult img { width: 100px; max-height: 140px; }
    #divRandomAnime .bigChar { font-size: 20px; line-height: 24px; letter-spacing: -1px; }

    #footcontainer p { margin: 0 12px; line-height: 22px; }
    #footcontainer p a { display: inline-block; padding: 4px 0; }
}

@media screen and (max-width: 479px) {
    #head .left_head { height: 50px; background-size: auto 48px; }
    #head .left_head a.logo { width: 160px; height: 50px; }
}

/* Splash extras (shown only when set in Settings › Splash page). */
#home_index .splash_logo img { max-width: 100%; max-height: 140px; height: auto; }
#home_index .splash_poster img { max-width: 100%; max-height: 360px; height: auto; margin-top: 15px; border-radius: 4px; }

/* Optional homepage blocks (Settings › Homepage). */
.ka-poster-grid__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; text-align: center; }
.ka-poster-grid__item .thumb_slide { display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; margin-bottom: 6px; border: 1px solid #313031; background-size: cover; background-position: center; box-sizing: border-box; }
.ka-poster-grid__item .thumb_slide:hover { border-color: #c62400; }
.ka-poster-grid__item h3 { margin: 0; font-size: 12px; font-weight: normal; line-height: 16px; }
.ka-top-tables .barContent { display: flex; flex-wrap: wrap; gap: 10px; }
.ka-top-table { flex: 1 1 200px; min-width: 0; }
.ka-top-table h3 { margin: 0 0 6px; font-size: 14px; color: #b1ca05; }
.ka-latest-comment { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2a2a2a; }
.ka-latest-comment:last-child { border-bottom: 0; }
.ka-latest-comment img { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ka-latest-comment p { margin: 2px 0 0; }
.ka-latest-comment__name { color: #fff; font-weight: 700; }

/* Share bar, login artwork, lite site button, community links. */
.ka-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.ka-share__icon { width: 32px; height: 32px; border-radius: 4px; }
.ka-share__label { color: #888; }
.ka-share a { display: inline-block; padding: 4px 10px; color: #fff; background: #2b2b2b; border-radius: 3px; }
.ka-share a:hover { background: #578d17; }
.pop_content .ka-auth-art img { max-width: 100%; max-height: 160px; height: auto; }
#navsubbar > .full { float: none; width: 970px; max-width: 100%; margin: 0 auto; }
#navsubbar .ka-lite-btn { float: right; margin: 2px 10px 0 0; padding: 0 8px; line-height: 20px; color: #fff; background: rgba(0, 0, 0, .35); border-radius: 3px; }
#navsubbar .ka-lite-btn:hover { color: #ffe200; }
#footcontainer .ka-social { font-size: 12px; }
