
/* TOONLOKA DARK EDITION V1 */

:root {
    --tl-bg: #080f0c;
    --tl-surface: #0d1914;
    --tl-card: #11251b;
    --tl-border: #1b3427;
    --tl-green: #00c853;
    --tl-text: #f5f7f6;
    --tl-muted: #96a89e;
}

html {
    color-scheme: dark;
    background: var(--tl-bg);
}

body {
    background: var(--tl-bg) !important;
    color: var(--tl-text) !important;
}

/* Navbar */

.topbar {
    background: #0d1914 !important;
    border-bottom: 1px solid var(--tl-border) !important;
}

.nav-shell,
.desktop-nav,
.nav-right {
    background: transparent !important;
}

.desktop-nav a {
    color: var(--tl-text) !important;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--tl-green) !important;
}

/* Main content */

.content-shell,
.catalog-tools,
.tl-showcase,
main,
footer {
    background: transparent !important;
    color: var(--tl-text);
}

h1, h2, h3, h4 {
    color: var(--tl-text) !important;
}

a {
    color: inherit;
}

/* Search */

.comic-search-box {
    background: var(--tl-card) !important;
    border: 1px solid var(--tl-border) !important;
}

.comic-search-box input {
    background: transparent !important;
    color: var(--tl-text) !important;
}

.comic-search-box input::placeholder {
    color: var(--tl-muted);
}

.comic-search-box button {
    background: var(--tl-green) !important;
    color: #06120a !important;
}

.catalog-sort select {
    background: var(--tl-card);
    color: var(--tl-text);
    border: 1px solid var(--tl-border);
    border-radius: 6px;
    padding: 6px 10px;
}

/* Category filters */

.catalog-filter-pill {
    background: var(--tl-card) !important;
    color: #c2d3c9 !important;
    border: 1px solid var(--tl-border);
}

.catalog-filter-pill:hover,
.catalog-filter-pill.active {
    background: var(--tl-green) !important;
    color: #06120a !important;
}

.active-filter-info {
    background: var(--tl-card) !important;
    color: var(--tl-text) !important;
}

/* Comic cards */

.tl-showcase-card,
.comic-card {
    background: transparent !important;
    color: var(--tl-text) !important;
}

.tl-showcase-title,
.comic-title {
    color: var(--tl-text) !important;
}

.tl-showcase-genre,
.tl-showcase-status,
.comic-genre {
    color: var(--tl-muted) !important;
}

.tl-showcase-cover {
    background: var(--tl-card) !important;
    border-radius: 6px;
}

.tl-showcase-card:hover .tl-showcase-title {
    color: var(--tl-green) !important;
}

/* Footer */

footer {
    background: var(--tl-surface) !important;
    border-top: 1px solid var(--tl-border) !important;
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--tl-bg);
}

::-webkit-scrollbar-thumb {
    background: #284536;
    border-radius: 8px;
}

::selection {
    background: var(--tl-green);
    color: #080f0c;
}

/* TOONLOKA BLACK EMERALD */

html,
body {
    background: #080f0c !important;
    color: #f5f7f6 !important;
}

body {
    background-image: linear-gradient(
        180deg,
        #080f0c 0%,
        #0d1b14 45%,
        #080f0c 100%
    ) !important;
}

.topbar {
    background: #0b1610 !important;
    border-bottom: 1px solid #20382a !important;
}

.tl-hero {
    background: #06130d !important;
    margin-bottom: 0 !important;
}

.content-shell {
    background: transparent !important;
}

.tl-showcase-title,
.comic-title {
    color: #f5f7f6 !important;
}

.tl-showcase-genre,
.tl-showcase-status,
.comic-genre {
    color: #96a89e !important;
}

footer {
    background: #0b1610 !important;
    color: #96a89e !important;
    border-top: 1px solid #20382a !important;
}

/* =========================================
   TOONLOKA BLACK EMERALD V2
   PREMIUM UI REFINEMENT
========================================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

/* ===== NAVBAR ===== */

.topbar {
    background: rgba(8, 18, 12, .97) !important;
    border-bottom: 1px solid #20382a !important;
    backdrop-filter: blur(16px);
}

.nav-shell {
    box-sizing: border-box;
    max-width: 1600px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.desktop-nav {
    gap: 28px;
}

.desktop-nav a {
    font-size: 13px;
    font-weight: 700;
    transition: color .2s ease;
}

.desktop-nav a:hover {
    color: #00df68 !important;
}

/* ===== NAVBAR BUTTONS ===== */

.nav-right a {
    transition: all .2s ease;
}

.nav-right a[href*="login.php"] {
    background: #14271c !important;
    border: 1px solid #294638 !important;
    color: #f5f7f6 !important;
}

.nav-right a[href*="register.php"] {
    background: #00c853 !important;
    color: #06130d !important;
}

.nav-right a[href*="admin/"] {
    background: #192b20 !important;
    color: #e0eee5 !important;
    border: 1px solid #294638 !important;
}

.nav-right a:hover {
    filter: brightness(1.15);
}

/* ===== CONTENT WIDTH ===== */

.content-shell {
    max-width: 1400px !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 32px !important;
    padding-right: 32px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ===== SECTION HEADING ===== */

.tl-showcase {
    margin-top: 38px !important;
    margin-bottom: 48px !important;
}

.tl-showcase-heading {
    margin-bottom: 22px !important;
}

.tl-showcase-heading h2 {
    position: relative;
    padding-left: 15px;
    font-size: 23px !important;
    font-weight: 800;
    letter-spacing: -.6px;
}

.tl-showcase-heading h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    border-radius: 5px;
    background: #00c853;
}

/* ===== COMIC GRID ===== */

.tl-showcase-grid {
    display: grid;
    grid-template-columns:
        repeat(6, minmax(0, 1fr)) !important;
    gap: 28px 16px !important;
}

.tl-showcase-card {
    position: relative;
    min-width: 0;
}

.tl-showcase-cover {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px !important;
    border: 1px solid #20382a;
    box-sizing: border-box;
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease !important;
}

.tl-showcase-card:hover .tl-showcase-cover {
    transform: translateY(-5px);
    border-color: #00c853;
    box-shadow: 0 8px 22px rgba(0, 200, 83, .12);
}

.tl-showcase-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-top: 10px !important;
    color: #f5f7f6 !important;
}

.tl-showcase-genre {
    font-size: 11px !important;
    color: #96a89e !important;
    margin-top: 5px;
}

.tl-showcase-status {
    color: #96a89e !important;
    font-size: 11px !important;
    margin-top: 7px !important;
}

/* ===== SEARCH ===== */

.comic-search-form {
    margin-bottom: 22px;
}

.comic-search-box {
    background: #11251b !important;
    border: 1px solid #294638 !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.comic-search-box:focus-within {
    border-color: #00c853 !important;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, .10);
}

.comic-search-box input {
    color: #f5f7f6 !important;
}

.comic-search-box button {
    background: #00c853 !important;
    color: #06130d !important;
    font-weight: 800;
}

/* ===== CATEGORY FILTER ===== */

.catalog-category-filter {
    gap: 8px !important;
}

.catalog-filter-pill {
    background: #14271c !important;
    border: 1px solid #20382a !important;
    color: #b9ccbf !important;
    transition: all .2s ease;
}

.catalog-filter-pill.active,
.catalog-filter-pill:hover {
    background: #00c853 !important;
    border-color: #00c853 !important;
    color: #06130d !important;
}

/* ===== ACCESSIBILITY ===== */

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid #00df68;
    outline-offset: 4px;
}

/* ===== TABLET ===== */

@media (max-width: 1024px) {
    .tl-showcase-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr)) !important;
    }

    .content-shell {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {
    .nav-shell {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .content-shell {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .tl-showcase {
        margin-top: 22px !important;
        margin-bottom: 28px !important;
    }

    .tl-showcase-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
        gap: 18px 9px !important;
    }

    .tl-showcase-heading h2 {
        font-size: 18px !important;
    }

    .tl-showcase-title {
        font-size: 12px !important;
    }

    .tl-showcase-status,
    .tl-showcase-genre {
        font-size: 10px !important;
    }

    .tl-showcase-cover {
        border-radius: 6px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tl-showcase-cover,
    .nav-right a {
        transition: none !important;
    }
}

/* =====================================
   TOONLOKA BLACK EMERALD V3
   HOMEPAGE LAYOUT
===================================== */

.catalog-tools {
    margin-top: 30px !important;
    margin-bottom: 36px !important;
}

.comic-search-form {
    max-width: 900px;
    margin: 0 auto 24px !important;
}

.comic-search-box {
    min-height: 52px;
    border-radius: 10px !important;
    background: #101f17 !important;
}

.comic-search-box input {
    font-size: 14px;
}

.catalog-category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px !important;
    margin-bottom: 20px;
}

.catalog-filter-pill {
    padding: 11px 20px;
    font-size: 12px;
}

.catalog-sort {
    color: #96a89e;
    font-size: 12px;
    margin-bottom: 20px;
}

.catalog-sort select {
    background: #11251b !important;
    color: #f5f7f6 !important;
    border: 1px solid #294638;
    padding: 8px 12px;
    border-radius: 6px;
}

.tl-showcase {
    margin-top: 24px !important;
}

.tl-showcase-heading {
    padding-bottom: 15px;
    border-bottom: 1px solid #20382a;
}

.tl-showcase-card {
    transition: transform .2s ease;
}

.tl-showcase-status {
    line-height: 1.6;
}

.tl-showcase-card:focus-visible {
    outline: 2px solid #00c853;
    outline-offset: 5px;
    border-radius: 8px;
}

/* Mobile layout */

@media (max-width: 768px) {

    .catalog-tools {
        margin-top: 18px !important;
        margin-bottom: 24px !important;
    }

    .catalog-category-filter {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .catalog-filter-pill {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 9px 14px;
    }

    .comic-search-box {
        min-height: 46px;
    }

    .tl-showcase-heading {
        padding-bottom: 12px;
    }
}

/* TOONLOKA BLACK EMERALD V4 */

.catalog-tools {
    margin-bottom: 18px !important;
}

.tl-showcase {
    margin-top: 18px !important;
    margin-bottom: 38px !important;
}

.tl-showcase-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.5;
}

.tl-showcase-genre {
    font-size: 12px !important;
    color: #9fb4a7 !important;
}

.tl-showcase-status {
    font-size: 11px !important;
    color: #8fa99a !important;
}

.tl-showcase-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tl-section-more {
    color: #00c853;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.tl-section-more:hover {
    color: #54ef95;
}

.tl-showcase-cover {
    background: #11251b !important;
}

.tl-showcase-grid {
    row-gap: 26px !important;
}

@media (max-width: 768px) {
    .tl-showcase-title {
        font-size: 12px !important;
    }

    .tl-showcase-genre {
        font-size: 10px !important;
    }

    .tl-section-more {
        font-size: 11px;
    }
}

/* TOONLOKA BLACK EMERALD V4 FINAL */

.tl-showcase-card[hidden] {
    display: none !important;
}

.tl-showcase {
    margin-top: 24px !important;
    margin-bottom: 42px !important;
}

.tl-section-more {
    background: #14271c;
    border: 1px solid #294638;
    color: #00df68;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.tl-section-more:hover {
    background: #203d2d;
}

.tl-ready {
    color: #43d881;
}

.tl-unavailable {
    color: #96a89e;
}

.tl-showcase-card {
    text-decoration: none;
}

.tl-showcase-title {
    white-space: normal !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .tl-showcase {
        margin-bottom: 28px !important;
    }

    .tl-section-more {
        padding: 7px 10px;
        font-size: 10px;
    }
}

/* TOONLOKA MOBILE V11 FINAL REFINEMENT */

@media (max-width: 768px) {

    /* Compact spacing */

    .catalog-tools {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .catalog-sort {
        margin-top: 6px !important;
        margin-bottom: 0 !important;
    }

    .tl-showcase {
        margin-top: 16px !important;
        margin-bottom: 26px !important;
    }

    .tl-showcase-heading {
        padding-bottom: 10px !important;
        margin-bottom: 14px !important;
    }

    /* Comic cards */

    .tl-showcase-grid {
        gap: 16px 10px !important;
    }

    .tl-showcase-title {
        font-size: 12px !important;
        line-height: 1.5;
        margin-top: 8px !important;
    }

    .tl-showcase-genre {
        color: #96a89e !important;
        font-size: 10px !important;
    }

    .tl-showcase-status {
        font-size: 10px !important;
        margin-top: 4px !important;
    }

    /* Account dropdown button */

    .nav-right button[aria-expanded] {
        background: #14271c !important;
        color: #e5f2ea !important;
        border: 1px solid #294638 !important;
    }

    /* Bottom navigation */

    .tl-mobile-nav {
        background: #0b1610 !important;
        border-top: 1px solid #294638 !important;
    }

    .tl-mobile-item.active {
        background: #102d1d !important;
        color: #00df68 !important;
    }

    .tl-mobile-item {
        transition: background .2s, color .2s;
    }
}

/* =========================================
   TOONLOKA V12
   RESPONSIVE MOBILE HERO
========================================= */

@media (max-width: 768px) {

    #tlHomepageHero {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        margin: 12px auto 20px !important;
        border: 1px solid #294638;
        border-radius: 12px;
        overflow: hidden;
    }

    #tlHomepageHero .tl-hero-fallback {
        position: relative;
        isolation: isolate;

        aspect-ratio: 16 / 9 !important;
        min-height: 215px !important;

        background: #06130d !important;
        overflow: hidden;
    }

    /* Manga artwork */

    #tlHomepageHero .tl-hero-fallback::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -2;

        background-image: url('banners/hero-manga.webp');
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: right center;
    }

    /* Dark gradient */

    #tlHomepageHero .tl-hero-fallback::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;

        background: linear-gradient(
            90deg,
            #06130d 0%,
            rgba(6,19,13,.98) 25%,
            rgba(6,19,13,.85) 42%,
            rgba(6,19,13,.20) 68%,
            transparent 100%
        );
    }

    /* Responsive text content */

    #tlHomepageHero .tl-hero-fallback .tl-hero-content {
        position: relative !important;
        inset: auto !important;
        width: 100%;
        min-height: 215px !important;
        height: 100%;
        padding: 18px !important;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-label {
        display: block !important;
        font-size: 8px;
        letter-spacing: 1.5px;
        font-weight: 800;
        color: #00df68;
        margin-bottom: 9px;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-title {
        display: block !important;
        color: #ffffff;
        font-size: clamp(23px, 6vw, 34px) !important;
        font-weight: 800;
        letter-spacing: -.8px;
        line-height: 1.12;
        max-width: 57%;
        margin: 0 0 10px;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-description {
        display: block !important;
        max-width: 53%;
        font-size: 10px !important;
        line-height: 1.65;
        color: #c1d1c7;
        margin-bottom: 14px;
    }

    /* Functional CTA */

    #tlHomepageHero .tl-hero-fallback .tl-hero-cta {
        position: relative !important;

        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;

        opacity: 1 !important;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-height: 40px;
        padding: 10px 14px !important;
        background: #00c853;
        color: #06130d;

        font-size: 11px;
        font-weight: 800;
        border-radius: 6px;
        gap: 8px;
    }

    #tlHomepageHero .tl-hero-cta:hover {
        background: #32e87b;
    }

    #tlHomepageHero .tl-hero-cta:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 3px;
    }
}

@media (max-width: 360px) {

    #tlHomepageHero .tl-hero-fallback,
    #tlHomepageHero .tl-hero-fallback .tl-hero-content {
        min-height: 210px !important;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-content {
        padding: 14px !important;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-title {
        font-size: 22px !important;
    }

    #tlHomepageHero .tl-hero-fallback .tl-hero-description {
        font-size: 9px !important;
    }
}


/* TOONLOKA CATEGORY COLOR FIX V1 */

#kategori button,
#kategori [role="tab"],
#kategori .category-pill,
#kategori .genre-pill,
#kategori .category-tab,
#kategori .tab-btn {
    background: #15291e !important;
    color: #dce9e1 !important;
    border: 1px solid #294638 !important;
    transition: background .2s ease,
                color .2s ease,
                border-color .2s ease;
}

#kategori button:hover,
#kategori [role="tab"]:hover,
#kategori .category-pill:hover,
#kategori .genre-pill:hover,
#kategori .category-tab:hover,
#kategori .tab-btn:hover {
    background: #1d3828 !important;
    color: #ffffff !important;
    border-color: #00c853 !important;
}

#kategori .active,
#kategori .is-active,
#kategori .selected,
#kategori [aria-selected="true"],
#kategori [aria-pressed="true"] {
    background: #00c853 !important;
    color: #07130c !important;
    border-color: #00c853 !important;
    font-weight: 700;
}

#kategori a:hover {
    color: #00c853;
}

/* END CATEGORY COLOR FIX V1 */

