:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --accent: #fd79a8;
    --accent-dark: #e84393;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #0984e3;

    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-hover: #1f2b4d;
    --bg-input: #0d1b36;

    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;

    --border-color: #2a2a4a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --header-height: 64px;
    --container-width: 1280px;
    --transition: all 0.3s ease;
}

body.light-mode {
    --bg-primary: #f5f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f5;
    --bg-input: #f5f6fa;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --border-color: #dfe6e9;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-type {
    background: var(--primary);
    color: #fff;
}

.badge-status, .badge-ongoing {
    background: var(--success);
    color: #fff;
}

.badge-completed {
    background: var(--info);
    color: #fff;
}

.badge-hiatus {
    background: var(--warning);
    color: #333;
}

.badge-cancelled {
    background: var(--danger);
    color: #fff;
}

.badge-new {
    background: var(--accent);
    color: #fff;
    animation: pulse 2s infinite;
}

.badge-read {
    background: var(--success);
    color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    font-size: 12px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-text {
    color: var(--text-secondary);
}

.top-bar-text i {
    color: var(--accent);
}

.top-bar-text a {
    color: var(--text-primary);
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--primary);
    font-size: 28px;
}

.logo-accent {
    color: var(--primary);
}

.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-navigation .nav-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.main-navigation .nav-menu li a:hover,
.main-navigation .nav-menu li.current-menu-item a {
    color: var(--primary);
    background: var(--bg-hover);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.header-search {
    position: relative;
}

.search-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown form {
    display: flex;
    gap: 8px;
}

.search-dropdown input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.search-dropdown button[type="submit"] {
    padding: 10px 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
}

.genre-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.genre-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.genre-scroll::-webkit-scrollbar {
    display: none;
}

.genre-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid transparent;
}

.genre-tag:hover, .genre-tag-all {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.hero-slider {
    position: relative;
    height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 15, 26, 0.95) 0%, rgba(15, 15, 26, 0.7) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 50px;
    max-width: 550px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 52px;
    line-height: 1.1;
    margin-bottom: 12px;
    color: #fff;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-rating i {
    color: var(--warning);
}

.hero-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.hero-nav:hover {
    background: var(--primary);
}

.hero-prev { left: 16px; }
.hero-next { right: 16px; }

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero-dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

.section {
    margin: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-all-link:hover {
    gap: 10px;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 24px;
}

.comic-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.comic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.comic-card-link {
    display: block;
    color: inherit;
}

.comic-cover {
    position: relative;
    aspect-ratio: 3/4.2;
    overflow: hidden;
}

.comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.comic-card:hover .comic-cover img {
    transform: scale(1.08);
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    font-size: 48px;
    color: var(--text-muted);
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(108, 92, 231, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.overlay-btn {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cover-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cover-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.comic-info {
    padding: 14px;
}

.comic-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.comic-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.comic-genres {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.genre-pill {
    padding: 2px 10px;
    background: var(--bg-hover);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.genre-pill:hover {
    background: var(--primary);
    color: #fff;
}

.comic-row-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.continue-card {
    flex: 0 0 140px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.continue-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.continue-cover {
    position: relative;
    aspect-ratio: 3/4;
}

.continue-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.continue-card:hover .continue-overlay {
    opacity: 1;
}

.continue-overlay i {
    color: #fff;
    font-size: 28px;
}

.continue-info {
    padding: 10px;
}

.continue-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-chapter {
    font-size: 11px;
    color: var(--primary-light);
}

.comic-banner {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
}

.comic-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    margin-top: -80px;
    position: relative;
    z-index: 2;
    padding-bottom: 60px;
}

.comic-cover-large {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.comic-cover-large img {
    width: 100%;
    display: block;
}

.cover-rating-large {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--warning);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
}

.comic-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comic-info-table {
    margin-top: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

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

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-weight: 600;
}

.comic-genres-list {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comic-page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}

.subsection-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rating-label {
    font-weight: 600;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.star-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    padding: 2px;
}

.star-btn:hover, .star-btn.active {
    color: var(--warning);
    transform: scale(1.2);
}

.rating-display {
    font-size: 13px;
    color: var(--text-secondary);
}

.comic-synopsis {
    margin-bottom: 32px;
}

.synopsis-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.synopsis-content p {
    margin-bottom: 12px;
}

.chapter-section {
    margin-bottom: 40px;
}

.chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chapter-count {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 16px;
}

.chapter-controls {
    display: flex;
    gap: 4px;
}

.btn-sort {
    padding: 6px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.chapter-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition);
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item:hover {
    background: var(--bg-hover);
}

.chapter-item.read {
    opacity: 0.6;
}

.chapter-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-number {
    font-weight: 700;
    color: var(--primary-light);
    min-width: 60px;
}

.chapter-title {
    font-size: 14px;
}

.chapter-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-date {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-report-small {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: var(--transition);
}

.btn-report-small:hover {
    color: var(--danger);
}

.reader-topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.reader-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.reader-back {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.reader-comic-title {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reader-settings-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setting-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
}

.setting-item input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.setting-item select {
    width: 100%;
    padding: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.bg-options {
    display: flex;
    gap: 8px;
}

.bg-opt {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.bg-opt.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
}

.bg-white { background: #ffffff; }
.bg-black { background: #000000; }
.bg-gray { background: #1a1a2e; }
.bg-sepia { background: #f4ecd8; }

.reader-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.reader-images {
    max-width: 800px;
    width: 100%;
}

.reader-page {
    margin-bottom: 0;
    line-height: 0;
}

.reader-page img {
    width: 100%;
    display: block;
}

.reader-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.reader-empty i {
    font-size: 64px;
    margin-bottom: 20px;
}

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: transparent;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.1s linear;
}

.chapter-nav {
    margin: 30px auto;
}

.chapter-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-nav {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-nav:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chapter-select {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    max-width: 200px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    padding: 32px 0 60px;
}

.dashboard-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.dashboard-profile {
    text-align: center;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.profile-avatar img {
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.profile-name {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 700;
}

.profile-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.dash-tab:hover, .dash-tab.active {
    background: var(--bg-hover);
    color: var(--primary);
}

.dash-tab i {
    width: 20px;
    text-align: center;
}

.tab-count {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.dash-tab-logout:hover {
    color: var(--danger);
}

.dash-tab-admin {
    color: var(--success);
}

.dash-panel {
    display: none;
}

.dash-panel.active {
    display: block;
}

.dash-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
}

.dash-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dash-title-row .dash-title {
    margin-bottom: 0;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 800;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

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

.dash-comic-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.dash-comic-row:hover {
    border-color: var(--primary);
}

.dash-comic-cover {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.dash-comic-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-comic-info {
    flex: 1;
}

.dash-comic-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    display: block;
}

.dash-comic-progress {
    font-size: 13px;
    color: var(--primary-light);
}

.dash-comic-date {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.dash-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dash-rating .fa-star {
    font-size: 14px;
    color: var(--text-muted);
}

.dash-rating .fa-star.rated {
    color: var(--warning);
}

.rating-score {
    margin-left: 8px;
    font-weight: 700;
    color: var(--warning);
}

.dash-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.dash-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.dash-section {
    margin-bottom: 32px;
}

.dash-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-section-title i {
    color: var(--primary);
}

.settings-form {
    max-width: 500px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.settings-form input, .settings-form select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.settings-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0;
}

.dashboard-login-required {
    text-align: center;
    padding: 100px 20px;
}

.dashboard-login-required i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.dashboard-login-required h2 {
    margin-bottom: 24px;
}

.dashboard-login-required .btn {
    margin: 0 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: var(--danger);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group select,
.form-group textarea,
.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.required {
    color: var(--danger);
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    background: var(--primary-dark);
}

.comments-area {
    margin-top: 40px;
}

.comments-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.comment-list {
    list-style: none;
}

.comment-body-modern {
    margin-bottom: 20px;
}

.comment-inner {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.comment-avatar img {
    border-radius: 50%;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 700;
    color: var(--primary-light);
}

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.comment-actions {
    margin-top: 8px;
}

.comment-actions a {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.comment-form-modern {
    margin-top: 32px;
}

.comment-form-modern textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.comment-form-modern textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.archive-header {
    margin: 32px 0 24px;
}

.archive-title {
    font-size: 32px;
    font-weight: 800;
}

.archive-filters {
    margin-bottom: 32px;
}

.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-select {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
}

.pagination-wrap {
    margin: 40px 0;
    text-align: center;
}

.pagination-wrap .nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.footer-brand p {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
}

.footer-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 16px;
}

@media (max-width: 1024px) {
    .comic-detail-layout {
        grid-template-columns: 1fr;
    }

    .comic-sidebar {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 24px;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 360px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-content {
        padding: 24px;
    }

    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }

    .main-navigation .nav-menu.active {
        display: flex;
    }

    .comic-sidebar {
        grid-template-columns: 1fr;
    }

    .comic-cover-large {
        max-width: 250px;
        margin: 0 auto;
    }

    .top-bar-left {
        display: none;
    }

    .filter-row {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .chapter-nav-inner {
        flex-direction: column;
    }

    .dash-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-slider {
        height: 300px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .dash-stats-grid {
        grid-template-columns: 1fr;
    }
}
