/*
Theme Name: galsa - جلسة
Theme URI: https://peach-bl.com
Author: some cool girl
Author URI: لو يهمك كان عرفت
Description: for webtoon.
Version: 1.0
*/


:root {
    --primary-color: #ff9994;
    --second-color: #915451;

    --bg: #111;
    --surface: #111318;
    --surface2: #181b22;

    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(255, 255, 255, 0.13);

    --text: #e8eaf0;
    --text2: #8a90a0;
    --text3: #555c70;

    --color-chapter: #3b82f6;
    --color-webtoon: #a855f7;
    --color-site: #22c55e;

    --radius: 14px;
    --sidebar-width: 260px;

    --status-ongoing: #28a745;
    --status-completed: #007bff;
    --status-upcoming: #ffc107;
    --status-stopped: #dc3545;
}

/* 
   2. إعادة الضبط والأساسيات
 */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.site-header {
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.44);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: #0009;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-logo {
    max-width: 150px;
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.header-menu .menu-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.header-menu .menu-item a,
.header-menu .menu-item button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.header-menu .menu-item a:hover,
.header-menu .menu-item button:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 50px 0;
}

.modal-content {
    background-color: #2a2a2a;
    margin: 0 auto;
    padding: 10px;
    max-width: 600px;
    border-radius: 5px;
    color: #fff;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: var(--primary-color);
}

.account-modal {
    direction: rtl;
}

.account-header {
    text-align: center;
    padding: 15px 0 10px;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgba(255,255,255,0.2);
}

.account-name {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.account-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-menu-item {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.account-menu-item a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.account-menu-item a:hover {
    background: rgba(255,255,255,0.15);
    color: var(--primary-color);
    border-radius: 8px;
}

.account-menu-item i {
    margin-left: 8px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.admin-option {
    border-right: 5px solid var(--primary-color);
}

.account-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.logout-button {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
    font-size: 14px;
}

.logout-button:hover {
    opacity: 0.9;
}

.account-modal.guest-mode {
    direction: rtl;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 5px;
}

.auth-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-btn {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.login-btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.register-btn {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.register-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.disabled-item {
    opacity: 0.6;
    cursor: not-allowed;
}

.disabled-item a {
    cursor: not-allowed;
}

.disabled-item a small {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 4px;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 12, 16, 0.88);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
}

.page-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    white-space: nowrap;
}

.page-back-btn:hover {
    color: var(--text);
    border-color: var(--border2);
    background: var(--surface2);
}

.page-back-btn svg {
    transform: rotate(180deg);
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.page-header-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 153, 148, 0.3);
    flex-shrink: 0;
}

.page-header-title h1 {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
}

.page-header-pill {
    font-size: 12px;
    color: var(--text2);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 20px;
}

.page-header-count {
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 30px;
    text-align: center;
    line-height: 1;
}

.page-header-count span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.page-header-count small {
    font-size: 11px;
    color: var(--text3);
}

.page-body {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.page-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-main {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
}

.sidebar-block-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 10px 6px;
}

.sidebar-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: none;
    color: var(--text2);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: right;
    width: 100%;
}

.sidebar-tab:hover {
    background: var(--surface2);
    color: var(--text);
}

.sidebar-tab.active {
    background: var(--primary-color);
    color: #fff;
}

.sidebar-tab-count {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.sidebar-tab.active .sidebar-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: transparent;
}

.view-toggle-row {
    display: flex;
    gap: 6px;
    padding: 4px 4px 2px;
}

.view-toggle-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s;
    display: grid;
    place-items: center;
}

.view-toggle-btn:hover {
    border-color: var(--border2);
    color: var(--text);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-wrap svg {
    stroke: var(--text3);
    flex-shrink: 0;
}

.search-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    direction: rtl;
}

.search-wrap input::placeholder {
    color: var(--text3);
}

.toolbar-label {
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 80px 20px;
    text-align: center;
}

.empty-state-art {
    opacity: 0.1;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50%       { opacity: 0.16; transform: scale(1.04); }
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.empty-state p {
    font-size: 13px;
    color: var(--text3);
    max-width: 260px;
    line-height: 1.7;
    margin: 0;
}

.discover-btn {
    padding: 10px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 153, 148, 0.3);
    transition: all 0.2s;
}

.discover-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 153, 148, 0.4);
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px;
    color: var(--text3);
    font-size: 14px;
}

.spinner {
    width: 26px;
    height: 26px;
    border: 2px solid var(--border2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bk-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bk-list-item {
    background: rgba(185, 97, 93, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s;
    animation: cardIn 0.3s ease both;
    display: flex;
    gap: 14px;
    overflow: hidden;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.bk-list-item:hover {
    transform: translateX(-3px);
    border-color: var(--border2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: var(--surface2);
}

.bk-list-cover {
    width: 90px;
    flex-shrink: 0;
    position: relative;
    background: var(--surface2);
}

.bk-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bk-list-status-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.bk-list-status-badge.s-reading      { background: rgba(59,130,246,0.9); }
.bk-list-status-badge.s-favorites    { background: rgba(239,68,68,0.9); }
.bk-list-status-badge.s-plan_to_read { background: rgba(245,158,11,0.9); }
.bk-list-status-badge.s-completed    { background: rgba(34,197,94,0.9); }

.bk-list-info {
    flex: 1;
    padding: 12px 14px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bk-list-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
}

.bk-list-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    row-gap: 6px;
}

.bk-list-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text2);
}

.bk-list-meta-item.rating { color: #f59e0b; }
.bk-list-meta-item.rating svg { fill: #f59e0b; stroke: none; }

.bk-list-chapters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text3);
}

.bk-list-type {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--surface2);
    color: var(--text2);
}

.bk-list-arrow {
    display: flex;
    align-items: center;
    padding-left: 16px;
    color: var(--text3);
    transition: all 0.2s;
}

.bk-list-item:hover .bk-list-arrow {
    transform: translateX(-4px);
    color: var(--primary-color);
}

.bk-sort-label {
    font-size: 11px;
    color: var(--text3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    padding: 0 2px;
}

.bk-sort-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bk-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(185, 97, 93, 0.04);
    color: var(--text2);
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.bk-sort-btn:hover {
    background: rgba(185, 97, 93, 0.5);
    border-color: var(--border2);
    color: var(--text);
}

.bk-sort-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.bk-login-prompt {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bk-login-prompt svg { stroke: var(--text3); }
.bk-login-prompt p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    margin: 0;
}

.bk-login-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(185, 97, 93, 0.3);
}

.bk-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(185, 97, 93, 0.4);
}

.bk-quick-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.bk-quick-panel.open { pointer-events: all; }

.bk-qp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.bk-quick-panel.open .bk-qp-overlay { opacity: 1; }

.bk-qp-drawer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 85vw);
    background: var(--surface);
    border-right: 1px solid var(--border2);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
}

.bk-quick-panel.open .bk-qp-drawer { transform: translateX(0); }

.bk-qp-cover-wrap {
    height: 450px;
    position: relative;
    flex-shrink: 0;
    background: var(--surface2);
}

.bk-qp-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bk-qp-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--surface) 0%, transparent 60%);
}

.bk-qp-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bk-qp-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    z-index: 10;
}

.bk-qp-close:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

#bk-qp-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
}

.bk-qp-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bk-qp-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text2);
}

.bk-qp-meta-item svg { stroke: var(--text3); flex-shrink: 0; }
.bk-qp-rating { color: #f59e0b !important; }
.bk-qp-rating svg { stroke: #f59e0b !important; fill: #f59e0b; }

.bk-qp-status-change p {
    font-size: 12px;
    color: var(--text3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}

.bk-qp-status-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bk-qp-status-btn {
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text2);
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.bk-qp-status-btn:hover { border-color: var(--border2); color: var(--text); }
.bk-qp-status-btn.active { border-color: transparent; }
.bk-qp-status-btn.active.s-reading      { background: rgba(59,130,246,0.2);  color: #3b82f6; border-color: rgba(59,130,246,0.4); }
.bk-qp-status-btn.active.s-favorites    { background: rgba(239,68,68,0.2);   color: #ef4444; border-color: rgba(239,68,68,0.4); }
.bk-qp-status-btn.active.s-plan_to_read { background: rgba(245,158,11,0.2);  color: #f59e0b; border-color: rgba(245,158,11,0.4); }
.bk-qp-status-btn.active.s-completed    { background: rgba(34,197,94,0.2);   color: #22c55e; border-color: rgba(34,197,94,0.4); }

.bk-qp-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.bk-qp-primary-btn {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(185, 97, 93, 0.3);
    transition: all 0.2s;
}

.bk-qp-primary-btn:hover {
    box-shadow: 0 6px 20px rgba(185, 97, 93, 0.45);
    transform: translateY(-1px);
}

.bk-qp-remove-btn {
    padding: 12px 18px;
    border-radius: 30px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bk-qp-remove-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
}

.hs-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    position: sticky;
    top: 76px;
    z-index: 5;
}

.hs-group-header::before,
.hs-group-header::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
    background: var(--border);
}

.hs-group-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    white-space: nowrap;
    flex-shrink: 0;
}

.hs-group-label svg { stroke: var(--text3); }

.hs-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
}

.hs-items-grid.view-list {
    grid-template-columns: 1fr;
    gap: 8px;
}

.hs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    animation: cardIn 0.3s ease both;
    text-decoration: none;
    display: block;
}

.hs-card:hover {
    transform: translateY(-3px);
    border-color: var(--border2);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hs-card:hover .hs-card-img { transform: scale(1.06); }

.hs-card-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--surface2);
}

.hs-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.hs-card-grad {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    background: linear-gradient(to top, rgba(11, 12, 16, 0.95) 0%, transparent 100%);
}

.hs-card-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hs-card-type-badge.t-chapter { background: rgba(59,130,246,0.8); color: #fff; }
.hs-card-type-badge.t-webtoon { background: rgba(168,85,247,0.8); color: #fff; }
.hs-card-type-badge.t-site    { background: rgba(34,197,94,0.8);  color: #fff; }

.hs-card-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.hs-card-chapter-num {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.hs-card-info { padding: 10px; }

.hs-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 5px;
}

.hs-card-sub {
    font-size: 11px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hs-card.view-list {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 0;
    aspect-ratio: unset;
    align-items: stretch;
}

.hs-card.view-list .hs-card-cover {
    aspect-ratio: unset;
    height: 72px;
    width: 60px;
    flex-shrink: 0;
    border-radius: 0;
}

.hs-card.view-list .hs-card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
}

.hs-card.view-list .hs-card-title {
    font-size: 13px;
    -webkit-line-clamp: 1;
    margin-bottom: 4px;
}

.hs-card.view-list .hs-card-grad,
.hs-card.view-list .hs-card-bottom { display: none; }

.hs-card.view-list .hs-card-type-badge {
    top: 6px;
    right: 6px;
    font-size: 9px;
    padding: 2px 7px;
}

.hs-card-list-time {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text3);
    white-space: nowrap;
    flex-shrink: 0;
    gap: 4px;
}

.hs-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.hs-stat-cell {
    background: var(--surface);
    padding: 14px 12px;
    text-align: center;
}

.hs-stat-cell-val {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.hs-stat-cell-val.c-all     { color: var(--text); }
.hs-stat-cell-val.c-chapter { color: var(--color-chapter); }
.hs-stat-cell-val.c-webtoon { color: var(--color-webtoon); }
.hs-stat-cell-val.c-site    { color: var(--color-site); }

.hs-stat-cell-lbl { font-size: 11px; color: var(--text3); }

.period-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text2);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: right;
    width: 100%;
}

.period-btn:hover { background: var(--surface2); color: var(--text); }
.period-btn.active { color: var(--primary-color); background: rgba(255, 153, 148, 0.08); }

.clear-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clear-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.07);
    color: #ef4444;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.ac-root {
    min-height: 100vh;
    position: relative;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.ac-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.ac-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.ac-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 92px;
    height: fit-content;
}

.ac-profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.ac-profile-banner {
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--second-color) 100%);
    position: relative;
}

.ac-profile-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.ac-avatar-wrap {
    padding: 0 20px;
    margin-top: -30px;
    position: relative;
}

.ac-sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--surface);
    object-fit: cover;
    display: block;
}

.ac-profile-info { padding: 10px 20px 18px; }

.ac-profile-name {
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 2px;
}

.ac-profile-login {
    font-size: 12px;
    color: var(--text2);
}

.ac-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
    margin-top: 14px;
}

.ac-stat {
    background: var(--surface);
    padding: 12px;
    text-align: center;
}

.ac-stat:first-child { border-radius: 0 0 0 16px; }
.ac-stat:last-child  { border-radius: 0 0 16px 0; }

.ac-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Tajawal', sans-serif;
    display: block;
}

.ac-stat-lbl {
    font-size: 11px;
    color: var(--text3);
    margin-top: 2px;
}

.ac-sidenav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-navitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.ac-navitem svg { flex-shrink: 0; }
.ac-navitem:hover { background: var(--surface2); color: var(--text); }
.ac-navitem.active { background: var(--primary-color); color: #fff; }
.ac-navitem.danger:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.ac-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.ac-section-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ac-section-head-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 153, 148, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ac-section-head-icon svg { stroke: var(--primary-color); }

.ac-section-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
}

.ac-section-sub {
    font-size: 12px;
    color: var(--text3);
    margin-top: 1px;
}

.ac-section-body { padding: 24px; }

.ac-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.ac-alert svg { flex-shrink: 0; margin-top: 1px; }
.ac-alert-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.2);  color: #22c55e; }
.ac-alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.2);  color: #ef4444; }

.ac-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ac-form-grid.full { grid-template-columns: 1fr; }

.ac-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ac-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ac-field-wrap { position: relative; }

.ac-field-wrap svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    stroke: var(--text3);
}

.ac-input {
    width: 100%;
    padding: 11px 40px 11px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    direction: rtl;
}

.ac-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 148, 0.12);
}

.ac-input:disabled { opacity: 0.4; cursor: not-allowed; }
.ac-input::placeholder { color: var(--text3); }

.ac-avatar-upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ac-avatar-preview-wrap {
    position: relative;
    flex-shrink: 0;
}

.ac-avatar-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: block;
    transition: opacity 0.3s;
}

.ac-avatar-preview-wrap:hover .ac-avatar-preview { opacity: 0.7; }

.ac-avatar-preview-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.ac-avatar-preview-wrap:hover .ac-avatar-preview-overlay { opacity: 1; }
.ac-avatar-preview-overlay svg { stroke: #fff; }

.ac-avatar-upload-info { flex: 1; }
.ac-avatar-upload-info h4 { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.ac-avatar-upload-info p  { font-size: 12px; color: var(--text3); margin: 0 0 14px; line-height: 1.6; }

.ac-upload-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}

.ac-upload-btn-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ac-upload-btn-label svg { stroke: var(--primary-color); }
.ac-upload-file-input { display: none; }

.ac-avatar-filename {
    font-size: 12px;
    color: var(--text2);
    margin-top: 8px;
    display: none;
    align-items: center;
    gap: 6px;
}

.ac-avatar-filename svg { stroke: #22c55e; flex-shrink: 0; }
.ac-avatar-filename.visible { display: flex; }

.ac-avatar-new-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}

.ac-avatar-new-badge.visible { display: block; }

.ac-save-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.ac-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 30px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.ac-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 153, 148, 0.3);
}

.ac-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 153, 148, 0.4);
}

.ac-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ac-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ac-info-row:last-child { border-bottom: none; padding-bottom: 0; }

.ac-info-key {
    font-size: 13px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ac-info-key svg { stroke: var(--text3); }

.ac-info-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.ac-info-val.accent { color: var(--primary-color); }

.ac-role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 153, 148, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(255, 153, 148, 0.2);
}

.ac-logout-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.ac-logout-link:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
}

.webtoon-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
}

.webtoon-container::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center 20%;
    filter: blur(50px) saturate(1.4) opacity(0.6);
    z-index: -2;
}

.webtoon-container::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.go-home-webtoon { margin-bottom: 20px; }

.go-home-webtoon a {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.go-home-webtoon a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.webtoon-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.webtoon-cover-container {
    position: relative;
    flex-shrink: 0;
}

.webtoon-cover {
    width: 200px;
    height: 280px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.webtoon-cover:hover { transform: scale(1.05); }

.cover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, rgba(255, 87, 51, 0.2), transparent);
    border-radius: 15px;
    pointer-events: none;
}

.cover-badges {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.cover-status-badge,
.cover-year-badge {
    pointer-events: auto;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cover-status-badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-right: 3px solid;
}

.cover-status-badge.status-ongoing   { border-right-color: var(--status-ongoing); }
.cover-status-badge.status-completed { border-right-color: var(--status-completed); }
.cover-status-badge.status-upcoming  { border-right-color: var(--status-upcoming); }
.cover-status-badge.status-stopped   { border-right-color: var(--status-stopped); }

.cover-year-badge {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cover-status-badge:hover,
.cover-year-badge:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.webtoon-info { flex: 1; }

.webtoon-title {
    font-size: 2.5em;
    margin: 0 0 15px;
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.webtoon-alternate-names-container { margin: 0 0 15px; }

.webtoon-alternate-names {
    font-size: 16px;
    color: #888;
    margin: 0;
    font-style: italic;
    cursor: pointer;
    transition: color 0.3s ease;
}

.webtoon-type-and-views {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.webtoon-type {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.type-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.type-link:hover { color: var(--primary-color); }
.flag { font-size: 1.2em; }

.webtoon-views {
    color: #aaa;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.rating-stat i { color: #ffc107; }

.rating-info {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.rating-value { font-size: 1.2rem; font-weight: bold; color: #ffc107; }
.rating-count { font-size: 0.75rem; color: #aaa; }

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 87, 51, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 87, 51, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.save-dropdown-wrapper { position: relative; }
.save-main-btn { gap: 8px; }
.save-arrow { font-size: 11px !important; transition: transform 0.3s ease; }
.save-dropdown-wrapper.open .save-arrow { transform: rotate(180deg); }

.save-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: rgba(20, 20, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    overflow: hidden;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    padding: 6px;
}

.save-dropdown-wrapper.open .save-dropdown {
    display: block;
    animation: dropIn 0.2s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.save-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    color: #ddd;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    text-align: right;
}

.save-option:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.save-option.active { color: var(--primary-color); background: rgba(255, 87, 51, 0.1); }
.save-option.active::after { content: ' ✓'; margin-right: auto; font-size: 12px; }
.remove-option { color: #e74c3c !important; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 4px; }
.remove-option:hover { background: rgba(231, 76, 60, 0.15) !important; }

.save-main-btn.saved-favorites    { border-color: #e74c3c; color: #e74c3c; }
.save-main-btn.saved-reading      { border-color: #3498db; color: #3498db; }
.save-main-btn.saved-plan_to_read { border-color: #f39c12; color: #f39c12; }
.save-main-btn.saved-completed    { border-color: #2ecc71; color: #2ecc71; }

.webtoon-genres,
.webtoon-creators-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.webtoon-genres h3,
.creators-section h3 {
    color: var(--primary-color);
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.genre-tags,
.creators-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-tag,
.creator-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.genre-tag:hover,
.creator-tag:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.no-creators { color: #666; font-size: 13px; }
.webtoon-creators-info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.toggle-meta-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-meta-btn:hover { background: var(--primary-color); }

.collapsed-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsed-content.expanded {
    max-height: 2000px;
    margin-bottom: 10px;
}

.webtoon-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.webtoon-description h3 { color: var(--primary-color); margin: 0 0 15px; }
.description-content { line-height: 1.8; color: #ddd; }

.webtoon-chapters {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
}

.webtoon-chapters h2 {
    color: var(--primary-color);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.rating-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.rating-modal-content {
    background: #1a1a1a;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.rating-modal-header {
    padding: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--second-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-modal-header h3 { margin: 0; color: white; }
.close-modal { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.rating-modal-body { padding: 30px; text-align: center; }
.rating-hint { color: #aaa; margin-bottom: 15px; font-size: 14px; }

.stars-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.star-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 10px;
}

.star-wrapper:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.1); }
.star-wrapper i { font-size: 32px; transition: all 0.3s ease; }
.star-value { font-size: 12px; margin-top: 5px; color: #888; }

.rating-feedback {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

#selected-rating { color: #ffc107; }

.submit-rating-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--second-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-rating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 87, 51, 0.4);
}

.already-voted-msg { padding: 20px; }
.already-voted-msg i { font-size: 48px; color: #2ecc71; margin-bottom: 15px; display: block; }
.already-voted-msg p { color: #ccc; margin: 5px 0; }
.your-rating-display { font-size: 18px; font-weight: bold; color: #ffc107 !important; margin-top: 10px !important; }

.migrate-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 87, 51, 0.4);
    border-radius: 16px;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.migrate-notice-content {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.migrate-icon { color: #f39c12; font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.migrate-text { flex: 1; min-width: 0; }
.migrate-text strong { color: #fff; font-size: 14px; display: block; margin-bottom: 4px; }
.migrate-text p { color: #aaa; font-size: 12px; margin: 0; }

.migrate-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    width: 100%;
}

.migrate-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.view-list-btn  { background: rgba(255, 255, 255, 0.1); color: #fff; }
.view-list-btn:hover { background: rgba(255, 255, 255, 0.2); }
.transfer-btn   { background: linear-gradient(45deg, var(--primary-color), #ff6b6b); color: white; }
.transfer-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 87, 51, 0.4); }

.migrate-dismiss {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 16px;
    margin-right: -4px;
    margin-top: -4px;
    margin-left: auto;
    transition: color 0.2s;
}

.migrate-dismiss:hover { color: #fff; }

.floating-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(20, 20, 20, 0.95);
    color: #ddd;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    animation: slideInUp 0.3s ease;
    max-width: 320px;
}

.floating-notice i { color: #3498db; }
.floating-notice a { color: var(--primary-color); text-decoration: none; }
.floating-notice a:hover { text-decoration: underline; }
.notice-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 0 0 5px;
}

.webtoon-chapters-section-title {
    font-size: 24px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.webtoon-volume { margin-bottom: 15px; }

.volume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 2px solid #fff;
}

.volume-title {
    font-size: 18px;
    margin: 0;
    padding-left: 10px;
}

.volume-toggle {
    cursor: pointer;
    font-size: 18px;
    color: #555;
    transition: transform 0.3s;
}

.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: max-height 0.3s ease-out;
}

.chapter-list.expanded {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
    margin-top: 16px;
}

.chapter-list.collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.chapter-item { transition: background-color 0.3s; }
.chapter-item:last-child { border-bottom: none; }

.chapter-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.chapter-list-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141414;
    margin-top: 5px;
    border-radius: 10px;
}

.chapter-thumbnail img {
    height: 80px;
    width: auto;
    border-radius: 10px;
}

.chapter-number-title { display: flex; align-items: center; }

.chapter-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px;
}

.chapter-left {
    display: flex;
    flex-grow: 1;
    padding: 10px;
    align-items: center;
}

.chapter-number {
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    color: #fff;
}

.chapter-title {
    display: inline-block;
    color: #fff;
}

.chapter-type {
    margin-top: 5px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

.chapter-date {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.chapter-icons { display: flex; align-items: center; }

.chapter-type-end .chapter-type   { color: #e74c3c; }
.chapter-type-side .chapter-type  { color: #3498db; }
.chapter-type-note .chapter-type  { color: #9b59b6; }
.chapter-type-extra .chapter-type { color: #2ecc71; }

.profit-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    vertical-align: middle;
    background-color: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
}

.profit-coins_lock { background-color: #f1c40f; color: white; }
.profit-coins_lock::before { content: "🔒"; font-size: 12px; }

.profit-ads_lock { background-color: #3498db; color: white; }
.profit-ads_lock::before { content: "📢"; font-size: 12px; }

.profit-sub_lock { background-color: #9b59b6; color: white; }
.profit-sub_lock::before { content: "⭐"; font-size: 12px; }

.read-marker {
    display: inline-block;
    width: 20px;
    height: 20px;
    color: white;
    text-align: center;
    line-height: 20px;
    margin-left: 5px;
    font-size: 12px;
}

.read-chapter { opacity: 0.8; }
.read-chapter .chapter-number,
.read-chapter .chapter-title { color: #777; }

.chapter-coins_lock { background-color: rgba(241, 196, 15, 0.05); }
.chapter-ads_lock   { background-color: rgba(52, 152, 219, 0.05); }
.chapter-sub_lock   { background-color: rgba(155, 89, 182, 0.05); }

.taxonomy-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.taxonomy-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 153, 148, 0.1), rgba(0, 0, 0, 0.3));
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.taxonomy-sort-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.taxonomy-sort-label {
    font-size: 13px;
    color: var(--text2);
    font-weight: 600;
    white-space: nowrap;
}

.taxonomy-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text2);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.taxonomy-sort-btn:hover {
    background: rgba(255, 153, 148, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.taxonomy-sort-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.taxonomy-title {
    font-size: 2rem;
    margin: 0 0 15px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.taxonomy-title i {
    background: none;
    -webkit-text-fill-color: var(--primary-color);
}

.taxonomy-count {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #ccc;
    font-size: 0.9rem;
}

.genre-description {
    margin-top: 15px;
    color: #aaa;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.webtoons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.webtoon-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.cover-wrapper {
    position: relative;
    width: 100%;
    padding-top: 140%;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cover-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cover-link:hover .cover-image { transform: scale(1.08); }

.cover-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2.5rem;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.status-ongoing   { background: var(--status-ongoing);   color: white; }
.status-completed { background: var(--status-completed); color: white; }
.status-upcoming  { background: var(--status-upcoming);  color: #333; }
.status-stopped   { background: var(--status-stopped);   color: white; }

.webtoon-title-card {
    margin: 0;
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
    color: #fff;
}

.webtoon-title-card a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.webtoon-title-card a:hover { color: var(--primary-color); }

.title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.chapters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item-tax {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #ccc;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-item-tax:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(-5px);
}

.chapter-item-tax.new-chapter {
    border-left: 4px solid var(--primary-color);
}

.icon-lock { margin-left: 8px; font-size: 0.7rem; color: #ff6b6b; }
.chapter-type-badge { font-size: 0.7rem; margin-right: 5px; color: var(--primary-color); }

.no-chapters {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.taxonomy-pagination {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-number:hover { background: var(--primary-color); transform: scale(1.05); }

.pagination-number.current {
    background: var(--primary-color);
    cursor: default;
    transform: none;
}

.pagination-dots {
    color: #666;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.pagination-info {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.no-results-container {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-top: 30px;
}

.no-results-icon { font-size: 4rem; color: #666; margin-bottom: 20px; display: block; }
.no-results { font-size: 1.2rem; color: #ccc; margin-bottom: 25px; }

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 87, 51, 0.3);
}

.search-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.input-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-box .search-icon {
    position: absolute;
    right: 15px;
    color: #888;
    pointer-events: none;
    display: flex;
}

#search-input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 0 45px 0 45px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

#search-input::placeholder { color: #888; font-weight: 500; }

.clear-input {
    position: absolute;
    left: 15px;
    color: #888;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: color 0.3s ease;
}

.clear-input:hover { color: var(--primary-color); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title svg { width: 22px; height: 22px; color: var(--primary-color); }

.search-action-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.3s ease;
}

.search-action-btn:hover { color: #ffffff; }

.recent-list {
    padding: 0 20px;
    margin-bottom: 35px;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recent-item:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.remove-item {
    color: #888;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.remove-item:hover { color: #ff5733; }

.cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 35px;
}

.cat-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.cat-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.trends-grid {
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.trend-card {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.trend-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.rank-num {
    font-size: 50px;
    font-weight: 800;
    width: 35px;
    text-align: center;
    color: #888;
    font-family: 'Arial Black', sans-serif;
    letter-spacing: -4px;
    background: linear-gradient(175deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rank-num.top-1,
.rank-num.top-2,
.rank-num.top-3 { -webkit-text-fill-color: var(--primary-color); }

.trend-img {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.trend-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.trend-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-type { font-size: 12px; color: #888; font-weight: 600; }
.trend-stat { font-size: 11px; color: var(--primary-color); font-weight: 600; }

#results-area { display: none; }

body.is-searching .default-view { display: none; }
body.is-searching #results-area { display: block; }

.search-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: #888;
    font-weight: 600;
    font-size: 14px;
}

.search-loader::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(-5px);
}

.result-img {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.result-title { font-weight: 700; font-size: 15px; line-height: 1.4; }
.match-badge  { font-size: 11px; color: var(--primary-color); font-weight: 600; }

.result-cat {
    font-size: 12px;
    color: #888;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: fit-content;
}

.search-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    font-weight: 600;
}

.suggest-box {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggest-item {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.suggest-item:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
}

@media (max-width: 900px) {
    .page-body {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }

    .page-sidebar {
        position: static;
    }

    .hs-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .ac-body {
        grid-template-columns: 1fr;
    }

    .ac-sidebar { position: static; }

    .ac-form-grid { grid-template-columns: 1fr; }

    .ac-sidenav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px;
    }

    .ac-navitem { flex: 1; justify-content: center; min-width: 120px; }

    .ac-avatar-upload-area { flex-direction: column; text-align: center; }
    .ac-avatar-upload-info { text-align: center; }
}

@media (max-width: 768px) {
    .desktop-header { height: 60px; }

    .modal-content { margin: 0 15px; max-width: none; }

    .header-menu .menu-items { gap: 10px; }

    .webtoon-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .webtoon-cover { width: 220px; height: 300px; }

    .cover-badges { top: -10px; left: -10px; right: -10px; }

    .cover-status-badge,
    .cover-year-badge { padding: 5px 12px; font-size: 0.75rem; }

    .webtoon-title { font-size: 1.8rem; }

    .webtoon-creators-info { grid-template-columns: 1fr; gap: 15px; }

    .action-buttons { justify-content: center; }

    .stars-container { gap: 8px; }
    .star-wrapper i { font-size: 24px; }

    .save-dropdown { left: 50%; transform: translateX(-50%); }

    .migrate-notice { bottom: 10px; right: 10px; left: 10px; max-width: 100%; width: auto; }

    .webtoons-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }

    .taxonomy-title { font-size: 1.5rem; }

    .pagination-wrapper { gap: 10px; }
    .pagination-btn { padding: 8px 15px; font-size: 0.85rem; }
    .pagination-number { min-width: 35px; height: 35px; font-size: 0.85rem; }

    .trends-grid { grid-template-columns: 1fr; }
    .trend-img { width: 50px; height: 70px; }

    .hs-items-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 600px) {
    .page-header-inner { padding: 0 12px; gap: 10px; }

    .page-back-btn span { display: none; }

    .bk-list-cover { width: 75px; }
    .bk-list-info { padding: 10px 12px 10px 8px; }
    .bk-list-title { font-size: 13px; }
    .bk-list-meta { gap: 8px; }
    .bk-list-meta-item { font-size: 10px; }
    .bk-list-status-badge { font-size: 9px; padding: 2px 6px; }

    .page-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 500px) {
    .page-body { padding: 16px; gap: 16px; }
    .ac-section-body { padding: 16px; }
    .ac-page-header-inner { padding: 0 14px; }
    .hs-stats-bar { grid-template-columns: 1fr 1fr; }

    .webtoons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 400px) {
    .bk-list-cover { width: 65px; }
    .bk-list-meta-item:not(.rating):not(.chapters) { display: none; }
}

.taxonomy-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.taxonomy-view-toggle {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tax-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text2);
    text-decoration: none;
    transition: all 0.2s;
}

.tax-view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,153,148,0.08);
}

.tax-view-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.cover-link:hover .card-hover-overlay { opacity: 1; }

.card-hover-play {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(255,153,148,0.4);
    transform: scale(0.8);
    transition: transform 0.25s;
}

.cover-link:hover .card-hover-play { transform: scale(1); }

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text3);
}

.card-meta-item.card-rating { color: #f59e0b; }
.card-meta-item.card-rating i { font-size: 10px; }

.new-badge {
    margin-right: auto;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.card-flag { font-size: 1em; margin-left: 3px; }

.tax-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
}

.list-card {
    display: grid;
    grid-template-columns: 90px 1fr auto auto;
    gap: 0;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.25s;
    animation: cardIn 0.3s ease both;
}

.list-card:hover {
    border-color: var(--border2);
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
    transform: translateX(-3px);
}

.list-card-cover-link { display: block; flex-shrink: 0; }

.list-card-cover {
    width: 90px;
    height: 100%;
    min-height: 110px;
    position: relative;
    background: var(--surface2);
    overflow: hidden;
}

.list-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.list-card:hover .list-card-cover img { transform: scale(1.06); }

.list-card-cover .status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    top: auto;
    font-size: 9px;
    padding: 2px 6px;
}

.list-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 1.8rem;
}

.list-card-info {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    min-width: 0;
}

.list-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.list-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.35;
}

.list-card-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.list-card-title a:hover { color: var(--primary-color); }

.list-card-type {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    background: rgba(255,153,148,0.1);
    color: var(--primary-color);
    border: 1px solid rgba(255,153,148,0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.list-card-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.list-genre-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text3);
    border: 1px solid var(--border);
}

.list-card-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.list-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text3);
}

.list-stat-rating { color: #f59e0b; }
.list-stat-rating i { font-size: 10px; }

.list-card-chapters {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px 14px;
    min-width: 160px;
    border-right: 1px solid var(--border);
}

.list-chapter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    transition: all 0.2s;
    white-space: nowrap;
}

.list-chapter-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateX(-2px);
}

.list-chapter-item.new-chapter { border-right: 3px solid var(--primary-color); }
.list-chapter-item:hover .new-badge { background: rgba(255,255,255,0.3); }

.list-chapter-num { font-weight: 700; }

.list-chapter-date {
    font-size: 10px;
    color: var(--text3);
    margin-right: auto;
}

.list-chapter-item:hover .list-chapter-date { color: rgba(255,255,255,0.7); }

.list-card-arrow {
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--text3);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    flex-shrink: 0;
}

.list-card:hover .list-card-arrow {
    color: var(--primary-color);
    transform: translateX(-3px);
}

@media (max-width: 900px) {
    .list-card {
        grid-template-columns: 80px 1fr auto;
    }
    .list-card-chapters { display: none; }
}

@media (max-width: 600px) {
    .list-card {
        grid-template-columns: 70px 1fr auto;
    }
    .list-card-info { padding: 10px 12px; }
    .list-card-title { font-size: 13px; }
    .list-card-stats { gap: 8px; }
    .list-stat { font-size: 11px; }
    .list-card-arrow { padding: 0 10px; font-size: 12px; }

    .card-hover-overlay { display: none; }
}

@media (max-width: 480px) {
    .taxonomy-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .taxonomy-sort-bar { justify-content: flex-start; }
    .taxonomy-view-toggle { justify-content: flex-end; }
}

.auth-root {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.auth-bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.auth-bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
    background-size: 40px 40px;
}

.auth-bg-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
    opacity: 0.12;
}
.auth-bg-glow--r {
    top: -100px;
    right: -100px;
    background: var(--primary-color);
}
.auth-bg-glow--l {
    bottom: -100px;
    left: -100px;
    background: var(--second-color);
}

.auth-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100vh;
}

.auth-side {
    background: linear-gradient(155deg, rgba(255,153,148,0.07) 0%, rgba(145,84,81,0.05) 100%);
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.auth-side-content {
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-side-logo a {
    display: block;
}

.auth-side-logo img {
    max-height: 48px;
    width: auto;
}

.auth-site-name {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-side-art {
    opacity: 0.85;
    animation: auth-float 5s ease-in-out infinite;
}

@keyframes auth-float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.auth-side-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}

.auth-side-sub {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.75;
    margin: 0;
}

.auth-side-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-side-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text2);
}

.auth-side-feature i {
    color: var(--primary-color);
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.auth-side-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: gap 0.2s;
}
.auth-side-link:hover { gap: 10px; }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    overflow-y: auto;
}

.auth-form-box {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-form-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-form-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(255,153,148,0.3);
}

.auth-form-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
    margin: 0;
}

.auth-form-sub {
    font-size: 13px;
    color: var(--text3);
    margin: 2px 0 0;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
}

.auth-alert svg { flex-shrink: 0; margin-top: 1px; }

.auth-alert--error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}
.auth-alert--success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
    color: #22c55e;
}
.auth-alert--warning {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    color: #f59e0b;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-field--full { grid-column: 1 / -1; }

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field:last-of-type { margin-bottom: 20px; }

.auth-form-grid .auth-field { margin-bottom: 0; }

.auth-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-required { color: var(--primary-color); font-size: 14px; }

.auth-forgot-link {
    font-size: 11px;
    color: var(--text3);
    text-decoration: none;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.2s;
}
.auth-forgot-link:hover { color: var(--primary-color); }

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    right: 14px;
    pointer-events: none;
    stroke: var(--text3);
    flex-shrink: 0;
}

.auth-input {
    width: 100%;
    padding: 11px 42px 11px 42px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    direction: rtl;
}

.auth-input-wrap:not(:has(.auth-eye-btn)):not(:has(.auth-input-status)) .auth-input {
    padding-left: 14px;
}

.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255,153,148,0.12);
}

.auth-input.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.auth-input::placeholder { color: var(--text3); }

.auth-eye-btn {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s;
}
.auth-eye-btn:hover { color: var(--text); }

.auth-input-status {
    position: absolute;
    left: 14px;
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

.auth-field-hint {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.5;
}

.auth-field-error {
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
    min-height: 14px;
}

.auth-strength-bar {
    height: 4px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 2px;
}

.auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.35s ease, background 0.35s ease;
}

.auth-strength-label {
    font-size: 11px;
    font-weight: 700;
    transition: color 0.3s;
}

.auth-remember-row {
    margin-bottom: 20px;
}

.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text2);
    user-select: none;
}

.auth-checkbox { display: none; }

.auth-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border2);
    border-radius: 5px;
    background: var(--surface2);
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.auth-checkbox:checked + .auth-checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-checkbox:checked + .auth-checkbox-custom::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='2 6 5 9 10 3'/%3E%3C/svg%3E") center/contain no-repeat;
}

.auth-submit-btn {
    width: 100%;
    padding: 13px 20px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255,153,148,0.3);
    transition: all 0.25s;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255,153,148,0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-spinner {
    display: inline-flex;
    align-items: center;
}

.auth-spin {
    animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--text3);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-alt-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid var(--border2);
    background: var(--surface2);
    color: var(--text2);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-alt-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,153,148,0.06);
}

.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text3);
    text-decoration: none;
    margin-top: 20px;
    align-self: center;
    transition: color 0.2s;
}
.auth-back-home:hover { color: var(--text2); }

@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }

    .auth-side {
        display: none; 
    }

    .auth-form-side {
        padding: 40px 20px;
        min-height: 100vh;
    }

    .auth-form-box { max-width: 460px; }
}

@media (max-width: 500px) {
    .auth-form-grid { grid-template-columns: 1fr; }
    .auth-field--full { grid-column: auto; }

    .auth-form-side { padding: 32px 16px; }

    .auth-submit-btn { font-size: 14px; padding: 12px; }
}

.auth-page-root {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    padding: 20px 16px;
}

.auth-bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.6;
}

.auth-bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 100%);
}

.auth-center {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    animation: auth-fade-up 0.45s ease both;
}

.auth-card-register { max-width: 500px; }
.auth-center:has(.auth-card-register) { max-width: 500px; }

@keyframes auth-fade-up {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-logo-wrap {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo-wrap img {
    max-height: 48px;
    width: auto;
}

.auth-site-name {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.auth-head-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(255, 153, 148, 0.35);
}

.auth-head-icon--register {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.auth-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text);
    margin: 0 0 2px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text2);
    margin: 0;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 18px;
}

.auth-alert svg { flex-shrink: 0; }

.auth-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-required {
    color: var(--primary-color);
    font-size: 14px;
    margin-right: 2px;
}

.auth-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    right: 14px;
    pointer-events: none;
    stroke: var(--text3);
    flex-shrink: 0;
}

.auth-input {
    width: 100%;
    padding: 12px 42px 12px 44px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    direction: rtl;
}

.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 148, 0.14);
}

.auth-input::placeholder { color: var(--text3); }

.auth-eye-btn {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s;
}

.auth-eye-btn:hover { color: var(--text); }

.auth-field-status {
    position: absolute;
    left: 40px;
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
}

.auth-field-hint {
    font-size: 11px;
    color: var(--text3);
    line-height: 1.5;
}

.auth-field-error {
    font-size: 11px;
    color: #f87171;
    font-weight: 600;
    min-height: 14px;
}

.auth-strength-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.auth-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border2);
    border-radius: 4px;
    overflow: hidden;
}

.auth-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.35s ease, background 0.35s ease;
    width: 0%;
}

.auth-strength-label {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text2);
    font-weight: 600;
    user-select: none;
}

.auth-check-label:hover { color: var(--text); }

.auth-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-check-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border2);
    background: var(--surface2);
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: all 0.2s;
}

.auth-check-input:checked + .auth-check-box {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-check-input:checked + .auth-check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.auth-forgot {
    font-size: 11px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}
.auth-forgot:hover { opacity: 0.75; }

.auth-terms-label {
    align-items: flex-start;
    line-height: 1.6;
}
.auth-terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.auth-terms-link:hover { text-decoration: underline; }

.auth-submit-btn {
    width: 100%;
    padding: 13px 20px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--second-color));
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(255, 153, 148, 0.35);
    transition: all 0.25s;
    margin-top: 4px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255, 153, 148, 0.45);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}


.auth-btn-icon { flex-shrink: 0; }

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text3);
    font-size: 12px;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text2);
    margin: 0 0 14px;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}
.auth-switch a:hover { opacity: 0.75; }

.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text3);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-back-link:hover { color: var(--text2); }

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 18px;
        border-radius: 16px;
    }
    .auth-title  { font-size: 1.2rem; }
    .auth-head-icon { width: 40px; height: 40px; border-radius: 12px; }
    .auth-input  { font-size: 15px; padding: 13px 42px 13px 44px; }
    .auth-submit-btn { font-size: 14px; padding: 13px 16px; }
}

.ch-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ch-topbar-left {
    display: flex;
    align-items: center;
}
.ch-topbar-right {
    display: flex;
    align-items: center;
}
.ch-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 30px;
    transition: all 0.2s;
}
.ch-back-btn:active { background: var(--primary-color, #ff9994); color: #000; }
.ch-back-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }


.ch-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 6px 12px;
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.ch-report-btn:active {
    background: #ef4444;
    color: #fff;
}

.ch-report-top-btn svg {
    stroke: currentColor;
}

.ch-bar-group.ch-bar-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ch-nav-arrow {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ch-nav-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.ch-nav-arrow:active:not(:disabled) { background: rgba(255,255,255,0.2); }


.ch-nav-text {
    display: none;
}
@media (min-width: 480px) {
    .ch-nav-text { display: inline-block; }
}

.ch-progress-container {
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255,255,255,0.15);
    z-index: 501;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}
.ch-progress-container.ch-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.ch-progress-bar {
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--primary-color, #ff9994) 0%, rgba(255,255,255,0.2) 0%);
    outline: none;
    cursor: pointer;
}
.ch-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color, #ff9994);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.ch-modal-small .ch-modal-sheet--small {
    max-width: 320px;
    border-radius: 28px;
}
.ch-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.ch-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
}
.ch-btn-secondary:active {
    background: rgba(255, 255, 255, 0.2);
}

.ch-setting-subgroup {
    margin-top: 8px;
    padding-right: 16px;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    display: none;
}
.ch-setting-subgroup .ch-setting-item {
    border-bottom: none;
    padding: 8px 0;
}

.ch-topbar.ch-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.ch-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 30px;
    transition: all 0.2s;
}
.ch-back-btn:active { background: var(--primary-color, #ff9994); color: #000; }
.ch-back-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

.ch-reader-container {
    position: fixed;
    inset: 0;
    background: #0d0d0d;
    overflow: hidden;
}
.ch-scroll-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    cursor: grab;
    scrollbar-width: thin;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}
.ch-scroll-wrapper:active { cursor: grabbing; }
.ch-scroll-wrapper::-webkit-scrollbar { width: 6px; }
.ch-scroll-wrapper::-webkit-scrollbar-track { background: #1a1a1a; }
.ch-scroll-wrapper::-webkit-scrollbar-thumb { background: var(--primary-color, #ff9994); border-radius: 10px; }

.ch-pages-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.ch-page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
}
.ch-page img {
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    user-select: none;
    pointer-events: none;
    transition: filter 0.2s ease;
}

.ch-progress-container {
    position: fixed;
    bottom: 75px;
    left: 0;
    right: 0;
    height: 6px;
    background: #ff99942b;
    z-index: 501;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}
.ch-progress-container.ch-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.ch-progress-bar {
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--primary-color, #ff9994) 0%, #ff99942b 0%);
    outline: none;
    cursor: pointer;
}
.ch-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color, #ff9994);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ch-progress-bar::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color, #ff9994);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.ch-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 500;
    transition: transform 0.3s ease, opacity 0.3s ease;
    min-height: 64px;
}
.ch-bottombar.ch-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.ch-bar-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ch-icon-btn, .ch-nav-arrow, .ch-chapters-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ch-chapters-btn { background: var(--primary-color, #ff9994); color: #000; }
.ch-nav-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.ch-icon-btn:active, .ch-nav-arrow:active:not(:disabled) { background: rgba(255,255,255,0.2); }
.ch-btn-label { display: none; }
@media (min-width: 640px) { .ch-btn-label { display: inline-block; } }
.ch-nav-text { display: none; }
@media (min-width: 480px) { .ch-nav-text { display: inline-block; } }

.ch-autoscroll-bar {
    position: fixed;
    top: 70px;
    right: 16px;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(16px);
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 600;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.ch-as-group { display: flex; align-items: center; gap: 4px; }
.ch-as-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: background 0.2s;
}
.ch-as-btn:hover { background: rgba(255,255,255,0.2); }
.ch-as-speed-slider { width: 100px; -webkit-appearance: none; background: rgba(255,255,255,0.2); height: 4px; border-radius: 4px; }
.ch-as-speed-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--primary-color, #ff9994); border-radius: 50%; cursor: pointer; }
.ch-as-speed-val { font-size: 11px; font-weight: bold; color: #fff; min-width: 45px; text-align: center; }

.ch-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.ch-modal.is-open { pointer-events: all; }
.ch-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ch-modal.is-open .ch-modal-backdrop { opacity: 1; }
.ch-modal-sheet {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: #161920;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ch-modal.is-open .ch-modal-sheet { transform: translateY(0); }
.ch-modal-sheet--tall { max-height: 90vh; }
.ch-modal-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin: 10px auto 0;
}
.ch-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ch-modal-title { font-size: 18px; font-weight: 800; color: #fff; margin: 0; }
.ch-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.ch-modal-body { padding: 16px 20px 24px; overflow-y: auto; flex: 1; }

.ch-chapters-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-chapter-item {
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.ch-chapter-item.is-current { border-color: var(--primary-color, #ff9994); background: rgba(255,153,148,0.1); }
.ch-chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
}
.ch-current-badge { font-size: 10px; background: var(--primary-color, #ff9994); color: #000; padding: 2px 8px; border-radius: 20px; }

.ch-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ch-setting-info { flex: 1; }
.ch-setting-label { font-weight: 700; display: block; margin-bottom: 4px; color: #fff; }
.ch-setting-desc { font-size: 11px; color: rgba(255,255,255,0.5); display: block; }
.ch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.ch-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.ch-toggle-track {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255,255,255,0.2);
    border-radius: 26px;
    transition: 0.3s;
}
.ch-toggle-track:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.ch-toggle input:checked + .ch-toggle-track { background: var(--primary-color, #ff9994); }
.ch-toggle input:checked + .ch-toggle-track:before { transform: translateX(22px); }
.ch-sub-control {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}
.ch-slider { flex: 1; height: 4px; -webkit-appearance: none; background: rgba(255,255,255,0.2); border-radius: 4px; }
.ch-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: var(--primary-color, #ff9994); border-radius: 50%; cursor: pointer; }
.ch-slider-val { font-size: 12px; font-weight: 600; min-width: 45px; color: #fff; text-align: center; }
.ch-setting-subgroup { margin-top: 8px; padding-right: 16px; border-right: 2px solid rgba(255,255,255,0.1); }

.ch-eye-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    mix-blend-mode: multiply;
    transition: background-color 0.2s ease;
}

.ch-locked-overlay {
    position: fixed;
    inset: 0;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.ch-locked-card {
    text-align: center;
    background: #1a1a1a;
    padding: 32px 24px;
    border-radius: 24px;
    max-width: 300px;
    width: 80%;
}
.ch-locked-card .ch-lock-icon { font-size: 48px; color: #f59e0b; margin-bottom: 20px; display: block; }
.ch-locked-card p { color: #fff; margin-bottom: 24px; }
.ch-btn-primary { background: var(--primary-color, #ff9994); border: none; padding: 10px 24px; border-radius: 30px; color: #000; font-weight: bold; cursor: pointer; text-decoration: none; display: inline-block; }

.ch-comments-container { direction: rtl; }
.ch-comments-container .comment-list { list-style: none; padding: 0; margin: 0; }
.ch-comments-container .comment-body {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}
.ch-empty-state { text-align: center; color: rgba(255,255,255,0.4); padding: 40px 20px; }

@media (max-width: 640px) {
    .ch-chapters-btn span { display: none; }
    .ch-chapters-btn { padding: 8px 12px; }
    .ch-icon-btn { padding: 8px 12px; }
    .ch-autoscroll-bar { top: 60px; right: 8px; padding: 6px 12px; gap: 8px; }
    .ch-as-speed-slider { width: 70px; }
    .ch-bar-group { gap: 6px; }
}

.rpt-modal { display:none; position:fixed; inset:0; z-index:9999; direction:rtl; }
.rpt-modal.is-open { display:flex; align-items:flex-end; justify-content:center; }
.rpt-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.72); backdrop-filter:blur(4px); animation:rpt-fade-in 0.25s ease; }
.rpt-modal-sheet { position:relative; z-index:1; width:100%; max-width:560px; max-height:90dvh; background:var(--surface,#111318); border-radius:20px 20px 0 0; overflow:hidden; display:flex; flex-direction:column; transform:translateY(100%); transition:transform 0.3s cubic-bezier(0.34,1.26,0.64,1); }
.rpt-modal-sheet.slide-in { transform:translateY(0); }
.rpt-modal-handle { width:40px; height:4px; background:rgba(255,255,255,0.15); border-radius:4px; margin:12px auto 0; flex-shrink:0; }
.rpt-modal-header { display:flex; align-items:center; gap:8px; padding:14px 20px 10px; flex-shrink:0; border-bottom:1px solid var(--border,rgba(255,255,255,0.07)); }
.rpt-modal-title { flex:1; font-size:17px; font-weight:700; color:var(--text,#e8eaf0); margin:0; text-align:center; }
.rpt-modal-back, .rpt-modal-close { background:rgba(255,255,255,0.07); border:none; border-radius:50%; width:34px; height:34px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text,#e8eaf0); transition:background 0.2s,transform 0.15s; flex-shrink:0; }
.rpt-modal-back:hover, .rpt-modal-close:hover { background:rgba(255,255,255,0.14); transform:scale(1.08); }
.rpt-modal-back svg { transform:scaleX(-1); }
.rpt-steps-bar { display:flex; align-items:center; justify-content:center; padding:12px 0 8px; flex-shrink:0; }
.rpt-step-dot { width:10px; height:10px; border-radius:50%; background:rgba(255,255,255,0.15); transition:background 0.25s,transform 0.25s; }
.rpt-step-dot.active { background:var(--primary-color,#ff9994); transform:scale(1.35); }
.rpt-step-dot.completed { background:var(--second-color,#915451); }
.rpt-step-line { width:32px; height:2px; background:rgba(255,255,255,0.1); border-radius:2px; }
.rpt-modal-body { overflow-y:auto; padding:16px 20px 28px; flex:1; -webkit-overflow-scrolling:touch; }
.rpt-modal-body::-webkit-scrollbar { width:4px; }
.rpt-modal-body::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:4px; }
.rpt-type-list { display:flex; flex-direction:column; gap:10px; }
.rpt-type-btn { display:flex; align-items:center; gap:12px; width:100%; background:var(--surface2,#181b22); border:1.5px solid var(--border,rgba(255,255,255,0.07)); border-radius:var(--radius,14px); padding:14px 16px; cursor:pointer; transition:border-color 0.2s,background 0.2s,transform 0.15s; color:var(--text,#e8eaf0); text-align:right; }
.rpt-type-btn:hover { border-color:var(--primary-color,#ff9994); background:rgba(255,153,148,0.07); transform:translateX(-3px); }
.rpt-type-btn.selected { border-color:var(--primary-color,#ff9994); background:rgba(255,153,148,0.12); }
.rpt-type-icon { font-size:22px; line-height:1; flex-shrink:0; }
.rpt-type-text { flex:1; font-size:15px; font-weight:600; }
.rpt-type-arrow { color:var(--text2,#8a90a0); flex-shrink:0; transform:rotate(180deg); }
.rpt-sub-list { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.rpt-sub-btn { display:flex; align-items:center; gap:10px; width:100%; background:transparent; border:1.5px solid var(--border2,rgba(255,255,255,0.13)); border-radius:10px; padding:11px 14px; cursor:pointer; color:var(--text,#e8eaf0); font-size:14px; text-align:right; transition:border-color 0.2s,background 0.2s; }
.rpt-sub-btn:hover { border-color:var(--primary-color,#ff9994); background:rgba(255,153,148,0.05); }
.rpt-sub-btn.selected { border-color:var(--primary-color,#ff9994); background:rgba(255,153,148,0.12); color:var(--primary-color,#ff9994); }
.rpt-sub-check { width:20px; height:20px; border-radius:50%; border:1.5px solid currentColor; display:flex; align-items:center; justify-content:center; flex-shrink:0; opacity:0.35; transition:opacity 0.2s; }
.rpt-sub-btn.selected .rpt-sub-check { opacity:1; background:var(--primary-color,#ff9994); border-color:var(--primary-color,#ff9994); color:#fff; }
.rpt-extra-section { margin-bottom:14px; }
.rpt-extra-label { display:block; font-size:13px; font-weight:600; color:var(--text2,#8a90a0); margin-bottom:6px; }
.rpt-optional { font-weight:400; opacity:0.6; }
.rpt-extra-textarea { width:100%; background:var(--surface2,#181b22); border:1.5px solid var(--border2,rgba(255,255,255,0.13)); border-radius:10px; color:var(--text,#e8eaf0); padding:10px 12px; font-size:14px; resize:vertical; min-height:80px; direction:rtl; font-family:inherit; transition:border-color 0.2s; box-sizing:border-box; }
.rpt-extra-textarea:focus { outline:none; border-color:var(--primary-color,#ff9994); }
.rpt-char-count { text-align:left; font-size:11px; color:var(--text3,#555c70); margin-top:4px; }
.rpt-note-box { display:flex; align-items:flex-start; gap:8px; background:rgba(255,153,148,0.08); border:1px solid rgba(255,153,148,0.2); border-radius:10px; padding:10px 12px; font-size:13px; color:var(--text2,#8a90a0); margin-bottom:16px; line-height:1.5; }
.rpt-note-icon { flex-shrink:0; font-size:15px; }
.rpt-review-card { background:var(--surface2,#181b22); border-radius:var(--radius,14px); padding:16px; margin-bottom:16px; border:1px solid var(--border,rgba(255,255,255,0.07)); }
.rpt-review-row { display:flex; justify-content:space-between; align-items:flex-start; padding:8px 0; border-bottom:1px solid var(--border,rgba(255,255,255,0.07)); gap:12px; }
.rpt-review-row:last-child { border-bottom:none; }
.rpt-review-key { font-size:13px; color:var(--text2,#8a90a0); flex-shrink:0; min-width:100px; }
.rpt-review-val { font-size:14px; color:var(--text,#e8eaf0); text-align:left; word-break:break-word; }
.rpt-review-extra .rpt-review-val { font-size:13px; color:var(--text2,#8a90a0); font-style:italic; }
.rpt-confirm-label { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text2,#8a90a0); cursor:pointer; margin-bottom:18px; user-select:none; }
.rpt-confirm-cb { width:18px; height:18px; accent-color:var(--primary-color,#ff9994); cursor:pointer; flex-shrink:0; }
.rpt-review-actions { display:flex; gap:10px; }
.rpt-btn-primary { flex:1; display:flex; align-items:center; justify-content:center; gap:8px; background:var(--primary-color,#ff9994); color:#fff; border:none; border-radius:10px; padding:13px 18px; font-size:15px; font-weight:700; cursor:pointer; transition:opacity 0.2s,transform 0.15s; font-family:inherit; }
.rpt-btn-primary:hover:not(:disabled) { opacity:0.88; transform:translateY(-1px); }
.rpt-btn-primary:disabled { opacity:0.4; cursor:not-allowed; }
.rpt-btn-secondary { flex:0 0 auto; display:flex; align-items:center; gap:7px; background:var(--surface2,#181b22); color:var(--text,#e8eaf0); border:1.5px solid var(--border2,rgba(255,255,255,0.13)); border-radius:10px; padding:13px 18px; font-size:14px; cursor:pointer; transition:border-color 0.2s; font-family:inherit; }
.rpt-btn-secondary:hover { border-color:var(--primary-color,#ff9994); }
.rpt-next-btn { width:100%; margin-top:4px; }
.rpt-submit-msg { margin-top:12px; border-radius:8px; padding:10px 14px; font-size:13px; text-align:center; }
.rpt-msg-error { background:rgba(220,53,69,0.12); color:#ff6b7a; border:1px solid rgba(220,53,69,0.2); }
.rpt-success-screen { text-align:center; padding:20px 0 10px; }
.rpt-success-icon { width:80px; height:80px; border-radius:50%; background:rgba(40,167,69,0.15); border:2px solid rgba(40,167,69,0.3); display:flex; align-items:center; justify-content:center; margin:0 auto 16px; color:#28a745; animation:rpt-pop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.rpt-success-title { font-size:20px; font-weight:700; color:var(--text,#e8eaf0); margin:0 0 8px; }
.rpt-success-sub { font-size:14px; color:var(--text2,#8a90a0); margin:0; }
@keyframes rpt-fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes rpt-pop { from { transform:scale(0.5); opacity:0; } to { transform:scale(1); opacity:1; } }
@media (min-width:560px) { .rpt-modal.is-open { align-items:center; } .rpt-modal-sheet { border-radius:20px; max-height:85vh; } }
@media (max-width:400px) { .rpt-modal-body { padding:12px 14px 24px; } .rpt-type-btn { padding:12px; } }





/* */