/* ============================================================
   起点风格小说系统 - 样式表
   ============================================================ */

/* 重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
a { text-decoration: none; color: #333; }
a:hover { color: #e65540; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

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

/* ============================================================
   顶部用户信息栏（与主站一致）
   ============================================================ */
.novel-topbar {
    background: #1a1a2e;
    color: #999;
    height: 36px;
    line-height: 36px;
    font-size: 12px;
    position: relative;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.novel-topbar a { color: #999; transition: color 0.2s; text-decoration: none; }
.novel-topbar a:hover { color: #fff; }
.novel-topbar-left,
.novel-topbar-right { display: flex; align-items: center; }
.novel-topbar-left { float: left; }
.novel-topbar-right { float: right; display: flex; align-items: center; gap: 8px; }
.novel-topbar-link { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.novel-topbar-home { color: #e65540 !important; font-weight: 600; }
.novel-topbar-icon { width: 14px; height: 14px; }
.novel-topbar-sep { color: #555; margin: 0 6px; }

/* 用户信息 */
.novel-topbar-user { display: flex; align-items: center; gap: 6px; }
.novel-topbar-avatar-placeholder {
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(135deg, #e65540, #ff7a66);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.novel-topbar-username a { font-weight: 500; color: #fff; }

/* 按钮 */
.novel-topbar-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 24px; padding: 2px 12px; font-size: 12px; line-height: 1.4;
    border-radius: 4px; border: 1px solid transparent; cursor: pointer;
    transition: all 0.2s;
}
.novel-topbar-btn-primary { background: #e65540; color: #fff !important; border-color: #e65540; }
.novel-topbar-btn-primary:hover { background: #d44a35; }
.novel-topbar-btn-outline { background: transparent; color: #ccc !important; border-color: #555; }
.novel-topbar-btn-outline:hover { border-color: #e65540; color: #e65540 !important; }

/* 网站导航 Mega Menu */
.novel-topbar-nav-trigger { position: relative; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.novel-topbar-arrow { width: 12px; height: 12px; transition: transform 0.2s; }
.novel-topbar-nav-trigger:hover .novel-topbar-arrow { transform: rotate(180deg); }
.novel-topbar-mega-menu {
    display: none; position: absolute; top: 100%; right: 0;
    background: #fff; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 16px; z-index: 300; margin-top: 4px; min-width: 440px;
}
.novel-topbar-nav-trigger:hover .novel-topbar-mega-menu { display: block; }
.novel-mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.novel-mega-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; border-radius: 8px; transition: all 0.2s;
}
.novel-mega-item:hover { background: #fff0ed; }
.novel-mega-icon { font-size: 22px; }
.novel-mega-text { font-size: 12px; color: #666; }
.novel-mega-item:hover .novel-mega-text { color: #e65540; }

/* 顶部导航 */
.header { background: #fff; border-bottom: 1px solid #e8e8e8; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; padding: 12px 0; gap: 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: bold; color: #e65540; flex-shrink: 0; }
.logo-icon { font-size: 28px; }

.search-box { flex: 1; max-width: 400px; position: relative; }
.search-box input { width: 100%; height: 40px; border: 2px solid #e65540; border-radius: 20px; padding: 0 45px 0 18px; font-size: 14px; outline: none; }
.search-box input:focus { border-color: #e65540; box-shadow: 0 0 0 3px rgba(230,85,64,0.1); }
.search-box button { position: absolute; right: 2px; top: 2px; width: 36px; height: 36px; border: none; background: #e65540; color: #fff; border-radius: 50%; cursor: pointer; font-size: 16px; }
.search-suggest { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); display: none; z-index: 10; }
.search-suggest.show { display: block; }
.search-suggest-item { padding: 10px 18px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.search-suggest-item:hover { background: #f8f8f8; }

.header-nav { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.header-nav a { font-size: 14px; color: #666; padding: 5px 0; }
.header-nav a:hover { color: #e65540; }
.btn-register { background: #e65540; color: #fff !important; padding: 8px 20px !important; border-radius: 20px; }
.btn-register:hover { background: #d44a35; }
.user-name { color: #e65540 !important; font-weight: 500; }
.nav-author { color: #ff6b35 !important; font-weight: 500; }
.nav-author:hover { color: #e65540 !important; }
.nav-admin { color: #9b59b6 !important; font-weight: 500; }
.nav-admin:hover { color: #8e44ad !important; }

/* 分类导航 */
.category-nav { background: #fff; border-bottom: 1px solid #e8e8e8; }
.category-list { display: flex; gap: 5px; padding: 10px 0; overflow-x: auto; }
.category-item { display: flex; align-items: center; gap: 4px; padding: 6px 16px; border-radius: 20px; font-size: 14px; color: #666; white-space: nowrap; transition: all 0.2s; }
.category-item:hover { background: #fff0ed; color: #e65540; }
.cat-icon { font-size: 16px; }

/* 轮播区域 */
.banner-section { padding: 20px 0; }
.banner-wrapper { flex: 1; position: relative; border-radius: 12px; overflow: hidden; }
.banner-slider { position: relative; height: 300px; }
.banner-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.5s; }
.banner-slide.active { opacity: 1; }
.banner-content { text-align: center; color: #fff; }
.banner-content h2 { font-size: 32px; margin-bottom: 15px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.btn-read { display: inline-block; padding: 12px 30px; background: rgba(255,255,255,0.2); border: 2px solid #fff; border-radius: 25px; color: #fff; font-size: 16px; transition: all 0.3s; }
.btn-read:hover { background: #fff; color: #e65540; }
.banner-dots { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.dot.active { background: #fff; width: 24px; border-radius: 5px; }

/* 排行榜侧边栏 */
.rank-sidebar { width: 280px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 15px; }
.rank-title { font-size: 16px; margin-bottom: 10px; }
.rank-tabs { display: flex; gap: 5px; margin-bottom: 10px; }
.rank-tab { padding: 5px 12px; font-size: 13px; color: #666; cursor: pointer; border-radius: 15px; }
.rank-tab.active { background: #e65540; color: #fff; }
.rank-list { display: none; }
.rank-list.active { display: block; }
.rank-item { display: flex; align-items: center; padding: 8px 0; font-size: 13px; border-bottom: 1px solid #f5f5f5; }
.rank-item:hover { color: #e65540; }
.rank-num { width: 22px; height: 22px; border-radius: 4px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 8px; flex-shrink: 0; }
.rank-num.top { background: #e65540; color: #fff; }
.rank-title-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { color: #999; font-size: 12px; flex-shrink: 0; }

/* 区块 */
.section { padding: 30px 0; }
.section-gray { background: #f0f0f0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 20px; color: #333; }
.more-link { color: #999; font-size: 14px; }
.more-link:hover { color: #e65540; }

/* 小说卡片网格 */
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.book-grid-6 { grid-template-columns: repeat(6, 1fr); }

.book-card { background: #fff; border-radius: 12px; overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.book-cover { position: relative; width: 100%; padding-top: 133%; background: linear-gradient(135deg, #f5f5f5, #e0e0e0); overflow: hidden; display: flex; align-items: flex-start; justify-content: center; }
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-cover .placeholder { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; opacity: 0.25; }
.badge-vip { position: absolute; top: 8px; right: 8px; background: #ff9900; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.badge-complete { position: absolute; top: 8px; right: 8px; background: #52c41a; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.book-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.book-title { font-size: 15px; font-weight: 500; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-author { font-size: 13px; color: #999; margin-bottom: 8px; }
.book-intro { font-size: 13px; color: #666; line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: #999; }
.book-word { background: #f5f5f5; padding: 2px 8px; border-radius: 10px; }
.book-status { background: #fff0ed; color: #e65540; padding: 2px 8px; border-radius: 10px; }
.book-rating { color: #ff9900; }

/* 小卡片 */
.book-card-sm .book-cover { padding-top: 150%; }
.book-card-sm .book-info { padding: 8px; }
.book-card-sm .book-title { font-size: 14px; }
.book-card-sm .book-intro { -webkit-line-clamp: 1; }

/* 列表模式 */
.book-list { display: flex; flex-direction: column; gap: 15px; }
.book-list-item { display: flex; gap: 15px; background: #fff; padding: 15px; border-radius: 12px; transition: all 0.3s; }
.book-list-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.book-cover-sm { width: 80px; height: 107px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #f5f5f5, #e0e0e0); display: flex; align-items: center; justify-content: center; }
.book-cover-sm img { width: 100%; height: 100%; object-fit: cover; }
.book-list-info { flex: 1; }
.book-list-title { font-size: 16px; font-weight: 500; margin-bottom: 5px; }
.book-list-author { font-size: 13px; color: #999; margin-bottom: 8px; }
.book-list-intro { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-list-meta { display: flex; gap: 8px; }
.tag { font-size: 12px; color: #999; background: #f5f5f5; padding: 2px 10px; border-radius: 10px; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 5px; padding: 30px 0; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 14px; color: #666; }
.pagination a:hover { border-color: #e65540; color: #e65540; }
.pagination a.active { background: #e65540; color: #fff; border-color: #e65540; }
.pagination .ellipsis { display: inline-flex; align-items: center; padding: 0 5px; color: #999; }

/* 页脚 */
.footer { background: #fff; border-top: 1px solid #e8e8e8; padding: 30px 0; margin-top: 40px; }
.footer-hot-words { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.footer-hot-label { font-size: 13px; color: #666; font-weight: 500; }
.footer-hot-words a { font-size: 13px; color: #999; padding: 3px 10px; background: #f5f5f5; border-radius: 12px; transition: all 0.2s; }
.footer-hot-words a:hover { background: #e65540; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; }
.footer-links a { font-size: 13px; color: #999; }
.footer-links a:hover { color: #e65540; }
.footer-copyright { font-size: 13px; color: #bbb; text-align: center; }

/* 快捷操作 */
.quick-actions { display: flex; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.btn-checkin, .btn-task { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all 0.3s; }
.btn-checkin { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.btn-checkin:hover { transform: scale(1.05); }
.btn-checkin:disabled { background: #27ae60; cursor: not-allowed; }
.btn-task { background: #f5f5f5; color: #666; }
.btn-task:hover { background: #e65540; color: #fff; }

/* 通知徽章 */
.nav-notification { position: relative; }
.notification-badge { position: absolute; top: -8px; right: -12px; background: #e74c3c; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; display: none; }

/* 分类导航 */
.category-nav { background: #fff; border-bottom: 1px solid #e8e8e8; padding: 10px 0; }
.category-list { display: flex; gap: 15px; flex-wrap: wrap; }
.category-item { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 20px; font-size: 13px; color: #666; background: #f5f5f5; transition: all 0.2s; }
.category-item:hover { background: #e65540; color: #fff; }
.cat-icon { font-size: 16px; }

/* 响应式 */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-box { order: 3; max-width: 100%; flex-basis: 100%; }
    .header-nav { gap: 12px; }
    .banner-section .container { display: flex; flex-direction: column; }
    .rank-sidebar { width: 100%; }
    .banner-slider { height: 200px; }
    .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .book-grid-6 { grid-template-columns: repeat(3, 1fr); }
    .book-list-item { flex-direction: column; }
    .book-cover-sm { width: 100%; height: 150px; }
}
