/*
Theme Name: Init Manga
Theme URI: https://inithtml.com/theme/init-manga/
Author: Init HTML
Author URI: https://inithtml.com/
Description: A performance-optimized manga reading theme designed to work seamlessly with the Init Plugin Suite. Built with UIkit and modern WordPress development practices.
Version: 1.2.2.6
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: init-manga
Tags: manga, comic, light novel, clean, fast, modern
*/

/*==============================
=         Theme Colors         =
==============================*/

::selection {
    background: var(--im-theme-color);
}

.theme-color {
    color: var(--im-theme-color) !important;
}

.uk-link,
a {
    color: var(--im-theme-color);
}

.uk-link-toggle:hover .uk-link,
.uk-link:hover,
a:hover,
.uk-link-heading a:hover,
.uk-link-toggle:hover .uk-link-heading,
a.uk-link-heading:hover {
    color: var(--im-theme-color);
}

.uk-button-primary {
    background-color: var(--im-theme-color);
}

.uk-button-primary.uk-active, .uk-button-primary:active, .uk-button-primary:hover {
    background-color: var(--im-theme-hover);
}

/*==============================
=             Slider           =
==============================*/

.uk-slider-items.uk-grid-small {
    margin-left: -15px !important;
}

.slider-card-thumb {
    width: 100%;
    height: 315px;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
}

/*==============================
=         Layout / Grid        =
==============================*/

.uk-container-xmedium {
    max-width: 1110px;
}

.uk-width-3xlarge {
    width: 900px;
}

.uk-padding-xsmall-horizontal {
    padding-inline: 15px;
}

.uk-padding-small-horizontal {
    padding-inline: 20px;
}

.uk-slider-items.uk-grid-small {
    margin-left: -15px !important;
}

/*==============================
=       Continue Reading       =
==============================*/

#continue-reading-wrapper {
    z-index: 9999;
    padding-inline: 15px;
    margin-bottom: 15px;
}

.continue-reading {
    width: 900px;
    max-width: calc(100% - 30px);
    margin-block: 0;
}

.uk-alert-dark {
    background-color: rgba(35, 35, 35, 0.8) !important;
}

.continue-reading-title {
    max-width: calc(100% - 160px);
}

/*==============================
=         Aspect Ratio         =
==============================*/

.image-16-9 {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.image-3-1 {
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

.image-1-1 {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.image-3-4 {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.video-16-9 {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    display: block;
}

.avatar.uk-border-circle {
    border-radius: 50% !important;
}

.uk-border-modal {
    border-radius: 10px;
}

/*==============================
=           Logo               =
==============================*/

h1.site-title {
    text-indent: -9999px;
    overflow: hidden;
    white-space: normal;
}

h1.site-title .visually-hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.uk-logo img {
    height: 45px;
    max-height: 45px;
    width: auto;
}

.uk-logo img.init-manga {
    background: red;
    border-radius: 50%;
}

/*==============================
=         Dark Mode UI         =
==============================*/

.uk-light .uk-navbar-dropdown-nav .uk-nav-header {
    color: rgba(255,255,255,.9);
}

.uk-light .uk-navbar-dropdown-nav > li.uk-active > a {
    color: #fff;
}

.uk-light .uk-alert,
.uk-light .uk-section-default,
.uk-light .uk-navbar-dropdown,
.uk-light .uk-section-muted,
.uk-light .uk-comment-primary,
.uk-light .uk-card-default,
.uk-light .uk-navbar-container:not(.uk-navbar-transparent),
.uk-light .uk-background-muted,
.uk-light .uk-card-secondary,
.uk-light .uk-card-secondary.uk-card-hover:hover,
.uk-light .uk-modal-dialog,
.uk-light .uk-modal-header,
.uk-light .uk-modal-footer,
.uk-light .uk-dropdown {
    background-color: #272727;
}

.uk-light .uk-dropdown-nav>li.uk-active>a,
.uk-light .uk-dropdown-nav>li>a:hover,
.uk-light .uk-alert {
    color: rgba(255,255,255,.7);
}

.uk-light pre {
    border-color: rgba(255,255,255,.2);
}

.uep-picker .uk-background-default {
    background-color: #f8f8f8;
}

.uk-light .uk-alert-warning,
.uk-light .uk-background-default,
.uk-light .paragraph-comment-list .uk-comment-primary {
    background-color: #222;
}

/*==============================
=        Mode Switcher         =
==============================*/

.mode-checkbox {
    opacity: 0;
    position: absolute;
    z-index: 999;
    cursor: pointer;
}

.mode-checkbox-label {
    width: 44px;
    height: 26px;
    border-radius: 50px;
    padding: 0 5px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
}

.mode-checkbox-label .ball {
    background-color: #fff;
    width: 22px;
    height: 22px;
    position: absolute;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    transition: transform 0.2s linear;
    z-index: 0;
}

.mode-checkbox:checked + .mode-checkbox-label .ball {
    transform: translateX(28px);
}

.curr-dark {
    background: linear-gradient(to right, #2c3e50, #2980b9);
}

.curr-dark:before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    top: 2px;
    left: 15px;
    background: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="%23fff" xmlns="http://www.w3.org/2000/svg"><path d="M7.45 2.71a1.13 1.13 0 0 1 2.1 0l1.16 2.95q.18.45.63.63l2.95 1.16c.95.38.95 1.72 0 2.1l-2.95 1.16q-.45.18-.63.63L9.55 14.3c-.38.95-1.72.95-2.1 0L6.3 11.34a1.1 1.1 0 0 0-.63-.63L2.7 9.55a1.13 1.13 0 0 1 0-2.1L5.66 6.3q.45-.18.63-.63zm9.47 10.69a.62.62 0 0 1 1.16 0l.9 2.28q.1.24.34.34l2.29.9c.52.21.52.95 0 1.16l-2.29.9a.6.6 0 0 0-.34.34l-.9 2.29a.62.62 0 0 1-1.16 0l-.9-2.29a.6.6 0 0 0-.34-.34l-2.29-.9a.62.62 0 0 1 0-1.16l2.29-.9a.6.6 0 0 0 .34-.34z" /></svg>');
    animation: fade-stars 3s ease infinite;
    pointer-events: none;
    z-index: 0;
}

.curr-light {
    background: linear-gradient(to left, #0052d4, #65c7f7, #9cecfb);
}

.curr-light:after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    top: 8px;
    left: -32px;
    background: url('data:image/svg+xml,<svg viewBox="0 -4 32 32" fill="%23fff" xmlns="http://www.w3.org/2000/svg"><path d="M23.07 5.03A9 9 0 0 0 6.03 8.35 8.1 8.1 0 0 0 0 16c0 4.26 3.54 7.75 8 8h15c4.97 0 9-4.25 9-9.5a9.5 9.5 0 0 0-8.93-9.47" fill-rule="evenodd"/></svg>');
    animation: chillin-cloud 10s ease-in infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes fade-stars {
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes chillin-cloud {
    0%   { left: -32px; }
    100% { left: 54px; }
}

.light-mode-icon {
    color: #f3c612;
}

.dark-mode-icon {
    color: #f1c40f;
}

/*==============================
=        Scroll / Utility      =
==============================*/

.disable-scrollbar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.uk-blur-cover {
    filter: blur(6px);
}

.remove-blur-cover {
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 7px;
    z-index: 5;
}

.remove-blur-cover:hover {
    background: rgba(0, 0, 0, 0.8);
}

.black-bottom {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.go-to-top {
    padding: 9px !important;
    line-height: 15px;
    margin-right: 15px;
    margin-bottom: 15px;
}

.uk-cursor-pointer {
    cursor: pointer;
}

/*==============================
=             Badge            =
==============================*/

.badge-group {
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}

.badge-age {
    background: rgba(255, 0, 0, 0.85);
    color: #fff;
    padding: 3px;
    border-radius: 4px;
    line-height: 1;
}

.badge-age .uk-text-small {
    line-height: 1;
}

/*==============================
=        Typography            =
==============================*/

.uk-text-initcase {
    text-transform: initial;
    text-transform: none;
    font-size: 1em;
}

.text-based {
    font-family: Lora, serif;
    font-size: 22px;
    line-height: 2.5;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.image-based img {
    display: block;
    margin-bottom: 20px;
    width: 100%;
    height: auto;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    pointer-events: none !important;
}

.image-based.webtoon-support img {
    margin-bottom: 0;
}

#chapter-content.image-based img {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

#chapter-content.image-based img[data-loading="true"] {
    opacity: 0.7;
    filter: blur(1px);
}

#chapter-content.image-based img[data-loaded="true"] {
    opacity: 1;
    filter: none;
}

.max-2-line,
.max-3-line {
    /* Fallback cho browsers cũ */
    max-height: 4.5em; /* Adjust theo line-height thực tế của bro */
    overflow: hidden;
    
    /* Modern browsers */
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.max-2-line {
    max-height: 3em; /* 1.5em * 2 lines */
}

@supports (-webkit-line-clamp: 2) {
    .max-2-line {
        -webkit-line-clamp: 2;
        max-height: none;
    }
}

.max-3-line {
    max-height: 4.5em; /* 1.5em * 3 lines */
}

@supports (-webkit-line-clamp: 3) {
    .max-3-line {
        -webkit-line-clamp: 3;
        max-height: none;
    }
}

.uk-text-xsmall {
    font-size: 9px;
}

/*==============================
=          Content             =
==============================*/

.uk-text-lead {
    font-size: 1.3rem;
}

.uk-article-content h1,
.uk-article-content h2,
.uk-article-content h3,
.uk-article-content h4,
.uk-article-content h5,
.uk-article-content h6 {
    font-weight: 700;
    margin-top: 0;
}

.uk-article-content h1 code,
.uk-article-content h2 code,
.uk-article-content h3 code,
.uk-article-content h4 code,
.uk-article-content h5 code,
.uk-article-content h6 code,
.uk-text-lead code {
    font-size: unset;
}

.uk-article-content img {
    border-radius: 5px;
}

.uk-article-content .aligncenter {
    display: block;
    margin-inline: auto;
}

.chapter-item a.uk-link-toggle:visited .uk-link-heading {
    color: #999;
}

#chapter-dropdown {
    height: 350px;
    max-height: 350px;
    min-width: 250px;
    overflow-y: scroll;
}

.hide-sigma-mode,
.shadow-jutsu-72,
.invis-blur-zeta,
.sneaky-pixel-99,
.ghostline-alpha,
.dust-fade-beta,
.mute-glitch-x1,
.oblivion-core,
.nullpacket-v2,
.fog-crawler-ghost,
.cloak-phase-7,
.hush-slice-xeon,
.faintframe-burst,
.junklayer-mk9,
.scramble-hint-42,
.fakeblock-delta,
.broken-span-zz,
.anti-scan-mode,
.blurline-nova,
.idle-hollow-patch,
.mask-byte-phantom,
.void-fragment-22,
.cache-bugwave,
.invisible-zlayer,
.node-flicker-01,
.ghost-protocol-88,
.stealth-marker-x,
.blindspot-core,
.zombie-line-34,
.packet-slip-fake,
.nullbit-glow,
.scanjam-mercy,
.hidden-ray-vortex,
.fake-relic-loop,
.shadowmap-glitch,
.flicker-segment-x,
.blind-ping-unit,
.freeze-crumb-r7,
.offset-trap-rng,
.static-husk-beta,
.mimic-dust-004,
.silentcode-burst,
.foobar-random-17,
.void-junkmark,
.clonepixel-ghost,
.hidden-seal-mk2,
.renderdrop-shadow,
.patchy-rift-11,
.shadowfrag-loop,
.camo-frame-spam,
.illusion-byte-ex,
.mutebuffer-beta,
.overlay-fake32,
.dummy-glitchline,
.hollowstream-fog,
.inertbox-alpha,
.unseenwave-x4,
.spamlayer-null,
.blip-trap-husk,
.fakeshadow-exe {
    display: none !important;
}

/*==============================
=       Comment System         =
==============================*/

.uk-comment-list>:nth-child(n+2),
.uk-comment-list .uk-comment~ul {
    margin-top: 40px;
}

#cancel-comment-reply-link {
    margin-left: 5px;
}

.uk-pagination .uk-active a {
    border-bottom: 1px solid var(--im-theme-color);
}

.inline-comment-block {
    top: -30px;
    padding: 5px 15px;
    background-color: #272727;
}

.inline-comment-block.text-default {
    font-family: system-ui !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

#chapter-content.text-based p {
    position: relative;
}

/*==============================
=       Effects / Hover        =
==============================*/

.scale-up-hover img {
    width: 100%;
    transition: all 0.3s ease;
}

.scale-up-hover:hover img,
.scale-up-hover:focus img {
    transform: scale(1.02);
}

/*==============================
=       Sizes / Heights        =
==============================*/

.max-width-120 {
    max-width: 120px;
}

.max-width-1-4 {
    max-width: 25%;
}

.min-height-45 {
    min-height: 45px;
}

.min-height-80 {
    min-height: 80px;
}

.taxonomy-max-height {
    max-height: 450px;
}

.sidebar-widget-max-height,
.top-manga-max-height,
.recent-comment-max-height {
    max-height: 650px;
}

#recent-reviews-page .recent-comment-max-height,
#recent-comments-page .recent-comment-max-height {
    max-height: none !important;
}

.latest-post-thumb {
    width: 115px;
    height: 115px;
    object-fit: cover;
}

.color-fff {
    color: #fff !important;
}

.uk-label-contest {
    background: #f95a35;
    transition: opacity 0.2s ease;
}

a.uk-label-contest:hover {
    opacity: 0.85;
    text-decoration: none;
}

.uk-border-right {
    border-right: 1px solid #e5e5e5;
}

.uk-light .uk-border-right {
    border-color: rgba(255,255,255,.2);
}

.uk-padding-xsmall {
    padding: 5px;
}

.footer-disclaimer {
    border-radius: 18px;
    padding: 30px 30px;
}

.uk-height-cover {
    height: 260px;
}

@media (max-width: 640px) {
    .uk-height-cover {
        height: 210px;
    }
}

/*==============================
=         Responsive           =
==============================*/

@media (max-width: 640px) {
    .slider-title {
        font-size: 1.4rem;
    }

    .latest-post-thumb {
        width: 95px;
        height: 95px;
    }

    .uk-border-right {
        border-right: none;
    }
}

#inkstone-switcher-tabs .uk-active .uk-button-text:before,
#manga-switcher-tabs .uk-active .uk-button-text:before {
    right: 0;
}

/*==============================
=    Chapter Skeleton Loader   =
==============================*/

.imc-skeleton-line {
  height: 1.5em;
  margin-bottom: 20px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.imc-skeleton-line.short {
  width: 40%;
}

.imc-skeleton-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: imc-skeleton-shimmer 1.5s infinite;
}

.uk-light .imc-skeleton-line::after {
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.09),
    transparent
  );
}

@keyframes imc-skeleton-shimmer {
  100% {
    left: 100%;
  }
}

/*==============================
=         Custom CSS           =
==============================*/

.team-avatar {
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
}

@media (max-width: 640px) {
    .team-avatar {
        width: 80px;
        height: 80px;
    }
}

.team-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#follow-author.uk-button-default,
#follow-team.uk-button-default {
    color: #eb1551;
    background-color: #ffc2d2;
    border: none;
}

#follow-author.uk-button-primary,
#follow-team.uk-button-primary {
    color: #fff;
    background: linear-gradient(90deg,#eb1551,#c0003b) !important;
    border: none;
}

.iep-embed-ui .iep-copy-btn {
    color: #333;
}

.iep-embed-ui .iep-copy-btn:hover {
    color: #999;
}

.uk-light .iep-embed-ui.iep-dark .iep-copy-btn {
    color: #fff;
}

.uk-light .iep-embed-ui.iep-dark .iep-copy-btn:hover {
    color: rgba(255,255,255,.5);
}

.uk-article-meta .iep-embed-ui .iep-copy-btn {
    padding-right: 0;
}

.is-dark .init-plugin-suite-view-count-ranking-tabs {
    border-bottom-color: rgba(255,255,255,.2);
}

.init-review-avatar img {
    width: 80px;
    height: 80px;
}

.iue-icon {
    margin-right: 5px;
}

.init-affiliate-gate-block {
    max-width: 750px;
    padding-inline: 15px;
    margin-inline: auto !important;
}

.uk-container .init-affiliate-gate-block {
    padding-inline: 0;
}

.init-affiliate-gate-block img {
    border-radius: 5px;
}

.init-chatbox-empty {
    line-height: 30px;
}

.init-chatbox-messages.shrink {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
}

.init-chatbox-messages.expand {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
}

.init-chatbox-message {
    margin-bottom: 15px;
    line-height: 1.6;
}

.init-chatbox-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 7px;
}

.init-chatbox-avatar {
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 8px;
}

.init-chatbox-author {
    text-transform: capitalize;
}

.init-chatbox-meta-time {
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.init-chatbox-message-body {
    background: #f3f3f3;
    padding: 10px 15px;
    border-radius: 18px;
    word-break: break-word;
}

.uk-light .init-chatbox-message-body {
    background: #303030;
}

.init-chatbox-text {
    display: block;
}

.init-chatbox-input-message {
    padding-right: 67px;
}

#init-chatbox-form .uep-trigger-button {
    margin-right: 0;
    right: 30px;
}