@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --color-bg: #f6f8ff;
    --color-bg-accent: #fdf5dd;
    --color-surface: #ffffff;
    --color-surface-soft: rgba(255, 255, 255, 0.88);
    --color-sidebar: #0e1734;
    --color-sidebar-accent: #162347;
    --color-sidebar-text: #eef2ff;
    --color-sidebar-muted: #a3acd3;
    --color-primary: #3f8cff;
    --color-primary-dark: #2f6fdd;
    --color-primary-soft: rgba(63, 140, 255, 0.16);
    --color-gold: #f6c343;
    --color-gold-soft: rgba(246, 195, 67, 0.18);
    --color-secondary: #1b2449;
    --color-muted: #6d7697;
    --color-border: #d5dae6;
    --color-border-strong: #b9c0d4;
    --stroke-color: #d0d5e4;
    --color-danger: #e9637b;
    --color-success: #32c693;
    --color-info: #47b5ff;
    --shadow-soft: 0 8px 22px -18px rgba(12, 23, 58, 0.22);
    --shadow-card: 0 6px 18px -14px rgba(12, 27, 68, 0.2);
    --shadow-focus: 0 0 0 3px rgba(63, 140, 255, 0.16);
    --radius-xl: 1rem;
    --radius-lg: 0.75rem;
    --radius-md: 0.5rem;
    --radius-sm: 0.35rem;
    --space-2xs: 0.4rem;
    --space-xs: 0.6rem;
    --space-sm: 0.9rem;
    --space-md: 1.3rem;
    --space-lg: 2.1rem;
    --space-xl: 3.4rem;
    --gradient-primary: linear-gradient(130deg, #6aa6ff 0%, #f6c343 52%, #ffe28a 100%);
    --gradient-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 249, 255, 0.9) 100%);
    --gradient-sidebar: radial-gradient(circle at top left, rgba(111, 183, 255, 0.28), transparent 55%), radial-gradient(circle at bottom right, rgba(246, 195, 67, 0.35), transparent 55%), #0e1734;
    font-family: "Poppins", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.admin-shell {
    margin: 0;
    background: radial-gradient(circle at 12% 20%, var(--color-bg-accent) 0%, rgba(253, 245, 221, 0) 55%), radial-gradient(circle at 85% 10%, rgba(110, 176, 255, 0.16) 0%, rgba(110, 176, 255, 0) 55%), var(--color-bg);
    color: var(--color-secondary);
    font-family: "Poppins", "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 268px;
    background: var(--gradient-sidebar);
    color: var(--color-sidebar-text);
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px -24px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(6px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.brand-role {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-sidebar-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-label {
    margin-top: var(--space-sm);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-sidebar-muted);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.72rem 0.9rem;
    border-radius: var(--radius-md);
    color: inherit;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}

.nav-link.active {
    background: linear-gradient(145deg, rgba(106, 166, 255, 0.92), rgba(246, 195, 67, 0.92));
    color: #ffffff;
    box-shadow: none;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.nav-link.active .nav-icon {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.nav-icon img {
    display: block;
    width: 1rem;
    height: 1rem;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--stroke-color);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 16px -14px rgba(12, 27, 68, 0.18);
}

.page-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-subtitle {
    margin: 0.3rem 0 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
}

.user-email {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.main-body {
    padding: var(--space-xl);
    flex: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.45) 14%, rgba(246, 248, 255, 0.65) 60%, rgba(246, 248, 255, 0) 100%);
}

.main-footer {
    padding: var(--space-md) var(--space-xl);
    font-size: 0.85rem;
    color: var(--color-muted);
    background: var(--gradient-surface);
    border-top: 1px solid var(--stroke-color);
    box-shadow: 0 -6px 16px -14px rgba(12, 27, 68, 0.16);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.72rem 1.45rem;
    font-size: 0.94rem;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 6px 16px -12px rgba(32, 73, 140, 0.28);
}

.btn-secondary {
    background: linear-gradient(145deg, rgba(30, 44, 92, 0.95), rgba(65, 80, 135, 0.95));
    color: #f5f7ff;
    box-shadow: 0 6px 16px -12px rgba(15, 26, 63, 0.28);
}

.btn-outline-secondary {
    background: rgba(24, 36, 76, 0.04);
    border: 1px solid var(--stroke-color);
    color: var(--color-secondary);
    border-radius: var(--radius-xl);
}

.btn-outline-secondary:hover {
    background: rgba(24, 36, 76, 0.12);
    box-shadow: 0 4px 12px -10px rgba(15, 26, 63, 0.18);
}

.btn-outline-primary {
    background: rgba(106, 166, 255, 0.12);
    border: 1px solid var(--stroke-color);
    color: var(--color-primary-dark);
    border-radius: var(--radius-xl);
}

.btn-outline-primary:hover {
    background: rgba(106, 166, 255, 0.22);
    box-shadow: 0 4px 12px -10px rgba(106, 166, 255, 0.24);
}

.btn-outline-danger {
    background: rgba(233, 99, 123, 0.12);
    border: 1px solid var(--stroke-color);
    color: #c04560;
    border-radius: var(--radius-xl);
}

.btn-outline-danger:hover {
    background: rgba(233, 99, 123, 0.2);
    box-shadow: 0 4px 12px -10px rgba(233, 99, 123, 0.22);
}

.btn-sm {
    padding: 0.48rem 1rem;
    font-size: 0.82rem;
}

.btn-full {
    width: 100%;
}

.flash-messages {
    margin-bottom: var(--space-md);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #047857;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

.grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.g-3 {
    gap: 1.5rem;
}

.g-4 {
    gap: 2rem;
}

.col,
.col-md-3,
.col-md-4,
.col-md-6,
.col-lg-4,
.col-lg-6,
.col-lg-8,
.col-xl-4,
.col-xl-8 {
    flex: 1 1 240px;
}

.col-md-3 {
    flex-basis: calc(25% - var(--space-md));
}

.col-md-4,
.col-lg-4,
.col-xl-4 {
    flex-basis: calc(33.333% - var(--space-md));
}

.col-md-6,
.col-lg-6 {
    flex-basis: calc(50% - var(--space-md));
}

.col-lg-8,
.col-xl-8 {
    flex-basis: calc(66.667% - var(--space-md));
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 252, 255, 0.94));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card); /* Already using a variable, which will be updated */
    border: 1px solid var(--stroke-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.panel.shadow-sm {
    box-shadow: var(--shadow-soft); /* Already using a variable, which will be updated */
}

.panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--stroke-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, rgba(106, 166, 255, 0.08), rgba(246, 195, 67, 0.05));
}

.panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
}

.panel-body {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.96);
}

body.reader-dashboard .panel {
    border: none;
}

body.reader-dashboard .panel-header {
    border-bottom: none;
}

.sticky-panel {
    position: sticky;
    top: 120px;
}

.info-card {
    background: linear-gradient(140deg, rgba(106, 166, 255, 0.16), rgba(255, 230, 138, 0.18)), var(--gradient-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-card); /* Already using a variable, which will be updated */
    border: 1px solid var(--stroke-color);
}

.info-card .icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(246, 195, 67, 0.22);
    color: #b07d16;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.info-card .label {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.2rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--stroke-color);
}

.table thead {
    background: linear-gradient(135deg, rgba(106, 166, 255, 0.16), rgba(246, 195, 67, 0.16));
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--stroke-color);
}

.table tbody tr:hover {
    background: rgba(246, 195, 67, 0.14);
}

.badge {
    display: inline-block;
    border-radius: var(--radius-md);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.badge-soft {
    background: rgba(246, 195, 67, 0.2);
    color: #b27a14;
}

form {
    margin: 0;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: var(--space-md);
}

.form-field span {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea,
.form-field select,
.form-control,
.form-select {
    width: 100%;
    border: 1px solid rgba(24, 36, 76, 0.18);
    border-radius: var(--radius-md);
    padding: 0.78rem 1.05rem;
    font-size: 0.95rem;
    font-family: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 255, 0.9));
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(106, 166, 255, 0.6);
    box-shadow: var(--shadow-focus);
}

.field-hint {
    font-size: 0.75rem;
    color: rgba(27, 36, 73, 0.55);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: -0.4rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
}

.table-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    gap: 0.65rem;
}

.search-form input {
    flex: 1;
}

.list-group {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-color);
    padding: 0.9rem 1.1rem;
    transition: background 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
    position: relative;
}

.list-group-item.active {
    background: linear-gradient(135deg, rgba(106, 166, 255, 0.22), rgba(246, 195, 67, 0.22));
    border-color: var(--stroke-color);
    box-shadow: none;
    color: var(--color-secondary);
}

.list-group-item:hover {
    background: rgba(106, 166, 255, 0.08);
}

.mini-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-color);
    padding: var(--space-md);
    background: linear-gradient(145deg, rgba(106, 166, 255, 0.12), rgba(246, 195, 67, 0.1));
    box-shadow: 0 6px 16px -12px rgba(17, 30, 63, 0.18);
}

.mini-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-muted);
}

.mini-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.stat-pill {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(106, 166, 255, 0.18), rgba(246, 195, 67, 0.24));
    color: #213167;
    display: inline-flex;
    flex-direction: column;
    min-width: 190px;
}

.stat-pill .label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top right, rgba(106, 166, 255, 0.24), transparent 55%), radial-gradient(circle at bottom left, rgba(246, 195, 67, 0.32), transparent 50%), #0f142e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    color: #fff;
}

.auth-container {
    max-width: 420px;
    width: 100%;
}

.auth-card {
    background: rgba(17, 24, 39, 0.78);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 22px 55px -36px rgba(8, 12, 28, 0.45);
    backdrop-filter: blur(14px);
}

.auth-header {
    text-align: center;
    display: grid;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.auth-header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.auth-header p {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.95rem;
}

.auth-form {
    display: grid;
    gap: var(--space-md);
}

.auth-form input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #fff;
}

.auth-form input:focus {
    border-color: rgba(246, 195, 67, 0.9);
    box-shadow: 0 0 0 2px rgba(246, 195, 67, 0.14);
}

.auth-footer-note {
    margin: var(--space-lg) 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.75);
}

.alert .btn-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-muted);
}

.fw-semibold {
    font-weight: 600;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.small {
    font-size: 0.85rem;
}

.shadow-sm {
    box-shadow: var(--shadow-soft); /* Already using a variable, which will be updated */
}

.bg-light {
    background: var(--color-bg);
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.table.align-middle td,
.table.align-middle th {
    vertical-align: middle;
}

.list-group-item small {
    color: var(--color-muted);
}

.badge-status {
    background: linear-gradient(135deg, rgba(106, 166, 255, 0.18), rgba(246, 195, 67, 0.26));
    color: #1f2f67;
}

.rating-star {
    color: #f59e0b;
    margin-right: 0.25rem;
    font-size: 0.9rem;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.profile-meta {
    display: grid;
    gap: 0.5rem;
}

.profile-meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.profile-meta__label {
    color: var(--color-muted);
}

.wallet-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wallet-balance__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-secondary);
}

.wallet-balance__label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.wallet-balance__updated {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.wallet-topup-options .btn {
    min-width: 108px;
}

.wallet-topup-options .btn.is-active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.wallet-topup-form .input-group {
    display: flex;
    align-items: stretch;
}

.wallet-topup-form .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.wallet-topup-form .input-group-text {
    padding: 0 0.75rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-left: 0;
    background: var(--color-bg);
    font-size: 0.85rem;
    color: var(--color-muted);
}

.wallet-topup-form .input-group .input-group-text {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.wallet-history {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wallet-history__item + .wallet-history__item {
    margin-top: 0.5rem;
}

@media (max-width: 980px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md) var(--space-lg);
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .nav-label {
        width: 100%;
        text-align: center;
    }

    .sidebar .nav-link {
        padding: 0.5rem 0.75rem;
    }

    .main-header,
    .main-body,
    .main-footer {
        padding: var(--space-lg);
    }

    .sticky-panel {
        position: static;
    }

    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-lg-4,
    .col-lg-6,
    .col-lg-8,
    .col-xl-4,
    .col-xl-8 {
        flex-basis: 100%;
    }
}

/* Reader Dark Mode */
body.reader-read-mode.reader-dark-mode {
    --color-bg: #1a1a1a;
    --color-bg-accent: #2a2a2a;
    --color-surface: #222222;
    --color-surface-soft: rgba(34, 34, 34, 0.88);
    --color-sidebar: #1a1a1a;
    --color-sidebar-accent: #2a2a2a;
    --color-sidebar-text: #eef2ff;
    --color-sidebar-muted: #a3acd3;
    --color-primary: #3f8cff;
    --color-primary-dark: #2f6fdd;
    --color-primary-soft: rgba(63, 140, 255, 0.16);
    --color-gold: #f6c343;
    --color-gold-soft: rgba(246, 195, 67, 0.18);
    --color-secondary: #e0e0e0;
    --color-muted: #999999;
    --color-border: #333333;
    --color-border-strong: #555555;
    --stroke-color: #444444;
    --color-danger: #e9637b;
    --color-success: #32c693;
    --color-info: #47b5ff;
    --shadow-soft: 0 8px 22px -18px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 6px 18px -14px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(130deg, #6aa6ff 0%, #f6c343 52%, #ffe28a 100%);
    --gradient-surface: linear-gradient(160deg, rgba(34, 34, 34, 0.95) 0%, rgba(40, 40, 40, 0.9) 100%);
    --gradient-sidebar: radial-gradient(circle at top left, rgba(111, 183, 255, 0.1), transparent 55%), radial-gradient(circle at bottom right, rgba(246, 195, 67, 0.15), transparent 55%), #1a1a1a;
}

body.reader-read-mode.reader-dark-mode .reader-app__content {
    background: var(--color-bg);
    color: var(--color-secondary);
}

body.reader-read-mode.reader-dark-mode .reader-app__sidebar {
    background: var(--color-sidebar);
    border-right-color: var(--color-border);
}

body.reader-read-mode.reader-dark-mode .reader-chapter-link {
    background: var(--color-sidebar-accent);
    border-color: var(--color-border);
    color: var(--color-sidebar-text);
}

body.reader-read-mode.reader-dark-mode .reader-chapter-link.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

body.reader-read-mode.reader-dark-mode .reader-chapter-link.is-complete {
    background: var(--color-gold-soft);
    border-color: var(--color-gold);
    color: var(--color-gold);
}

body.reader-read-mode.reader-dark-mode .reader-app__header {
    background: var(--color-surface);
    border-bottom-color: var(--color-border);
}

body.reader-read-mode.reader-dark-mode .reader-app__read-mode-controls {
    background: var(--color-surface);
    border-top-color: var(--color-border);
    border-bottom-color: var(--color-border);
}

body.reader-read-mode.reader-dark-mode .reader-app__control {
    color: var(--color-secondary);
    background: var(--color-surface-soft);
    border-color: var(--color-border);
}

body.reader-read-mode.reader-dark-mode .reader-app__control:hover {
    background: var(--color-bg-accent);
}

body.reader-read-mode.reader-dark-mode .reader-app__control--exit {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-secondary);
}

body.reader-read-mode.reader-dark-mode .reader-app__control--exit:hover {
    background: var(--color-bg-accent);
}

body.reader-read-mode.reader-dark-mode .reader-app__footer {
    background: var(--color-surface);
    border-top-color: var(--color-border);
}

body.reader-read-mode.reader-dark-mode .reader-block--text {
    color: var(--color-secondary);
}
