/* ===== 全局变量 ===== */ :root { --bg-primary: #f8f5f0; --bg-card: #ffffff; --bg-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --text-primary: #2c2416; --text-secondary: #6b5d4f; --text-light: #9b8e80; --accent: #c17b4a; --accent-light: #e8a87c; --accent-dark: #a05c2c; --border: #e8e0d4; --shadow: 0 2px 12px rgba(44, 36, 22, 0.08); --shadow-hover: 0 8px 24px rgba(44, 36, 22, 0.15); --radius: 12px; --radius-sm: 8px; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; } /* ===== 导航栏 ===== */ .navbar { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); } .nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; } .nav-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--text-primary); } .logo-icon { font-size: 24px; } .nav-links { display: flex; gap: 24px; } .nav-link { text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-sm); transition: all 0.2s; } .nav-link:hover { color: var(--accent); background: rgba(193, 123, 74, 0.08); } .nav-link.active { color: var(--accent); background: rgba(193, 123, 74, 0.12); } .nav-update { font-size: 12px; color: var(--text-light); } /* ===== Hero 区 ===== */ .hero-section { position: relative; padding: 80px 0 60px; overflow: hidden; background: var(--bg-hero); } .hero-bg { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M50 25 L55 40 L70 40 L58 50 L63 65 L50 55 L37 65 L42 50 L30 40 L45 40 Z'/%3E%3C/g%3E%3C/svg%3E"); opacity: 0.6; } .hero-content { position: relative; text-align: center; color: #fff; max-width: 800px; margin: 0 auto; padding: 0 24px; } .hero-title { font-size: 36px; font-weight: 700; margin-bottom: 12px; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } .hero-subtitle { font-size: 16px; opacity: 0.9; margin-bottom: 40px; } .hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; } .hero-stat { text-align: center; } .hero-stat-value { font-size: 42px; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); } .hero-stat-label { font-size: 14px; opacity: 0.85; margin-top: 4px; } /* ===== 统计卡片 ===== */ .stats-cards-section { padding: 40px 0 20px; margin-top: -40px; position: relative; z-index: 10; } .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; } .stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; text-align: center; border: 1px solid var(--border); } .stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); } .stat-card-icon { font-size: 32px; margin-bottom: 12px; } .stat-card-value { font-size: 28px; font-weight: 800; color: var(--accent-dark); margin-bottom: 4px; } .stat-card-label { font-size: 13px; color: var(--text-secondary); } .stat-card-sub { font-size: 12px; color: var(--text-light); margin-top: 4px; } /* ===== Section 标题 ===== */ .section-title { font-size: 24px; font-weight: 700; margin-bottom: 32px; color: var(--text-primary); text-align: center; } /* ===== 图表区 ===== */ .charts-section { padding: 60px 0; } .charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .chart-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); } .chart-card.large { grid-column: 1 / -1; } .chart-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; } .chart-container { width: 100%; height: 320px; } /* ===== 读书排行 ===== */ .top-books-section { padding: 60px 0; background: rgba(193, 123, 74, 0.04); } .top-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; } .top-book-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border); cursor: pointer; } .top-book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); } .top-book-rank { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, 0.7); color: #ffd700; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; z-index: 5; } .top-book-cover { position: relative; width: 100%; height: 200px; object-fit: cover; background: var(--bg-primary); } .top-book-info { padding: 14px 16px; } .top-book-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .top-book-author { font-size: 12px; color: var(--text-light); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .top-book-time { font-size: 13px; color: var(--accent); font-weight: 600; } .top-book-tags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; } .top-book-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(193, 123, 74, 0.12); color: var(--accent-dark); } /* ===== 书架 ===== */ .shelf-section { padding: 60px 0; } .shelf-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; } .shelf-filters { display: flex; align-items: center; gap: 16px; } .shelf-search { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; width: 200px; background: var(--bg-card); color: var(--text-primary); } .shelf-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193, 123, 74, 0.15); } .filter-checkbox { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-secondary); cursor: pointer; } .shelf-info { font-size: 13px; color: var(--text-light); } .book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin-bottom: 32px; } .book-card { cursor: pointer; transition: transform 0.2s; } .book-card:hover { transform: translateY(-4px); } .book-cover-wrapper { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-primary); } .book-cover-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; } .book-card:hover .book-cover-img { transform: scale(1.05); } .book-finished-badge { position: absolute; top: 6px; right: 6px; background: #4caf50; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; } .book-top-badge { position: absolute; top: 6px; left: 6px; background: rgba(255, 215, 0, 0.9); color: #5d4037; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; } .book-title { font-size: 13px; font-weight: 500; margin-top: 8px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .book-author { font-size: 11px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ===== 分页 ===== */ .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; } .page-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 14px; transition: all 0.2s; } .page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } .page-btn:disabled { opacity: 0.4; cursor: not-allowed; } .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); } .page-info { font-size: 13px; color: var(--text-light); margin: 0 8px; } /* ===== 笔记区 ===== */ .notes-section { padding: 60px 0; background: rgba(193, 123, 74, 0.04); } .notes-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; } .note-stat { background: var(--bg-card); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--border); } .note-stat-value { font-size: 28px; font-weight: 800; color: var(--accent-dark); } .note-stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; } .notebooks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; } .notebook-card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; } .notebook-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); } .notebook-cover { width: 60px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow); } .notebook-info { flex: 1; min-width: 0; } .notebook-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .notebook-author { font-size: 12px; color: var(--text-light); margin-bottom: 8px; } .notebook-stats { display: flex; gap: 12px; flex-wrap: wrap; } .notebook-stat-item { font-size: 12px; color: var(--text-secondary); } .notebook-stat-item strong { color: var(--accent-dark); } .notebook-progress { margin-top: 8px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; } .notebook-progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; } /* ===== 页脚 ===== */ .footer { padding: 40px 0; text-align: center; color: var(--text-light); font-size: 13px; border-top: 1px solid var(--border); background: var(--bg-card); } .footer-hint { margin-top: 8px; font-size: 12px; opacity: 0.7; } /* ===== 加载动画 ===== */ .loading { display: flex; justify-content: center; align-items: center; padding: 60px 0; } .loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ===== 推荐发现区 ===== */ .discover-section { padding: 60px 0; } .discover-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; } .discover-tab { padding: 8px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; } .discover-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); } .discover-controls { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; } .btn-primary { padding: 8px 20px; border: none; border-radius: var(--radius-sm); background: var(--accent); color: #fff; cursor: pointer; font-size: 14px; font-weight: 500; transition: background 0.2s; } .btn-primary:hover { background: var(--accent-dark); } .btn-secondary { padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: 14px; transition: all 0.2s; } .btn-secondary:hover { border-color: var(--accent); color: var(--accent); } .search-box { display: flex; gap: 12px; max-width: 500px; margin: 0 auto 24px; } .search-input { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-card); color: var(--text-primary); } .search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193, 123, 74, 0.15); } .discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; } .discover-card { background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; } .discover-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); } .discover-cover { width: 100%; height: 180px; object-fit: cover; background: var(--bg-primary); } .discover-info { padding: 14px 16px; } .discover-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .discover-author { font-size: 12px; color: var(--text-light); margin-bottom: 6px; } .discover-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .discover-rating { font-size: 13px; color: #e65100; font-weight: 600; } .discover-rating-label { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #fff3e0; color: #e65100; } .discover-reading-count { font-size: 11px; color: var(--text-light); } .discover-reason { margin-top: 6px; font-size: 12px; color: var(--accent); background: rgba(193, 123, 74, 0.08); padding: 4px 8px; border-radius: 4px; } .discover-category { font-size: 11px; color: var(--text-light); margin-top: 4px; } /* ===== 弹窗通用 ===== */ .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: flex-start; padding: 40px 20px; overflow-y: auto; } .modal-overlay.active { display: flex; } .modal-content { background: var(--bg-card); border-radius: var(--radius); max-width: 700px; width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); margin-bottom: 40px; } .modal-close { position: absolute; top: 12px; right: 16px; font-size: 28px; color: var(--text-light); cursor: pointer; z-index: 10; line-height: 1; } .modal-close:hover { color: var(--text-primary); } .modal-body { padding: 32px; } /* ===== 书籍详情弹窗 ===== */ .book-detail-modal .detail-header { display: flex; gap: 20px; margin-bottom: 24px; } .book-detail-modal .detail-cover { width: 120px; height: 160px; border-radius: 8px; object-fit: cover; box-shadow: var(--shadow); flex-shrink: 0; } .book-detail-modal .detail-meta { flex: 1; } .book-detail-modal .detail-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.4; } .book-detail-modal .detail-author { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; } .book-detail-modal .detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .book-detail-modal .detail-tag { font-size: 12px; padding: 2px 10px; border-radius: 10px; background: rgba(193, 123, 74, 0.1); color: var(--accent-dark); } .book-detail-modal .detail-progress-info { margin-top: 12px; padding: 12px; background: var(--bg-primary); border-radius: var(--radius-sm); } .book-detail-modal .detail-progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 8px; } .book-detail-modal .detail-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; } .book-detail-modal .detail-intro { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); } .book-detail-modal .detail-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); } .book-detail-modal .detail-info-item { font-size: 13px; color: var(--text-secondary); } .book-detail-modal .detail-info-item strong { color: var(--text-primary); } .book-detail-modal .detail-actions { margin-top: 20px; display: flex; gap: 12px; } /* ===== 笔记详情弹窗 ===== */ .notes-detail-modal { max-width: 800px; } .notes-detail-modal .notes-header { display: flex; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); } .notes-detail-modal .notes-cover { width: 60px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow); } .notes-detail-modal .notes-title { font-size: 18px; font-weight: 700; color: var(--text-primary); } .notes-detail-modal .notes-author { font-size: 13px; color: var(--text-light); margin-top: 4px; } .notes-detail-modal .notes-counts { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--text-secondary); } .notes-detail-modal .notes-counts strong { color: var(--accent-dark); } .notes-detail-modal .notes-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 20px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .notes-detail-modal .chapter-group { margin-bottom: 20px; } .notes-detail-modal .chapter-title { font-size: 13px; font-weight: 600; color: var(--accent-dark); margin-bottom: 8px; padding: 4px 0; border-left: 3px solid var(--accent); padding-left: 10px; } .notes-detail-modal .highlight-item { padding: 10px 14px; background: var(--bg-primary); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px; color: var(--text-primary); line-height: 1.7; border-left: 3px solid var(--accent-light); } .notes-detail-modal .highlight-date { font-size: 11px; color: var(--text-light); margin-top: 4px; } .notes-detail-modal .review-item { padding: 10px 14px; background: #fff8e1; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px; color: var(--text-primary); line-height: 1.7; border-left: 3px solid #ffc107; } .notes-detail-modal .review-meta { font-size: 11px; color: var(--text-light); margin-top: 4px; } .notes-detail-modal .review-star { color: #ff9800; } .notes-detail-modal .empty-state { text-align: center; padding: 40px; color: var(--text-light); font-size: 14px; } /* ===== 响应式 ===== */ @media (max-width: 768px) { .nav-links { display: none; } .hero-title { font-size: 24px; } .hero-stats { gap: 24px; } .hero-stat-value { font-size: 32px; } .charts-grid { grid-template-columns: 1fr; } .chart-card.large { grid-column: auto; } .book-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; } .top-books-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }