/* ===================================
   Book次元斋 - 暗黑科技霓虹主题
   风格：深色背景 + 霓虹青/洋红 + 玻璃拟态
   =================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #101018;
    --bg-tertiary: #161622;
    --bg-card: rgba(22, 22, 34, 0.72);
    --bg-card-solid: #161622;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-active: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #b8b8c8;
    --text-muted: #6e6e80;
    --text-disabled: #4a4a5a;

    --cyan: #00f0ff;
    --cyan-dim: rgba(0, 240, 255, 0.15);
    --cyan-glow: rgba(0, 240, 255, 0.4);
    --magenta: #ff006e;
    --magenta-dim: rgba(255, 0, 110, 0.15);
    --magenta-glow: rgba(255, 0, 110, 0.4);
    --gold: #ffd700;
    --gold-dim: rgba(255, 215, 0, 0.15);

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(0, 240, 255, 0.25);
    --glass: rgba(255, 255, 255, 0.04);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.25);
    --shadow-glow-magenta: 0 0 20px rgba(255, 0, 110, 0.25);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --status-full: #00f0ff;
    --status-full-bg: rgba(0, 240, 255, 0.12);
    --status-serial: #ff006e;
    --status-serial-bg: rgba(255, 0, 110, 0.12);

    --container: 1200px;
    --header-height: 64px;
    --mobile-bottom-bar: 60px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-secondary);
    background: var(--bg-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 0, 110, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.45); }

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition), text-shadow var(--transition);
}
a:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }

img { max-width: 100%; height: auto; display: block; }
img.lazyload { opacity: 0; transition: opacity 0.4s ease; background: var(--bg-tertiary); }
img.lazyloaded { opacity: 1; background: transparent; }
img.lazyerror { opacity: 1; background: var(--bg-tertiary); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-weight: 600; line-height: 1.3; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-gold { color: var(--gold); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.section { margin-bottom: 40px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.section-title::before {
    content: "";
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--cyan), var(--magenta));
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--cyan-glow);
}
.section-title .more { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); }
.section-title .more:hover { color: var(--cyan); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-symbol {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--cyan);
    border-radius: var(--radius-md);
    color: var(--cyan);
    font-size: 1.3rem; font-weight: 700;
    box-shadow: 0 0 12px var(--cyan-glow);
    text-shadow: 0 0 8px var(--cyan-glow);
}
.logo-text { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); letter-spacing: 0.02em; }
.logo-text span { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }
.header-nav {
    display: flex; align-items: center; gap: 6px;
    flex: 1; justify-content: center;
}
.header-nav a {
    padding: 8px 16px; border-radius: var(--radius-full);
    font-size: 0.95rem; color: var(--text-secondary);
    transition: all var(--transition); white-space: nowrap;
}
.header-nav a:hover,
.header-nav a.active {
    color: var(--cyan); background: var(--cyan-dim);
    box-shadow: 0 0 12px var(--cyan-glow) inset;
}
.header-search { position: relative; width: 240px; flex-shrink: 0; }
.header-search input {
    width: 100%; height: 40px; padding: 0 40px 0 16px;
    background: var(--glass); border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary); font-size: 0.9rem;
    transition: all var(--transition);
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); background: rgba(0, 240, 255, 0.05); }
.header-search button {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    color: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
}
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-menu { position: relative; }
.user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid var(--cyan); object-fit: cover;
    box-shadow: 0 0 12px var(--cyan-glow); cursor: pointer;
}
.user-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    min-width: 160px; background: var(--bg-card);
    border: 1px solid var(--border-glow); border-radius: var(--radius-md);
    padding: 8px; box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 240, 255, 0.1);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all var(--transition); backdrop-filter: blur(12px);
}
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-secondary); }
.user-dropdown a:hover { background: var(--bg-hover); color: var(--cyan); }

.mobile-menu-toggle, .mobile-bottom-bar, .mobile-search-bar { display: none; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-full);
    font-size: 0.95rem; font-weight: 500;
    transition: all var(--transition); cursor: pointer; border: 1px solid transparent;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #00c8d6);
    color: var(--bg-primary); box-shadow: 0 4px 16px var(--cyan-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--cyan-glow), 0 0 30px var(--cyan-glow); color: var(--bg-primary); }
.btn-secondary { background: var(--glass); color: var(--text-primary); border-color: var(--border); backdrop-filter: blur(8px); }
.btn-secondary:hover { border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan-glow) inset; color: var(--cyan); }
.btn-magenta { background: linear-gradient(135deg, var(--magenta), #d4005c); color: #fff; box-shadow: 0 4px 16px var(--magenta-glow); }
.btn-magenta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--magenta-glow); color: #fff; }
.btn-glass { background: var(--glass); border: 1px solid var(--border); color: var(--text-primary); }
.btn-glass:hover { background: rgba(255,255,255,0.08); border-color: var(--cyan); color: var(--cyan); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); backdrop-filter: blur(10px); }
.card:hover { border-color: var(--border-glow); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(0, 240, 255, 0.08); transform: translateY(-4px); }

.book-cover { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-tertiary); aspect-ratio: 3 / 4; max-width: 100%; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); max-width: 100% !important; max-height: 100% !important; }
.book-cover:hover img { transform: scale(1.05); }
.book-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4) 100%); pointer-events: none; }
.cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary)); color: var(--text-muted); font-size: 2rem; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.badge-cyan { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,240,255,0.25); }
.badge-magenta { background: var(--magenta-dim); color: var(--magenta); border: 1px solid rgba(255,0,110,0.25); }
.badge-gold { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(255,215,0,0.25); }
.vip-tag {
    display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-full);
    font-size: 0.7rem; font-weight: 700; background: linear-gradient(135deg, var(--magenta), #d4005c);
    color: #fff; box-shadow: 0 0 8px var(--magenta-glow); margin-left: 6px; vertical-align: middle;
}
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 500; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-full { background: var(--status-full-bg); color: var(--status-full); border: 1px solid rgba(0,240,255,0.2); }
.status-full::before { background: var(--status-full); box-shadow: 0 0 6px var(--status-full); }
.status-serial { background: var(--status-serial-bg); color: var(--status-serial); border: 1px solid rgba(255,0,110,0.2); }
.status-serial::before { background: var(--status-serial); box-shadow: 0 0 6px var(--status-serial); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.form-control { width: 100%; height: 48px; padding: 0 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.95rem; transition: all var(--transition); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); background: rgba(0,240,255,0.05); }
textarea.form-control { height: auto; padding: 12px 16px; resize: vertical; }
.form-error { margin-top: 6px; font-size: 0.85rem; color: var(--magenta); }
.form-hint { margin-top: 6px; font-size: 0.85rem; color: var(--text-muted); }

.hero-section { position: relative; padding: 50px 0 40px; margin-bottom: 30px; overflow: hidden; }
.hero-section::before { content: ""; position: absolute; top: -20%; right: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,240,255,0.1) 0%, transparent 70%); pointer-events: none; }
.hero-section::after { content: ""; position: absolute; bottom: -25%; left: -10%; width: 450px; height: 450px; background: radial-gradient(circle, rgba(255,0,110,0.07) 0%, transparent 70%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-content h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero-content h1 .gradient-text { background: linear-gradient(135deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-content p { font-size: 1rem; color: var(--text-muted); margin-bottom: 24px; max-width: 440px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.5rem; color: var(--cyan); text-shadow: 0 0 12px var(--cyan-glow); }
.hero-stat span { font-size: 0.85rem; color: var(--text-muted); }

.hero-slider { position: relative; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg), 0 0 30px rgba(0,240,255,0.1); aspect-ratio: 16 / 9; max-height: 320px; }
.banner-item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.banner-item.active { opacity: 1; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10,10,15,0.9) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.banner-overlay h3 { font-size: 1.3rem; margin-bottom: 6px; }
.banner-overlay p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; max-width: none; }
.banner-item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.banner-item.active { opacity: 1; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }
.banner-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10,10,15,0.9) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.banner-overlay h3 { font-size: 1.3rem; margin-bottom: 6px; }
.banner-overlay p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.dot.active, .dot:hover { background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); width: 20px; border-radius: var(--radius-full); }

.category-pills { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.category-pill { display: inline-flex; align-items: center; padding: 10px 20px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-secondary); font-size: 0.9rem; transition: all var(--transition); }
.category-pill:hover, .category-pill.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 16px var(--cyan-glow); }

/* 热门推荐：2行4列 */
.hot-recommend-section { margin-bottom: 20px; }
.hot-recommend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.hot-recommend-card { display: flex; gap: 14px; padding: 14px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.hot-recommend-card:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.hot-recommend-cover { width: 90px; height: 120px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.hot-recommend-cover img { width: 100%; height: 100%; object-fit: cover; }
.hot-recommend-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hot-recommend-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-recommend-author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.hot-recommend-summary { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.book-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.book-card { position: relative; transition: all var(--transition); }
.book-card .book-cover { margin-bottom: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.book-card:hover .book-cover { border-color: var(--cyan); box-shadow: 0 0 20px var(--cyan-glow); }
.book-card .title { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card .meta { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card .tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.book-card-mini { display: flex; gap: 12px; padding: 12px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); transition: all var(--transition); }
.book-card-mini:hover { border-color: var(--cyan); background: rgba(0,240,255,0.05); }
.book-card-mini .book-cover { width: 70px; height: 94px; flex-shrink: 0; border-radius: var(--radius-sm); }
.book-card-mini .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.book-card-mini .title { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card-mini .meta { font-size: 0.8rem; color: var(--text-muted); }

.home-two-col { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }

/* 分类月榜：2列4行，与最新更新同宽 */
.category-ranks-section { margin-bottom: 24px; }
.category-ranks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.category-rank-card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; transition: all var(--transition); overflow: hidden; }
.category-rank-card:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.category-rank-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.category-rank-name { font-size: 1rem; font-weight: 700; color: var(--cyan); }
.category-rank-more { font-size: 0.8rem; color: var(--text-muted); }
.category-rank-more:hover { color: var(--magenta); }
.category-rank-featured { display: flex; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.category-rank-cover { width: 70px; height: 94px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.category-rank-featured-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.category-rank-title { font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.category-rank-meta { font-size: 0.8rem; color: var(--text-muted); }
.category-rank-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; padding: 0; list-style: none; }
.category-rank-list li { position: relative; padding-left: 12px; }
.category-rank-list li::before { content: "•"; position: absolute; left: 0; color: var(--cyan); }
.category-rank-list a { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.category-rank-list a:hover { color: var(--cyan); }
.category-rank-empty { color: var(--text-muted); font-size: 0.9rem; padding: 12px 0; }

/* 最新更新与上方间距 */
.latest-updates-section { margin-top: 24px; }

/* 右侧多个榜单紧凑排列 */
.sidebar-ranks { display: flex; flex-direction: column; gap: 24px; }
.sidebar-rank { margin-bottom: 0; overflow: hidden; }
.sidebar-rank .section-title { font-size: 1.05rem; margin-bottom: 12px; }

.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.rank-item:hover { border-color: var(--cyan); background: rgba(0,240,255,0.05); }
.rank-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 700; color: var(--text-muted); background: var(--bg-tertiary); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-num { color: var(--gold); background: var(--gold-dim); box-shadow: 0 0 8px var(--gold-dim); }
.rank-item:nth-child(2) .rank-num { color: var(--cyan); background: var(--cyan-dim); box-shadow: 0 0 8px var(--cyan-dim); }
.rank-item:nth-child(3) .rank-num { color: var(--magenta); background: var(--magenta-dim); box-shadow: 0 0 8px var(--magenta-dim); }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.rank-meta { font-size: 0.8rem; color: var(--text-muted); }
.rank-stat { font-size: 0.8rem; color: var(--cyan); white-space: nowrap; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; table-layout: fixed; }
.data-table th { text-align: left; padding: 12px 10px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.data-table tr:hover td { background: var(--bg-hover); }
.latest-table th:first-child, .latest-table td:first-child { width: 28%; }
.latest-table th:nth-child(2), .latest-table td:nth-child(2) { width: 47%; }
.latest-table th:nth-child(3), .latest-table td:nth-child(3) { width: 25%; }
.latest-table .latest-time { white-space: nowrap; }
.data-table .book-name { color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; vertical-align: middle; }
.data-table .chapter-name { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; vertical-align: middle; }
.data-table .chapter-name:hover { text-shadow: 0 0 8px var(--cyan-glow); }

/* 完本小说列表（无封面表格） */
.completed-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.9rem; }
.completed-table-wrap { overflow-x: auto; }
.completed-table { table-layout: fixed; }
.completed-table th,
.completed-table td { padding: 14px 12px; }
.completed-table .col-title { width: 26%; }
.completed-table .col-chapter { width: 28%; }
.completed-table .col-status { width: 10%; text-align: center; }
.completed-table .col-words { width: 12%; text-align: right; }
.completed-table .col-author { width: 12%; }
.completed-table .col-time { width: 12%; text-align: right; }
.completed-table .status-full { background: rgba(0, 240, 255, 0.12); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.2); }
.completed-table .status-full::before { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.completed-table .empty-state { text-align: center; padding: 60px 20px; }
.completed-table .empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

/* 搜索结果页：封面 + 信息列表 */
.search-results { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.search-result-item { display: flex; gap: 16px; padding: 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.search-result-item:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.search-result-cover { flex: 0 0 100px; width: 100px; height: 133px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.search-result-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.search-result-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-result-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.search-result-title:hover { color: var(--cyan); }
.search-result-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.search-result-meta .sep { color: var(--text-disabled); }
.search-result-summary { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.search-result-latest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-muted); }
.search-result-latest .label { color: var(--text-disabled); }
.search-result-latest .chapter-name { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 240px; vertical-align: middle; }
.search-result-latest .chapter-name:hover { text-shadow: 0 0 8px var(--cyan-glow); }
.search-result-latest .update-time { margin-left: auto; color: var(--text-disabled); }

.category-header { padding: 40px 0 30px; text-align: center; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.category-header h1 { font-size: 2rem; margin-bottom: 16px; }
.filter-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.filter-tab { padding: 8px 18px; border-radius: var(--radius-full); background: var(--glass); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; transition: all var(--transition); }
.filter-tab:hover, .filter-tab.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.category-layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; }
.filter-sidebar { position: sticky; top: calc(var(--header-height) + 20px); height: fit-content; }
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--text-primary); text-align: center; }
.filter-links { display: flex; flex-direction: column; gap: 6px; }
.filter-links a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-secondary); transition: all var(--transition); text-align: center; }
.filter-links a:hover, .filter-links a.active { background: var(--cyan-dim); color: var(--cyan); }
.sort-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.sort-options { display: flex; gap: 8px; }
.sort-options a { padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.85rem; color: var(--text-secondary); background: var(--glass); border: 1px solid var(--border); }
.sort-options a:hover, .sort-options a.active { background: var(--magenta-dim); border-color: var(--magenta); color: var(--magenta); }
.sort-bar .filter-tabs { justify-content: flex-start; }
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.book-card .book-cover { max-height: 220px; }
.book-card .title { font-size: 0.9rem; }

/* 分类页书籍列表：5列6行，每本含封面/书名/作者/状态/简介/字数 */
.category-book-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; grid-auto-rows: 1fr; }
.category-book-card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; transition: all var(--transition); display: flex; flex-direction: column; height: 340px; overflow: hidden; }
.category-book-card:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.category-book-cover { display: block; width: 100%; height: 160px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border); flex-shrink: 0; }
.category-book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.category-book-info { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.category-book-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-book-author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.category-book-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.category-book-meta .status-badge { font-size: 0.75rem; padding: 2px 8px; }
.category-book-word { font-size: 0.75rem; color: var(--text-muted); }
.category-book-summary { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: auto; }

/* 排行榜页 */
.rank-header { padding: 40px 0 24px; text-align: center; margin-bottom: 20px; }
.rank-header h1 { font-size: 2.2rem; margin-bottom: 8px; }
.rank-header p { color: var(--text-muted); }
.rank-type-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.rank-type-tab { padding: 10px 24px; border-radius: var(--radius-full); background: var(--glass); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.95rem; transition: all var(--transition); }
.rank-type-tab:hover, .rank-type-tab.active { background: linear-gradient(135deg, var(--cyan-dim), var(--magenta-dim)); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 16px var(--cyan-glow); }

.rank-filter-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px; }
.rank-filter-row { display: flex; align-items: flex-start; gap: 16px; }
.rank-filter-row + .rank-filter-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.rank-filter-label { flex: 0 0 auto; width: 42px; padding-top: 8px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.rank-filter-options { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.rank-filter-option { padding: 7px 16px; border-radius: var(--radius-full); background: var(--glass); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; transition: all var(--transition); }
.rank-filter-option:hover { border-color: var(--cyan); color: var(--cyan); }
.rank-filter-option.active { background: linear-gradient(135deg, var(--gold), #c7a008); border-color: transparent; color: #1a160f; font-weight: 500; box-shadow: 0 0 12px rgba(184,134,11,0.35); }

.rank-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.rank-main { min-width: 0; }
.rank-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 0.9rem; color: var(--text-muted); }
.rank-summary strong { color: var(--cyan); font-size: 1.1rem; }
.rank-summary-tag { padding: 3px 10px; border-radius: var(--radius-full); background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,240,255,0.2); font-size: 0.8rem; }

.rank-results { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.rank-result-item { display: flex; align-items: stretch; gap: 16px; padding: 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.rank-result-item:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.rank-result-number { flex: 0 0 auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: 1.3rem; font-weight: 700; color: var(--text-muted); background: var(--bg-tertiary); }
.rank-result-number.top-1 { color: #fff; background: linear-gradient(135deg, #e6a817, #b8860b); box-shadow: 0 0 14px rgba(184,134,11,0.45); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.rank-result-number.top-2 { color: #fff; background: linear-gradient(135deg, #9ca3af, #6b7280); box-shadow: 0 0 14px rgba(156,163,175,0.35); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.rank-result-number.top-3 { color: #fff; background: linear-gradient(135deg, #cd7f32, #a05a2c); box-shadow: 0 0 14px rgba(205,127,50,0.35); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.rank-result-cover { flex: 0 0 100px; width: 100px; height: 133px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.rank-result-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-result-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank-result-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rank-result-title:hover { color: var(--cyan); }
.rank-result-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.rank-result-meta .sep { color: var(--text-disabled); }
.rank-result-summary { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.rank-result-latest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-muted); margin-top: auto; }
.rank-result-latest .label { color: var(--text-disabled); }
.rank-result-latest .chapter-name { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 280px; vertical-align: middle; }
.rank-result-latest .chapter-name:hover { text-shadow: 0 0 8px var(--cyan-glow); }
.rank-result-latest .update-time { margin-left: auto; color: var(--text-disabled); }
.rank-result-score { flex: 0 0 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding-left: 16px; border-left: 1px solid var(--border-light); text-align: center; }
.rank-result-score strong { font-size: 1.25rem; color: var(--cyan); font-weight: 700; }
.rank-result-score span { font-size: 0.75rem; color: var(--text-muted); }
.rank-pagination { margin-top: 10px; }

.book-detail-hero { padding: 40px 0; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.book-detail-main { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; }
.book-detail-cover { position: relative; max-width: 200px; }
.book-detail-cover .book-cover { width: 100%; border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,240,255,0.1); }
.book-detail-info h1 { font-size: 1.9rem; margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.book-meta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; align-items: center; }
.book-meta-row a { color: var(--cyan); }
.book-stats-row { display: flex; gap: 32px; margin: 24px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.book-stat { text-align: center; }
.book-stat strong { display: block; font-size: 1.4rem; color: var(--text-primary); }
.book-stat span { font-size: 0.8rem; color: var(--text-muted); }
.book-actions { display: flex; gap: 12px; margin-top: 24px; }
.book-actions .btn { min-width: 140px; }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.book-intro { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 30px; }
.book-intro h2 { font-size: 1.1rem; margin-bottom: 12px; }
.book-intro p { color: var(--text-secondary); line-height: 1.8; }
.chapter-directory { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.chapter-directory h2 { font-size: 1.1rem; margin-bottom: 16px; }
.chapter-directory-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chapter-directory-header h2 { margin-bottom: 0; }
.chapter-directory-header .text-muted { font-size: 0.85rem; }
.chapter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.chapter-item { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 12px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-secondary); transition: all var(--transition); overflow: hidden; }
.chapter-item:hover { border-color: var(--cyan); background: rgba(0,240,255,0.05); color: var(--cyan); }
.chapter-item .title { flex: 1 1 auto; min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 6px; }
.chapter-item .vip-icon { flex: 0 0 auto; color: var(--magenta); font-size: 0.75rem; }
.latest-chapters { margin-bottom: 30px; }
.latest-chapters .section-title { margin-bottom: 16px; }
.latest-list { display: flex; flex-direction: column; gap: 10px; }
.latest-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); transition: all var(--transition); }
.latest-item:hover { border-color: var(--cyan); background: rgba(0,240,255,0.05); }
.latest-item .title { color: var(--text-secondary); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-item:hover .title { color: var(--cyan); }
.latest-item .time { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

.chapter-read-header { position: sticky; top: 0; z-index: 100; background: rgba(10,10,15,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 12px 0; }
.chapter-read-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chapter-read-header .back { color: var(--text-secondary); font-size: 0.9rem; }
.chapter-read-header .back:hover { color: var(--cyan); }
.chapter-read-header .chapter-title { flex: 1; text-align: center; font-size: 1rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reading-area { max-width: 760px; margin: 0 auto; padding: 30px 20px 60px; }
.chapter-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.chapter-breadcrumb a { color: var(--text-secondary); }
.chapter-breadcrumb a:hover { color: var(--cyan); }
.chapter-breadcrumb span { color: var(--text-muted); }
.chapter-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 24px; font-size: 0.9rem; }
.chapter-nav.top { margin-bottom: 30px; }
.chapter-nav.bottom { margin-top: 40px; margin-bottom: 20px; }
.chapter-nav .nav-prev, .chapter-nav .nav-next { flex: 1; min-width: 0; }
.chapter-nav .nav-next { text-align: right; }
.chapter-nav .nav-center { flex: 0 0 auto; text-align: center; }
.chapter-nav a { color: var(--text-secondary); padding: 6px 10px; border-radius: var(--radius-sm); transition: all var(--transition); }
.chapter-nav a:hover { color: var(--cyan); background: var(--cyan-dim); }
.chapter-nav span { color: var(--text-disabled); }
.chapter-heading { text-align: center; margin-bottom: 30px; }
.chapter-heading h1 { font-size: 1.8rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.chapter-heading .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; color: var(--text-muted); font-size: 0.9rem; }
.chapter-heading .meta span { display: inline-flex; align-items: center; gap: 4px; }
.chapter-page-info { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); min-height: 1.4em; }
.chapter-content { margin-bottom: 20px; }
.chapter-body { font-size: 1.1rem; line-height: 1.9; color: var(--text-secondary); text-align: justify; }
.chapter-body p { margin-bottom: 1.4em; text-indent: 2em; }
.chapter-body p:first-of-type { text-indent: 0; }
.chapter-body p:first-of-type::first-letter { font-size: 2.4em; float: left; line-height: 1; margin-right: 8px; color: var(--cyan); text-shadow: 0 0 12px var(--cyan-glow); }
.chapter-content .vip-chapter-notice { margin-bottom: 24px; padding: 16px 20px; background: linear-gradient(135deg, rgba(255,0,110,0.08), rgba(0,240,255,0.05)); border: 1px solid rgba(255,0,110,0.2); border-radius: var(--radius-md); }
.chapter-content .vip-chapter-notice .vip-notice-title { font-weight: 600; color: var(--magenta); margin-bottom: 6px; }
.chapter-content .vip-chapter-notice p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.chapter-content .vip-chapter-unlocked { margin-top: 24px; padding: 16px 20px; text-align: center; background: var(--cyan-dim); border: 1px solid rgba(0,240,255,0.2); border-radius: var(--radius-md); color: var(--cyan); font-size: 0.9rem; }

body.theme-dark { background: #050508; }
body.theme-dark .chapter-body { color: #b8b8c8; }
body.theme-yellow { background: #1a1810; }
body.theme-yellow .chapter-body { color: #c8c0a0; }
body.theme-green { background: #0f1a15; }
body.theme-green .chapter-body { color: #b0c8b8; }
.font-small .chapter-body { font-size: 1rem; }
.font-medium .chapter-body { font-size: 1.1rem; }
.font-large .chapter-body { font-size: 1.25rem; }

/* .reading-controls 已改为 .chapter-nav.bottom，不再使用 fixed 定位 */
.settings-panel { position: fixed; top: 60px; right: 20px; width: 240px; background: var(--bg-card); border: 1px solid var(--border-glow); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg), 0 0 20px rgba(0,240,255,0.1); backdrop-filter: blur(12px); z-index: 101; display: none; }
.settings-panel.active { display: block; }
.settings-panel h4 { font-size: 0.95rem; margin-bottom: 12px; }
.font-control, .theme-control { display: flex; gap: 8px; margin-bottom: 16px; }
.font-control a, .theme-control a { flex: 1; padding: 8px; text-align: center; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-secondary); }
.font-control a:hover, .font-control a.active, .theme-control a:hover, .theme-control a.active { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }

.vip-paywall { margin-top: 40px; padding: 36px 28px; text-align: center; background: linear-gradient(135deg, rgba(255,0,110,0.08), rgba(0,240,255,0.05)); border: 1px solid rgba(255,0,110,0.2); border-radius: var(--radius-lg); }
.vip-paywall .paywall-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; color: var(--text-primary); }
.vip-paywall .paywall-desc { color: var(--text-muted); margin-bottom: 12px; line-height: 1.7; }
.vip-paywall .paywall-desc strong { color: var(--magenta); }
.vip-paywall .paywall-tip { color: var(--text-disabled); font-size: 0.85rem; margin-bottom: 20px; }
.vip-paywall .unlock-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.vip-paywall .btn { min-width: 120px; }
.vip-paywall .lock-icon { font-size: 2.5rem; color: var(--magenta); margin-bottom: 16px; text-shadow: 0 0 16px var(--magenta-glow); }
.vip-paywall h3 { font-size: 1.2rem; margin-bottom: 8px; }
.vip-paywall p { color: var(--text-muted); margin-bottom: 20px; }
.vip-paywall .cost { font-size: 1.4rem; color: var(--magenta); font-weight: 700; margin-bottom: 20px; text-shadow: 0 0 12px var(--magenta-glow); }
.vip-unlocked { margin-top: 40px; padding: 30px; text-align: center; background: var(--cyan-dim); border: 1px solid rgba(0,240,255,0.2); border-radius: var(--radius-lg); }
.vip-unlocked h3 { color: var(--cyan); margin-bottom: 8px; }
.vip-unlocked p { color: var(--text-secondary); }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; overflow: hidden; }
.auth-page::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 30% 30%, rgba(0,240,255,0.08) 0%, transparent 40%), radial-gradient(circle at 70% 70%, rgba(255,0,110,0.06) 0%, transparent 40%); animation: authGlow 20s linear infinite; z-index: -1; }
@keyframes authGlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-card); border: 1px solid var(--border-glow); border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-lg), 0 0 40px rgba(0,240,255,0.1); backdrop-filter: blur(16px); }
.auth-card h1 { text-align: center; font-size: 1.6rem; margin-bottom: 8px; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: 0.9rem; }
.auth-card .btn { width: 100%; margin-top: 10px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 20px; font-size: 0.9rem; }
.captcha-row { display: flex; gap: 12px; }
.captcha-row .form-control { flex: 1; }
.captcha-img { height: 48px; border-radius: var(--radius-md); border: 1px solid var(--border); cursor: pointer; background: var(--bg-tertiary); }

/* 用户中心 */
.user-hero { padding: 40px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.user-profile-card { display: flex; gap: 24px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); }
.user-avatar-large { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--cyan); object-fit: cover; box-shadow: 0 0 24px var(--cyan-glow); }
.user-info-main { flex: 1; min-width: 0; }
.user-info-main h2 { font-size: 1.5rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-level { display: inline-flex; align-items: center; padding: 4px 12px; background: linear-gradient(135deg, var(--cyan-dim), var(--magenta-dim)); border: 1px solid var(--cyan); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--cyan); }
.user-level-bar { margin-top: 12px; max-width: 420px; }
.level-progress-wrap { height: 10px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; border: 1px solid var(--border); }
.level-progress { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); border-radius: var(--radius-full); box-shadow: 0 0 12px var(--cyan-glow); transition: width 0.6s ease; }
.level-progress-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.user-stats { display: flex; gap: 30px; margin-top: 16px; }
.user-stat { text-align: center; }
.user-stat strong { display: block; font-size: 1.4rem; color: var(--text-primary); }
.user-stat span { font-size: 0.8rem; color: var(--text-muted); }
.user-actions { display: flex; flex-direction: column; gap: 12px; }
.user-actions .btn { min-width: 140px; }
.user-actions .btn:disabled { opacity: 0.7; cursor: not-allowed; }
.user-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.user-quick-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.user-quick-item:hover, .user-quick-item.active { border-color: var(--cyan); box-shadow: 0 0 20px var(--cyan-glow); transform: translateY(-4px); }
.user-quick-item.active { background: rgba(0,240,255,0.06); }
.user-quick-item .icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--cyan-dim); color: var(--cyan); font-size: 1.3rem; box-shadow: 0 0 12px var(--cyan-glow); }
.user-quick-item.active .icon { background: var(--cyan); color: var(--bg-primary); }
.user-quick-item span { font-size: 0.95rem; color: var(--text-secondary); }
.user-quick-item.active span { color: var(--cyan); }

/* 我的书架 - 信息列表 */
.bookshelf-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 30px; }
.bookshelf-item { display: flex; align-items: stretch; gap: 16px; padding: 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--transition); }
.bookshelf-item:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.08); }
.bookshelf-cover { flex: 0 0 90px; width: 90px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.bookshelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bookshelf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bookshelf-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bookshelf-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bookshelf-title:hover { color: var(--cyan); }
.bookshelf-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.bookshelf-meta .sep { color: var(--text-disabled); }
.bookshelf-last, .bookshelf-read { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.bookshelf-last .label, .bookshelf-read .label { color: var(--text-disabled); flex-shrink: 0; }
.bookshelf-last .chapter-name, .bookshelf-read .chapter-name { color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 320px; vertical-align: middle; }
.bookshelf-last .chapter-name:hover, .bookshelf-read .chapter-name:hover { text-shadow: 0 0 8px var(--cyan-glow); }
.bookshelf-last .new-dot { padding: 2px 6px; border-radius: var(--radius-full); background: var(--magenta-dim); color: var(--magenta); font-size: 0.65rem; font-weight: 700; }
.bookshelf-progress { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.bookshelf-progress .progress { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.bookshelf-progress .progress-bar { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); border-radius: var(--radius-full); }
.bookshelf-progress .progress-text { flex: 0 0 auto; font-size: 0.8rem; color: var(--text-muted); min-width: 38px; text-align: right; }
.bookshelf-actions { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--border-light); }
.bookshelf-actions .btn { min-width: 100px; }
.bookshelf-pagination { margin-top: 10px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; transition: all var(--transition); }
.pagination a:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.pagination .current,
.pagination .active span { min-width: 44px; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), #00c8d6); border: 2px solid rgba(255,255,255,0.35); color: #fff; font-weight: 700; font-size: 1.05rem; box-shadow: 0 0 20px var(--cyan-glow), inset 0 0 10px rgba(255,255,255,0.25); transform: scale(1.1); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.pagination .disabled { color: var(--text-disabled); cursor: not-allowed; }

.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 40px 0 30px; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-brand .logo-text { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.footer-links h4 { font-size: 1rem; margin-bottom: 16px; color: var(--text-primary); }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; }
.friend-links-section { padding: 30px 0; border-bottom: 1px solid var(--border); }
.friend-links-section h4 { font-size: 1rem; margin-bottom: 16px; color: var(--text-primary); }
.friend-links-list { display: flex; flex-wrap: wrap; gap: 16px; }
.friend-links-list a { color: var(--text-muted); font-size: 0.9rem; }
.friend-links-list a:hover { color: var(--cyan); }

.flash-message { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 20px; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.flash-success { background: rgba(0,240,255,0.1); border: 1px solid rgba(0,240,255,0.25); color: var(--cyan); }
.flash-error { background: rgba(255,0,110,0.1); border: 1px solid rgba(255,0,110,0.25); color: var(--magenta); }

.comment-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.comment-form textarea { width: 100%; min-height: 100px; padding: 14px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); resize: vertical; margin-bottom: 12px; }
.comment-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.comment-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.comment-item { display: flex; gap: 14px; padding: 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); }
.comment-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--cyan); object-fit: cover; flex-shrink: 0; }
.comment-content { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-nickname { color: var(--cyan); font-weight: 500; font-size: 0.95rem; }
.comment-novel { color: var(--cyan); font-weight: 500; font-size: 0.95rem; }
.comment-novel:hover { text-shadow: 0 0 8px var(--cyan-glow); }
.comment-time { color: var(--text-muted); font-size: 0.8rem; }
.comment-text { color: var(--text-secondary); line-height: 1.7; }
.comment-actions { display: flex; gap: 16px; margin-top: 10px; }
.comment-actions a { font-size: 0.85rem; color: var(--text-muted); }
.comment-actions a:hover { color: var(--cyan); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-secondary); }

@media (max-width: 1199px) {
    .book-grid { grid-template-columns: repeat(4, 1fr); }
    .category-grid, .chapter-grid { grid-template-columns: repeat(4, 1fr); }
    .home-two-col, .rank-layout, .category-layout { grid-template-columns: 1fr; }
    .filter-sidebar, .rank-sidebar { position: static; }
    .bookshelf-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 991px) {
    .header-search { width: 180px; }
    .header-nav { gap: 2px; }
    .header-nav a { padding: 6px 12px; font-size: 0.9rem; }
    .book-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-content { text-align: center; }
    .hero-content p, .hero-stats { margin-left: auto; margin-right: auto; }
    .book-detail-main { grid-template-columns: 200px 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }
    body { padding-bottom: var(--mobile-bottom-bar); }
    .header-nav, .header-search { display: none; }
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--text-primary); font-size: 1.3rem; }
    .mobile-search-bar { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); background: rgba(10,10,15,0.8); backdrop-filter: blur(12px); }
    .mobile-search-inner { display: flex; gap: 8px; }
    .mobile-search-bar input { flex: 1; height: 40px; padding: 0 16px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-full); color: var(--text-primary); font-size: 0.9rem; }
    .mobile-search-bar input:focus { border-color: var(--cyan); outline: none; }
    .mobile-search-bar button { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--magenta)); color: var(--bg-primary); display: flex; align-items: center; justify-content: center; }
    .mobile-bottom-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--mobile-bottom-bar); background: rgba(10,10,15,0.95); backdrop-filter: blur(16px); border-top: 1px solid var(--border); z-index: 1000; }
    .mobile-bottom-bar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 0.7rem; transition: all var(--transition); }
    .mobile-bottom-bar a.active, .mobile-bottom-bar a:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
    .mobile-bottom-bar a .icon { font-size: 1.2rem; }
    .site-footer, .friend-links-section { margin-bottom: var(--mobile-bottom-bar); }
    .book-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .category-grid, .chapter-grid, .bookshelf-grid { grid-template-columns: repeat(2, 1fr); }
    .category-book-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .category-book-card { padding: 12px; }
    .category-book-summary { -webkit-line-clamp: 2; }
    .hot-recommend-grid { grid-template-columns: 1fr; gap: 14px; }
    .hot-recommend-card { padding: 12px; }
    .hot-recommend-cover { width: 80px; height: 107px; }
    .category-ranks-grid { grid-template-columns: 1fr; }
    .category-rank-list { grid-template-columns: 1fr 1fr; }
    .latest-table .latest-time { display: none; }
    .latest-table th:first-child, .latest-table td:first-child { width: 45%; }
    .latest-table th:nth-child(2), .latest-table td:nth-child(2) { width: 55%; }
    .data-table { font-size: 0.85rem; }
    .data-table td { padding: 10px 8px; }
    .latest-updates-section { margin-top: 16px; }
    .book-detail-main { grid-template-columns: 1fr; }
    .book-detail-cover { max-width: 180px; margin: 0 auto; }
    .book-detail-info h1 { justify-content: center; text-align: center; }
    .book-meta-row, .book-stats-row, .book-actions { justify-content: center; }
    .user-profile-card { flex-direction: column; text-align: center; }
    .user-level-bar { max-width: 100%; }
    .user-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .user-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .bookshelf-item { gap: 14px; padding: 14px; }
    .bookshelf-cover { flex: 0 0 80px; width: 80px; height: 107px; }
    .bookshelf-title { font-size: 0.95rem; }
    .bookshelf-last .chapter-name, .bookshelf-read .chapter-name { max-width: 220px; }
    .bookshelf-actions { padding-left: 12px; }
    .bookshelf-actions .btn { min-width: 90px; padding: 8px 12px; font-size: 0.8rem; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 16px; margin-bottom: 16px; }
    .footer-brand p { font-size: 0.85rem; line-height: 1.6; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
    .footer-links h4 { width: 100%; margin-bottom: 8px; font-size: 0.95rem; }
    .footer-links ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
    .footer-links a { font-size: 0.85rem; }
    .footer-bottom { padding-top: 12px; font-size: 0.8rem; }
    .site-footer { padding: 24px 0 16px; margin-top: 30px; }
    .reading-area { padding: 20px 16px 40px; }
    .chapter-breadcrumb { margin-bottom: 16px; font-size: 0.8rem; }
    .chapter-nav { flex-direction: column; gap: 10px; padding: 12px; font-size: 0.9rem; }
    .chapter-nav .nav-prev, .chapter-nav .nav-next, .chapter-nav .nav-center { flex: none; width: 100%; text-align: center; }
    .chapter-nav a { display: block; padding: 8px; }
    .chapter-heading { margin-bottom: 24px; }
    .chapter-heading h1 { font-size: 1.3rem; }
    .chapter-heading .meta { flex-direction: column; gap: 6px; font-size: 0.85rem; }
    .chapter-body { font-size: 1.05rem; }
    .vip-paywall { padding: 24px 16px; }
    .vip-paywall .unlock-form { flex-direction: column; }
    .vip-paywall .btn { width: 100%; }
    .data-table th:nth-child(4), .data-table th:nth-child(5), .data-table td:nth-child(4), .data-table td:nth-child(5) { display: none; }
    .rank-filter-bar { padding: 16px; }
    .rank-filter-row { gap: 10px; }
    .rank-filter-label { width: 36px; padding-top: 6px; font-size: 0.85rem; }
    .rank-filter-option { padding: 5px 12px; font-size: 0.8rem; }
    .rank-result-item { gap: 12px; padding: 12px; }
    .rank-result-cover { flex: 0 0 80px; width: 80px; height: 107px; }
    .rank-result-number { width: 36px; height: 36px; font-size: 1rem; }
    .rank-result-title { font-size: 0.95rem; }
    .rank-result-meta .meta-words,
    .rank-result-meta .meta-chapters { display: none; }
    .rank-result-summary { -webkit-line-clamp: 1; }
    .rank-result-latest .chapter-name { max-width: 160px; }
    .rank-result-latest .update-time { margin-left: 0; }
    .rank-result-score { flex: 0 0 80px; padding-left: 12px; }
    .rank-result-score strong { font-size: 1rem; }
    .completed-table th,
    .completed-table td { padding: 12px 8px; font-size: 0.85rem; }
    .completed-table .col-title { width: 40%; }
    .completed-table .col-chapter { width: 40%; }
    .completed-table .col-status { width: 20%; }
    .completed-table .col-words,
    .completed-table .col-author,
    .completed-table .col-time { display: none; }
    .search-result-item { gap: 12px; padding: 12px; }
    .search-result-cover { flex: 0 0 80px; width: 80px; height: 107px; }
    .search-result-title { font-size: 0.95rem; }
    .search-result-meta .meta-words,
    .search-result-meta .meta-chapters { display: none; }
    .search-result-summary { -webkit-line-clamp: 1; }
    .search-result-latest .chapter-name { max-width: 160px; }
    .search-result-latest .update-time { margin-left: 0; }
}

@media (max-width: 576px) {
    .book-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 2rem; }
    .hero-stats { gap: 20px; }
    .auth-card { padding: 28px 20px; }
    .chapter-grid, .bookshelf-grid { grid-template-columns: 1fr; }
    .bookshelf-item { flex-wrap: wrap; }
    .bookshelf-info { width: calc(100% - 96px); }
    .bookshelf-actions { flex-direction: row; width: 100%; padding-left: 0; padding-top: 12px; border-left: 0; border-top: 1px solid var(--border-light); justify-content: flex-end; }
    .bookshelf-actions .btn { flex: 1; max-width: 120px; }
    .book-detail-main { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .book-detail-cover { flex: 0 0 auto; width: 140px; margin: 0 auto; }
    .book-detail-info { align-items: center; }
    .book-meta-row { justify-content: center; }
    .book-stats-row { justify-content: center; }
    .book-actions { justify-content: center; }
    .book-tags { justify-content: center; }
    .chapter-item { padding: 12px; }
    .chapter-directory { padding: 16px; }
    .chapter-directory-header { flex-direction: column; align-items: flex-start; }
    .user-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-tabs { gap: 6px; }
    .filter-tab { padding: 6px 12px; font-size: 0.85rem; }
    .rank-type-tab { padding: 8px 14px; font-size: 0.8rem; }
    .rank-result-score { flex: 0 0 70px; padding-left: 10px; }
    .rank-result-score strong { font-size: 0.9rem; }
    .rank-result-score span { font-size: 0.7rem; }
}

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
