:root {
    --bg-body: #f5f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.03), 0 1px 3px 0 rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.02);
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

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

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}
h1 { font-size: 2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.btn-primary, .btn-outline, .btn-danger, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
}
.btn-block {
    width: 100%;
    justify-content: center;
}

.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 16px;
}
.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.main-nav a {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.gold-badge {
    background: #fef9c3;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #854d0e;
}
.user-menu {
    position: relative;
}
.username {
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    min-width: 150px;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
    z-index: 10;
}
.user-menu:hover .user-dropdown {
    display: block;
}
.user-dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.user-dropdown a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.lang-switch a {
    margin: 0 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.lang-switch a.active {
    color: var(--primary);
    font-weight: 600;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.site-main {
    min-height: 70vh;
    padding: 20px 0;
}

.hero-slider {
    margin-bottom: 20px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.hero-slide img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 20px 0 20px;
    flex-wrap: wrap;
}
.section-header h2 {
    font-size: 1.5rem;
}
.view-all {
    color: var(--primary);
    font-size: 0.9rem;
}
.view-all i {
    margin-left: 4px;
}

.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px;
    margin: 30px 0;
}
.novel-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.novel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.card-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.novel-card:hover .card-cover img {
    transform: scale(1.03);
}
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.status-badge.ongoing {
    background: rgba(245,158,11,0.9);
    color: white;
}
.status-badge.finished {
    background: rgba(16,185,129,0.9);
    color: white;
}
.card-info {
    padding: 14px;
}
.card-info h3 {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.card-info .author {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.card-stats {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.description-preview {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-card.compact .card-info {
    padding: 8px;
}
.novel-card.compact h3 {
    font-size: 0.85rem;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: 40px 0;
}
.rank-box, .recommend-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.rank-list {
    list-style: none;
    margin-top: 16px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.rank-num {
    font-weight: 700;
    width: 30px;
    color: var(--primary);
}
.rank-value {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.rec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.rec-item a {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rec-item img {
    width: 45px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #f1f5f9;
}
.rec-item span {
    font-weight: 500;
}

.library-hero {
    text-align: center;
    margin: 0 0 32px;
}
.library-hero h1 {
    margin-bottom: 8px;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.library-hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.filter-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}
.filter-section .filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 18px;
    width: 100%;
}
.filter-section .filter-label {
    flex-shrink: 0;
    width: 80px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
}
.filter-section .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    width: 100%;
}
.filter-section .filter-option {
    flex: 0 0 auto;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}
.filter-section .filter-option:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}
.filter-section .filter-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.filter-section .word-range-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
    width: 100%;
}
.filter-section .word-range-inputs input {
    width: 130px;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    border-radius: 40px;
    background: white;
}
.filter-section .filter-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.btn-filter {
    flex: 1;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-reset {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-reset:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.result-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.view-toggle {
    display: flex;
    gap: 8px;
}
.view-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.view-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.novel-list-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.novel-list-container.list-view .novel-item {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.novel-list-container.list-view .novel-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.novel-list-container.list-view .novel-cover {
    flex: 0 0 120px;
}
.novel-list-container.list-view .novel-cover img {
    width: 100%;
    border-radius: var(--radius-md);
    aspect-ratio: 2/3;
    object-fit: cover;
}
.novel-list-container.list-view .novel-info {
    flex: 1;
}
.novel-list-container.list-view .novel-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.novel-list-container.list-view .novel-author {
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.novel-list-container.list-view .novel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.novel-list-container.list-view .novel-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}
.novel-list-container.list-view .novel-last {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.novel-list-container.list-view .novel-last a {
    color: var(--primary);
}
.novel-list-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
    margin: 32px 0;
}
.novel-list-container.grid-view .novel-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.novel-list-container.grid-view .novel-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.novel-list-container.grid-view .novel-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.novel-list-container.grid-view .novel-info {
    padding: 12px;
}
.novel-list-container.grid-view .novel-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.novel-list-container.grid-view .novel-author {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.novel-list-container.grid-view .novel-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.novel-list-container.grid-view .novel-desc,
.novel-list-container.grid-view .novel-last {
    display: none;
}
.novel-list-container.grid-view .status-badge {
    padding: 2px 8px;
    font-size: 0.65rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
}
.page-link:hover,
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.novel-detail-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}
.detail-cover {
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
}
.detail-cover img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}
.detail-info h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #1d2129;
}
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 16px 0;
    color: #6b7280;
    font-size: 0.95rem;
}
.meta-row i {
    margin-right: 6px;
    color: #9ca3af;
}
.stats-row {
    display: flex;
    gap: 30px;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
}
.stat {
    text-align: center;
}
.stat span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d2129;
}
.stat label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}
.description {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
}
.description h3 {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding: 0;
}
.description h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #3b82f6;
    border-radius: 2px;
    margin-right: 8px;
}
.description p {
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.75;
    color: #4b5563;
    font-size: 0.95rem;
    margin: 0;
    padding-right: 8px;
    text-align: justify;
}
.description p::-webkit-scrollbar {
    width: 6px;
}
.description p::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}
.description p::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.description p::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.chapters-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}
.chapter-sort {
    display: flex;
    gap: 8px;
}
.sort-btn {
    background: none;
    border: 1px solid var(--border-light);
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
}
.sort-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}
.chapter-item {
    width: 100%;
}
.chapter-item a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    transition: background 0.2s;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    color: inherit !important;
}
.chapter-item a .chapter-title-info {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: calc(100% - 100px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin-right: 8px !important;
    text-align: left !important;
}
.chapter-item a .word-count {
    font-size: 0.7rem !important;
    color: var(--text-muted);
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: right !important;
}
.chapter-item a:hover {
    background: var(--border-light);
}
.related-novels {
    margin-top: 40px;
}
.related-novels h3 {
    margin-bottom: 20px;
}

.read-container {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 48px;
    box-shadow: var(--shadow-sm);
}
.read-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb a {
    color: var(--primary);
}
.read-controls {
    display: flex;
    gap: 10px;
}
.ctrl-btn {
    background: var(--bg-sidebar);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}
.ctrl-btn:hover {
    background: var(--primary);
    color: white;
}
.chapter-content {
    font-size: 18px;
    line-height: 1.85;
    letter-spacing: 0.01em;
}
.chapter-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}
.content-body p {
    margin-bottom: 1.5em;
}
.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 48px;
}
.nav-btn {
    padding: 12px 28px;
    background: var(--bg-sidebar);
    border-radius: 50px;
    font-weight: 500;
}
.nav-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}
body.dark-read {
    background: #0f172a;
}
body.dark-read .read-container {
    background: #1e293b;
    color: #e2e8f0;
}
body.dark-read .ctrl-btn,
body.dark-read .nav-btn {
    background: #334155;
    color: white;
}
body.dark-read .breadcrumb {
    color: #94a3b8;
}

.rank-header {
    text-align: center;
    margin-bottom: 40px;
}
.rank-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}
.rank-tab {
    background: var(--bg-card);
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.rank-tab.active {
    background: var(--primary);
    color: white;
}
.rank-list-large {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.rank-number {
    font-size: 2rem;
    font-weight: 800;
    width: 60px;
    text-align: center;
    color: var(--text-muted);
}
.rank-number.top-three {
    color: var(--warning);
}
.rank-item-link {
    display: flex;
    gap: 16px;
    flex: 1;
}
.rank-item-link img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.rank-info h3 {
    font-size: 1.1rem;
}
.rank-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.rank-score {
    font-weight: 600;
    color: var(--primary);
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin: 30px 0;
}
.author-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}
.author-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.author-avatar i {
    font-size: 4rem;
    color: var(--text-muted);
}
.author-info h3 {
    margin: 12px 0 4px;
}
.author-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.user-center-layout {
    display: flex;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
.user-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: 90px;
    height: fit-content;
}
.user-sidebar-header {
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light), white);
    border-bottom: 1px solid var(--border-light);
}
.user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}
.user-sidebar-header h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.user-sidebar-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.user-nav {
    padding: 16px 0;
}
.user-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
    border-radius: 40px;
    margin: 4px 12px;
}
.user-nav-item i {
    width: 20px;
    font-size: 1.1rem;
}
.user-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
}
.user-nav-item.active {
    background: var(--primary);
    color: white;
    border-left: none;
    font-weight: 500;
}
.user-nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 0;
}
.user-content {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    min-height: 500px;
}
.user-content form {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
  box-sizing: border-box;
  margin: 0;
}
.user-content .form-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.user-content .form-group label {
  min-width: 120px;
  max-width: 300px;
  width: 300px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  box-sizing: border-box;
}
.user-content .form-group input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  outline: none;
  transition: border 0.2s;
  box-sizing: border-box;
}

.user-content .form-group input:focus {
  border-color: #409eff;
}
@media (max-width: 768px) {
  .user-content .form-group {
    flex-direction: column;
    align-items: stretch;
  }

  .user-content .form-group label {
    width: 100%;
    max-width: 100%;
    margin-bottom: 6px;
  }
}
.user-content h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}
.user-info-card {
    background: var(--bg-sidebar);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}
.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.stat-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-4px);
}
.stat-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}
.vip-badge {
    background: linear-gradient(135deg, #f9a825, #f57c00);
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
}
.bookshelf-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bookshelf-item {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.bookshelf-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.bookshelf-cover {
    width: 100px;
    flex-shrink: 0;
}
.bookshelf-cover img {
    width: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    aspect-ratio: 2/3;
}
.bookshelf-info {
    flex: 1;
}
.bookshelf-info h3 {
    margin-bottom: 6px;
}
.bookshelf-info .author {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.last-read {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.bookshelf-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}
.sign-card {
    background: linear-gradient(135deg, #fff, #fef9e6);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}
.sign-icon {
    font-size: 3rem;
    color: #f1c40f;
    margin-bottom: 16px;
}
.sign-reward-preview {
    background: white;
    border-radius: 60px;
    padding: 16px;
    margin: 20px auto;
    width: 80%;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.02);
}
.reward-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e67e22;
}
.sign-btn {
    background: linear-gradient(95deg, #f39c12, #e67e22);
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: bold;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}
.sign-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(243,156,18,0.3);
}
.user-stats-mini {
    display: flex;
    justify-content: space-around;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
}
.signed-badge {
    color: var(--success);
    font-weight: bold;
}
.rule-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
.vip-status-card {
    background: linear-gradient(145deg, #2c3e50, #1a2632);
    color: white;
    border-radius: var(--radius-xl);
    padding: 28px;
    text-align: center;
    margin-bottom: 30px;
}
.vip-status-card i {
    font-size: 3rem;
    color: gold;
}
.vip-status-card.active {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
}
.vip-exchange-box, .vip-pay-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}
.month-selector {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.vip-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.9rem;
}
.vip-form button {
    width: auto;
    padding: 10px 30px;
}
.data-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.data-table th {
    background: var(--bg-sidebar);
    font-weight: 600;
}
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
form {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-xl);
    max-width: 500px;
    margin: 20px auto;
    box-shadow: var(--shadow-sm);
}
form div {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}
input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
}
button[type="submit"] {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
}
.error {
    color: var(--danger);
    background: #fee2e2;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.success, .alert {
    color: var(--success);
    background: #dcfce7;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    padding: 20px 0 20px;
    margin-top: 20px;
}
.footer-inner {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}
.search-overlay.active {
    visibility: visible;
    opacity: 1;
}
.search-modal {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-xl, 28px);
    max-width: 90%;
    width: 500px;
    padding: 24px;
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0,0,0,0.1));
    transform: scale(0.9);
    transition: transform 0.2s ease;
}
.search-overlay.active .search-modal {
    transform: scale(1);
}
.search-modal h3 {
    margin-bottom: 16px;
    font-size: 1.3rem;
}
.search-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.search-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 40px;
    font-size: 1rem;
    outline: none;
    transition: 0.2s;
}
.search-input-group input:focus {
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.search-modal button {
    background: var(--primary, #3b82f6);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.search-modal button:hover {
    background: var(--primary-dark, #2563eb);
}
.search-close {
    text-align: right;
    margin-bottom: 8px;
}
.search-close button {
    background: transparent;
    color: var(--text-secondary, #475569);
    font-size: 1.2rem;
    padding: 4px 8px;
}
.search-tip {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    text-align: center;
}
.search-icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary, #475569);
    transition: color 0.2s;
}
.search-icon-btn:hover {
    color: var(--primary, #3b82f6);
}
.btn-icon {
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}
.btn-icon:hover {
    background: var(--primary, #3b82f6);
    color: white;
}
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .novel-detail-grid { grid-template-columns: 1fr; }
    .detail-cover { max-width: 220px; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .main-nav.show {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .main-nav.show ul { flex-direction: column; gap: 1rem; }
    .two-columns { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; align-items: stretch; }
    .word-range .range-inputs { flex-wrap: wrap; }
    .word-range input { width: 100%; }
    .filter-actions { flex-direction: column; }
    .rank-item { flex-wrap: wrap; }
    .rank-number { width: 40px; font-size: 1.5rem; }
    .read-container { padding: 24px; }
    .chapter-nav { flex-direction: column; align-items: stretch; }
    .nav-btn { text-align: center; }
    .filter-section .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-section .filter-label {
        width: auto;
    }
    .filter-section .word-range-inputs input {
        width: 100px;
    }
    .user-center-layout {
        flex-direction: column;
        padding: 16px;
    }
    .user-sidebar {
        width: 100%;
        position: static;
    }
    .user-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 12px;
    }
    .user-nav-item {
        padding: 8px 16px;
        border-radius: 40px;
        border-left: none;
    }
    .user-nav-item.active {
        border-left: none;
        background: var(--primary);
        color: white;
    }
    .user-nav-divider {
        display: none;
    }
    .user-content {
        padding: 20px;
    }
}
.pay-method { margin: 15px 0; }
.pay-method label { margin-right: 15px; font-weight: normal; }
.pay-method input { margin-right: 5px; }
@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr !important;
    }
    .chapter-item a {
        padding: 12px 16px !important;
    }
    .chapter-title-info {
        font-size: 0.95rem;
    }
}
@media (max-width: 640px) {
    .novel-grid, .novel-grid-container { grid-template-columns: 1fr; }
    .header-actions .btn-outline, .header-actions .btn-primary { display: none; }
    .gold-badge { font-size: 0.7rem; }
    .novel-list-container.list-view .novel-card {
        flex-direction: column;
    }
    .novel-list-container.list-view .card-cover {
        width: 100%;
    }
    .bookshelf-item { flex-direction: column; align-items: center; text-align: center; }
    .bookshelf-actions { flex-direction: row; }
    .days-selector { flex-direction: column; gap: 12px; }
    .sign-reward-preview { width: 100%; }
    .search-modal { width: 90%; padding: 20px; }
    .search-input-group { flex-direction: column; }
    .search-input-group button { padding: 10px; }
}
@media (max-width: 480px) {
    .novel-grid, .novel-grid-container { grid-template-columns: 1fr; }
    .header-actions .btn-outline, .header-actions .btn-primary { display: none; }
    .gold-badge { font-size: 0.7rem; }
}
.chapter-update-table {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
    overflow-x: auto;
}
.update-table {
    width: 100%;
    border-collapse: collapse;
}
.update-table th,
.update-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
.update-table th {
    background: var(--gray-50);
    font-weight: 600;
}
.update-table tr:hover {
    background: var(--gray-50);
}
.rank-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}
.rank-col {
    flex: 1;
    min-width: 0;
}
.rank-box.empty-placeholder {
    min-height: 280px;
    background: #f9fafb;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
}
.random-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}
.random-tag {
    background: var(--gray-100);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--gray-700);
}
.random-tag:hover {
    background: var(--primary);
    color: white;
}
@media (max-width: 768px) {
    .rank-row {
        flex-direction: column;
    }
    .update-table th,
    .update-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}
.description-content {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 8px;
    line-height: 1.6;
    color: #4b5563;
}
.description-content::-webkit-scrollbar {
    width: 5px;
}
.description-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.description-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.volume-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: #f5f7fa;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}
.volume-header:hover {
    background: #e9edf2;
}
.volume-header .toggle-icon {
    font-size: 14px;
    transition: transform 0.2s;
}
.volume-header .toggle-icon.open {
    transform: rotate(90deg);
}
.volume-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.volume-chapter-count {
    font-size: 0.8rem;
    color: #6c757d;
}
.volume-chapters {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px 16px !important;
    padding: 12px 8px !important;
    margin-bottom: 10px !important;
}
@media (max-width: 768px) {
    .volume-chapters {
        grid-template-columns: 1fr !important;
    }
}
.chapter-item {
    list-style: none;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    transition: all 0.2s;
    overflow: hidden;
}
.chapter-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}
.chapter-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #1e293b;
    gap: 8px;
}
.chapter-item a:hover {
    color: #3b82f6;
}
.chapter-title-info {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.word-count {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .chapter-item {
        padding: 10px 12px;
    }
    .chapter-title-info {
        font-size: 0.85rem;
        white-space: normal;
        word-break: break-word;
    }
}

.search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.search-header {
    text-align: center;
    margin-bottom: 32px;
}
.search-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.search-subtitle {
    color: #6c757d;
}
.search-captcha-box {
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
}
.search-captcha-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.search-captcha-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.search-captcha-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 48px;
}
.search-captcha-img {
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
}
.search-captcha-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 48px;
    margin-top: 16px;
    cursor: pointer;
}
.search-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 24px;
    margin-top: 32px;
}
.search-empty p {
    color: #6c757d;
}
.search-result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 20px;
}
.search-result-count {
    color: #4b5563;
}
.search-view-toggle {
    display: flex;
    gap: 8px;
}
.search-view-toggle .view-btn {
    background: #e2e8f0;
    border: none;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-view-toggle .view-btn:first-child {
    background: #e2e8f0;
}
.search-view-toggle .view-btn:last-child {
    background: transparent;
    border: 1px solid #cbd5e1;
}
.search-novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
}
.search-novel-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s;
    border: 1px solid #eef2f6;
}
.search-novel-card:hover {
    transform: translateY(-2px);
}
.search-novel-cover {
    position: relative;
}
.search-novel-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.search-novel-cover .status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    color: white;
}
.search-novel-info {
    padding: 12px;
}
.search-novel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-novel-title a {
    text-decoration: none;
    color: #1e293b;
}
.search-novel-author {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 8px;
}
.search-novel-meta {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: #94a3b8;
}
.search-novel-desc {
    display: none;
}
.search-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}
.search-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
}
.search-pagination .page-link.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}
.search-welcome {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 24px;
    margin-top: 32px;
}
.search-welcome p {
    color: #6c757d;
}