
/* =========================================
   TOONLOKA BLACK EMERALD V10
   PREMIUM COMIC READER
========================================= */

/* ===== THEME COLORS ===== */

body[data-theme="dark"] {
    --reader-bg: #080f0c;
    --reader-surface: #0d1914;
    --reader-text: #f5f7f6;
    --reader-muted: #96a89e;
    --reader-border: #294638;
    --reader-accent: #00c853;
    color-scheme: dark;
}

body[data-theme="light"] {
    color-scheme: light;
}

body[data-theme="sepia"] {
    color-scheme: light;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */

.rv-header {
    background: var(--reader-surface);
    border-bottom: 1px solid var(--reader-border);
}

body[data-theme="dark"] .rv-header {
    background: rgba(8, 18, 12, .98);
    backdrop-filter: blur(14px);
}

.rv-header-inner {
    max-width: 1400px;
    min-height: 68px;
    padding: 12px 28px;
}

.rv-brand {
    flex-shrink: 0;
    background: #00c853;
    color: #fff;
    border-radius: 3px;
    font-weight: 900;
}

.rv-header-title strong {
    font-size: 15px;
    font-weight: 750;
    color: var(--reader-text);
}

.rv-header-title small {
    color: var(--reader-muted);
    font-size: 12px;
}

.rv-toolbar {
    gap: 9px;
}

/* ===== TOOLBAR BUTTONS ===== */

.rv-icon-button {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    color: var(--reader-text);
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

body[data-theme="dark"] .rv-icon-button {
    background: #14271c;
    border-color: #294638;
}

body[data-theme="dark"] .rv-icon-button:hover {
    background: #203d2d;
    color: #43e586;
    border-color: #00c853;
}

/* ===== PROGRESS BAR ===== */

.rv-progress {
    height: 3px;
}

.rv-progress-fill {
    background: linear-gradient(
        90deg,
        #009e46,
        #00df68
    );
}

.rv-progress-label {
    border-radius: 9px;
    padding: 11px 16px;
    font-size: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,.15);
}

body[data-theme="dark"] .rv-progress-label {
    background: rgba(13,25,20,.96);
    color: #43e586;
}

/* ===== EPISODE INTRO ===== */

.rv-intro {
    padding: 65px 24px 55px;
}

body[data-theme="dark"] .rv-intro {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(0,200,83,.075),
        transparent 70%
    );
}

.rv-kicker {
    color: #00a651;
    font-size: 11px;
    letter-spacing: 2.5px;
}

body[data-theme="dark"] .rv-kicker {
    color: #00df68;
}

.rv-intro h1 {
    font-weight: 850;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: -1.4px;
    color: var(--reader-text);
}

.rv-intro p {
    color: var(--reader-muted);
    line-height: 1.7;
}

.rv-intro-hint {
    margin-top: 32px;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.rv-intro-hint span {
    color: #00c853;
}

/* ===== COMIC PANELS ===== */

.rv-chapter {
    width: 100%;
    max-width: var(--panel-width);
    margin: 0 auto;
}

.rv-panel-slot {
    padding: 0;
    margin: 0;
}

.rv-panel {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
}

/* Jangan ubah warna asli gambar komik */

.rv-panel,
.rv-local-image {
    filter: none;
}

/* ===== NAVIGATION ===== */

.rv-finish {
    padding: 60px 24px 110px;
}

.rv-finish h2 {
    font-weight: 800;
    letter-spacing: -.6px;
}

body[data-theme="dark"] .rv-finish small {
    color: #43e586;
}

.rv-button {
    min-height: 44px;
    border-radius: 8px;
    font-weight: 650;
    transition:
        background .2s ease,
        border-color .2s ease;
}

body[data-theme="dark"] .rv-button {
    background: #14271c;
    border-color: #294638;
}

body[data-theme="dark"] .rv-button:hover {
    background: #203d2d;
    border-color: #00c853;
}

body[data-theme="dark"] .rv-button-primary {
    background: #00c853;
    border-color: #00c853;
    color: #07150c;
    font-weight: 800;
}

body[data-theme="dark"] .rv-button-primary:hover {
    background: #32e87b;
}

/* ===== SETTINGS DIALOG ===== */

.rv-dialog {
    border-radius: 14px;
    border: 1px solid var(--reader-border);
    box-shadow: 0 25px 80px rgba(0,0,0,.35);
}

.rv-dialog::backdrop {
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
}

.rv-dialog-head {
    border-bottom: 1px solid var(--reader-border);
    padding-bottom: 18px;
}

.rv-dialog-head h3 {
    font-weight: 800;
}

.rv-theme-option {
    min-height: 44px;
    font-weight: 600;
}

.rv-theme-option.active {
    border-color: #00c853;
}

.rv-width-range {
    accent-color: #00c853;
}

.rv-episode-option {
    border-radius: 7px;
    margin-bottom: 5px;
}

body[data-theme="dark"] .rv-episode-option:hover {
    background: #14271c;
}

body[data-theme="dark"] .rv-episode-option.active {
    color: #43e586;
    background: #173927;
}

/* ===== FLOATING CONTROLS ===== */

.rv-floating {
    gap: 9px;
}

.rv-floating .rv-icon-button {
    box-shadow: 0 5px 18px rgba(0,0,0,.18);
}

/* ===== SOURCE CREDIT ===== */

.rv-source-credit {
    max-width: 800px;
    margin: 32px auto;
    padding: 18px 22px;
    border: 1px solid var(--reader-border);
    border-left: 3px solid #00c853;
    background: var(--reader-surface);
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--reader-muted);
    overflow-wrap: anywhere;
}

.rv-source-credit strong {
    color: var(--reader-text);
}

.rv-source-credit a {
    color: #009e46;
    text-decoration: underline;
}

body[data-theme="dark"] .rv-source-credit a {
    color: #43e586;
}

/* ===== ACCESSIBILITY ===== */

.rv-button:focus-visible,
.rv-icon-button:focus-visible,
.rv-theme-option:focus-visible,
.rv-episode-option:focus-visible {
    outline: 2px solid #00c853;
    outline-offset: 3px;
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

    .rv-header-inner {
        min-height: 60px;
        padding: 10px 12px;
        gap: 9px;
    }

    .rv-header-title strong {
        font-size: 12px;
    }

    .rv-header-title small {
        font-size: 10px;
    }

    .rv-toolbar {
        gap: 5px;
        flex-shrink: 0;
    }

    .rv-toolbar .rv-icon-button {
        width: 34px;
        height: 36px;
        font-size: 16px;
    }

    .rv-intro {
        padding: 35px 18px;
    }

    .rv-intro h1 {
        font-size: 32px;
    }

    .rv-kicker {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .rv-intro-hint {
        margin-top: 24px;
    }

    .rv-chapter {
        max-width: 100%;
    }

    .rv-floating {
        right: 12px;
    }

    .rv-progress-label {
        left: 12px;
        font-size: 10px;
        padding: 9px 12px;
    }

    .rv-source-credit {
        margin: 24px 15px;
        padding: 14px;
    }

    .rv-dialog {
        padding: 20px;
    }

    .rv-finish {
        padding: 40px 15px 100px;
    }
}

@media (max-width: 360px) {

    .rv-header-inner {
        gap: 5px;
    }

    .rv-toolbar {
        gap: 4px;
    }

    .rv-toolbar .rv-icon-button {
        width: 29px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .rv-header,
    .rv-button,
    .rv-icon-button {
        transition: none;
    }
}


/* TOONLOKA_FINAL_CREDIT_STYLE */

.rv-source-credit {
    width: calc(100% - 30px);
    max-width: 800px;
    box-sizing: border-box;
    margin: 30px auto;
    padding: 20px;
    background: var(--reader-surface);
    color: var(--reader-text);
    border: 1px solid var(--reader-border);
    border-left: 3px solid #00c853;
    border-radius: 10px;
}

.rv-credit-heading {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.rv-credit-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--reader-border);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.rv-credit-row span {
    color: var(--reader-muted);
}

.rv-credit-row strong {
    text-align: right;
}

.rv-credit-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.rv-credit-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--reader-border);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

body[data-theme="dark"] .rv-credit-links a {
    background: #173927;
    color: #43e586;
}

