Download static/css/index.css from Elvis85/bookrank: direct link, hf CLI and curl.
- Browser
- Download file 28.6 kB
-
https://huggingface.co/spaces/Elvis85/bookrank/resolve/main/static/css/index.css
- Command line
-
hf download hf://spaces/Elvis85/bookrank/static/css/index.css
-
curl -L -o index.css https://huggingface.co/spaces/Elvis85/bookrank/resolve/main/static/css/index.css
28.6 kB
/* ============================================
BookRank 首页样式 (Notion 设计系统)
============================================ */
/* 翻译进度条 - 改为底部轻量指示器 */
.translation-progress {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--bg-primary);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
color: var(--text-primary);
padding: 8px 20px;
z-index: 9999;
display: flex;
align-items: center;
gap: 12px;
font-size: 0.8125rem;
transform: translateY(100%);
transition: transform 0.3s ease;
border-top: 1px solid var(--border-color);
}
.translation-progress.active {
transform: translateY(0);
}
.progress-bar {
flex: 1;
max-width: 200px;
height: 4px;
background: var(--bg-tertiary);
border-radius: 2px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--primary-gradient);
width: 0%;
transition: width 0.3s ease;
border-radius: 2px;
}
.progress-text {
white-space: nowrap;
color: var(--text-secondary);
}
/* 页面头部 */
.page-header {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 2rem 2.5rem;
margin-bottom: 1.5rem;
position: relative;
overflow: hidden;
}
.page-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background: var(--primary-gradient);
}
.page-title {
font-size: 1.75rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.5rem 0;
display: flex;
align-items: center;
gap: 0.75rem;
letter-spacing: -0.625px;
}
.page-title .text-gold {
color: var(--primary-color);
}
.page-subtitle {
margin: 0;
font-size: 0.875rem;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.cache-badge {
background: var(--badge-bg);
color: var(--badge-text);
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 600;
}
/* 筛选栏 */
.filter-bar {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: flex-end;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 1.25rem 1.5rem;
margin-bottom: 1.5rem;
}
.filter-group {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.filter-group.search-box {
flex: 1;
min-width: 200px;
position: relative;
}
.filter-label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
letter-spacing: 0.125px;
text-transform: uppercase;
}
.filter-select {
padding: 0.5rem 0.875rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-tertiary);
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
min-height: 40px;
min-width: 140px;
}
.filter-select:hover {
border-color: var(--link-blue);
}
.filter-select:focus {
outline: none;
border-color: var(--link-blue);
box-shadow: 0 0 0 3px rgba(0, 114, 245, 0.15);
}
.search-input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.search-input-wrapper .icon {
position: absolute;
right: 12px;
color: var(--text-muted);
pointer-events: none;
}
.search-clear-btn {
position: absolute;
right: 32px;
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: 4px;
/* WCAG 2.5.8:实测命中区仅 8×8px(图标本身的尺寸)。
用 min-width/min-height 扩大热区,图标视觉尺寸不变。 */
min-width: 24px;
min-height: 24px;
border-radius: 4px;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
}
.search-clear-btn:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
}
.search-suggestions {
/* 修复(dsh-design-audit 实测):初始收起态必须落在**类**上。
原先只有模板里的内联 style="display: none;" —— i18n 改写过程会把这个内联样式清掉
(实测 DOM 上 el.style.display === ""),于是面板在页面加载后直接以 block 呈现:
它的 top:100% 正好压住下方的视图密度切换器(#grid-view-featured),
用户开局既看不到也点不到该切换器。
JS 用内联 style.display='block' 打开面板时仍会覆盖本声明,交互行为不变。 */
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
margin-top: 8px;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 12px;
box-shadow: var(--shadow-lg);
z-index: 100;
overflow: hidden;
max-height: 300px;
overflow-y: auto;
}
.suggestions-header {
padding: 0.75rem 1rem;
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
background: var(--bg-tertiary);
text-transform: uppercase;
letter-spacing: 0.125px;
}
.suggestions-list {
list-style: none;
padding: 0;
margin: 0;
}
.suggestion-item {
padding: 0.75rem 1rem;
display: flex;
align-items: center;
gap: 0.75rem;
cursor: pointer;
transition: background 0.15s ease;
font-size: 0.875rem;
color: var(--text-primary);
}
.suggestion-item:hover {
background: var(--bg-tertiary);
}
.suggestion-item .icon {
color: var(--text-muted);
flex-shrink: 0;
}
.suggestion-item .delete-history {
margin-left: auto;
opacity: 0;
transition: opacity 0.2s ease;
}
.suggestion-item:hover .delete-history {
opacity: 1;
}
.suggestion-item .delete-history:hover {
color: var(--ship-red);
}
.filter-input {
width: 100%;
padding: 0.5rem 2.5rem 0.5rem 0.875rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-tertiary);
color: var(--text-primary);
font-size: 0.875rem;
transition: all 0.2s ease;
min-height: 40px;
}
.filter-input::placeholder {
color: var(--text-muted);
}
.filter-input:focus {
outline: none;
border-color: var(--link-blue);
box-shadow: 0 0 0 3px rgba(0, 114, 245, 0.15);
background: var(--bg-card);
}
.filter-actions {
display: flex;
gap: 0.5rem;
}
.view-toggle {
display: flex;
gap: 0.25rem;
background: var(--bg-tertiary);
border-radius: 8px;
padding: 0.25rem;
}
/* 按钮样式 */
.btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
border-radius: 9999px;
background: var(--bg-card);
color: var(--text-secondary);
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
min-height: 40px;
white-space: nowrap;
}
.btn:hover {
color: var(--text-primary);
border-color: var(--text-muted);
}
.btn-primary {
background: var(--link-blue);
color: var(--white);
border-color: var(--link-blue);
}
.btn-primary:hover {
background: var(--develop-blue);
border-color: var(--develop-blue);
color: var(--white);
}
.btn-secondary {
background: var(--bg-tertiary);
border-color: var(--border-color);
}
.btn-secondary:hover {
background: var(--gray-100);
}
.btn-icon {
padding: 0.375rem;
min-height: 36px;
min-width: 36px;
justify-content: center;
}
.btn-icon.active {
background: var(--badge-bg);
color: var(--badge-text);
border-color: rgba(0, 104, 214, 0.2);
}
.btn-sm {
padding: 0.375rem 0.75rem;
font-size: 0.8125rem;
min-height: 32px;
}
/* 导出操作栏 */
.export-actions-bar {
display: flex;
justify-content: space-between;
align-items: center;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 0.75rem 1.25rem;
margin-bottom: 1.5rem;
}
.export-info {
font-size: 0.875rem;
color: var(--text-secondary);
}
.export-info strong {
color: var(--text-primary);
}
.export-buttons {
display: flex;
gap: 0.5rem;
}
/* 网格视图 */
.books-grid {
display: grid;
/* 320px(原 280px):简介不再截断后需要更宽的正文栏,
窄卡片会把长简介挤成"每行几个字"的窄柱。 */
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.5rem;
}
/* 书籍卡片 */
.books-grid.bestseller-grid {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
.books-grid.bestseller-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (max-width: 768px) {
.books-grid.bestseller-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 480px) {
.books-grid.bestseller-grid {
grid-template-columns: minmax(0, 1fr);
}
}
.card {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
overflow: hidden;
cursor: pointer;
transition: all 0.25s ease;
position: relative;
}
.card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-hover);
border-color: var(--link-blue);
}
.card:active {
transform: translateY(-2px);
}
.card-image {
/* 样式由 components.css 统一管理(方案 A:3:2 容器内嵌 2:3 画框) */
/* 保留此处以便未来 index.html 专属微调;当前无覆盖 */
}
/* .card-category-tag 样式由 components.css 统一管理(使用 --badge-bg/--badge-text 主题色变量),
避免此处覆盖导致夜晚模式对比度问题(--white 在夜晚模式被改写为深色) */
/* Override components.css badge styles */
.books-grid .card .card-image .card-badge {
position: absolute !important;
top: 12px !important;
right: 12px !important;
bottom: auto !important;
left: auto !important;
width: 36px !important;
height: 36px !important;
min-width: 36px !important;
min-height: 36px !important;
max-width: 36px !important;
max-height: 36px !important;
border-radius: 50% !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
font-size: 0.875rem !important;
font-weight: 700 !important;
color: white !important;
z-index: 20 !important;
flex-shrink: 0 !important;
box-shadow: none !important;
text-shadow: none !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
line-height: 1 !important;
transform: none !important;
transition: none !important;
}
.books-grid .card .card-image .card-badge.gold {
background: linear-gradient(135deg, #f7c948, #e5a100) !important;
}
.books-grid .card .card-image .card-badge.silver {
background: linear-gradient(135deg, #b0bec5, #78909c) !important;
}
.books-grid .card .card-image .card-badge.bronze {
background: linear-gradient(135deg, #d4a76a, #b8860b) !important;
}
.books-grid .card .card-image .card-badge.other {
background: rgba(0, 0, 0, 0.5) !important;
}
.books-grid .card .card-image .rank-change {
position: absolute !important;
top: 54px !important;
right: 12px !important;
bottom: auto !important;
left: auto !important;
padding: 0.15rem 0.6rem !important;
border-radius: 9999px !important;
font-size: 0.6875rem !important;
font-weight: 700 !important;
white-space: nowrap !important;
text-align: center !important;
min-width: 40px !important;
width: auto !important;
height: auto !important;
display: inline-block !important;
z-index: 20 !important;
flex-shrink: 0 !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
box-shadow: none !important;
text-shadow: none !important;
line-height: 1.2 !important;
}
.books-grid .card .card-image .rank-change.up { background: #1aae39 !important; color: white !important; }
.books-grid .card .card-image .rank-change.down { background: #dd5b00 !important; color: white !important; }
.books-grid .card .card-image .rank-change.new { background: #ff64c8 !important; color: white !important; }
.card-content {
padding: 1.25rem;
}
.card-rank-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.card-rank-badge {
font-size: 0.75rem;
font-weight: 600;
color: var(--link-blue);
background: var(--badge-bg);
padding: 0.125rem 0.5rem;
border-radius: 9999px;
}
.card-weeks {
font-size: 0.75rem;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 0.25rem;
}
.card-title {
font-size: 1rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.375rem 0;
line-height: 1.3;
letter-spacing: -0.125px;
position: relative;
}
.translation-badge {
display: inline-block;
margin-left: 0.375rem;
padding: 0.125rem 0.375rem;
background: var(--badge-bg);
color: var(--badge-text);
font-size: 0.625rem;
font-weight: 700;
border-radius: 4px;
vertical-align: middle;
}
.card-author {
font-size: 0.8125rem;
color: var(--text-secondary);
margin: 0 0 0.5rem 0;
}
.card-isbn {
font-size: 0.75rem;
color: var(--text-muted);
margin: 0 0 0.5rem 0;
font-family: monospace;
}
/* 卡片元信息网格 - 选书关键信息 */
.card-meta-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.375rem;
margin-bottom: 0.5rem;
}
.card-meta-item {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.6875rem;
color: var(--text-secondary);
background: var(--bg-tertiary);
padding: 0.25rem 0.5rem;
border-radius: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-meta-item .icon {
flex-shrink: 0;
color: var(--text-muted);
}
.card-meta-item.isbn {
font-family: 'SF Mono', 'Courier New', monospace;
letter-spacing: -0.5px;
}
/* 首页网格:出版社/ISBN 居中显示(卡片为居中文案排版) */
.charts-page .books-grid.bestseller-grid .card-pub-isbn {
justify-content: center;
text-align: center;
margin-top: 2px;
}
.card-desc {
font-size: 0.8125rem;
color: var(--text-secondary);
margin: 0;
line-height: 1.5;
/* 完整展示:不设 -webkit-line-clamp / overflow: hidden(截断源见 components.css) */
overflow-wrap: break-word;
word-break: break-word;
}
/* 列表视图 */
.books-list {
display: none;
}
.books-list.active {
display: block;
}
.books-grid.active {
display: grid;
}
.books-grid:not(.active) {
display: none;
}
.list-item {
display: flex;
gap: 1.25rem;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 1.25rem;
margin-bottom: 1rem;
cursor: pointer;
transition: all 0.25s ease;
position: relative;
}
.list-item:hover {
transform: translateX(4px);
box-shadow: var(--shadow-md);
border-color: var(--link-blue);
}
.list-item-image {
flex-shrink: 0;
}
.list-item-image img {
width: 80px;
height: 120px;
object-fit: cover;
border-radius: 8px;
box-shadow: var(--shadow-sm);
}
.list-item-content {
flex: 1;
min-width: 0;
}
.list-item-header {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.375rem;
flex-wrap: wrap;
}
.list-item-rank {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8125rem;
font-weight: 700;
color: var(--white);
background: var(--text-muted);
flex-shrink: 0;
}
.list-item-rank.rank-gold { background: linear-gradient(135deg, #f7c948, #e5a100); }
.list-item-rank.rank-silver { background: linear-gradient(135deg, #b0bec5, #78909c); }
.list-item-rank.rank-bronze { background: linear-gradient(135deg, #d4a76a, #b8860b); }
.rank-change-badge {
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 700;
}
.rank-change-badge.up { background: var(--accent-green); color: var(--white); }
.rank-change-badge.down { background: var(--ship-red); color: var(--white); }
.rank-change-badge.new { background: var(--preview-pink); color: var(--white); }
.list-item-title {
font-size: 1rem;
font-weight: 700;
color: var(--text-primary);
margin: 0;
letter-spacing: -0.125px;
}
.list-item-author {
font-size: 0.8125rem;
color: var(--text-secondary);
margin: 0 0 0.5rem 0;
}
.list-item-desc {
font-size: 0.8125rem;
color: var(--text-secondary);
margin: 0 0 0.75rem 0;
line-height: 1.5;
}
.list-item-meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.card-tag {
font-size: 0.6875rem;
font-weight: 600;
color: var(--text-secondary);
background: var(--bg-tertiary);
padding: 0.25rem 0.5rem;
border-radius: 9999px;
display: inline-flex;
align-items: center;
gap: 0.25rem;
}
/* 加载指示器 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
}
.loading-spinner {
width: 48px;
height: 48px;
border: 4px solid var(--bg-tertiary);
border-top-color: var(--link-blue);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.loading-text {
color: var(--text-primary);
margin-top: 1rem;
font-size: 0.875rem;
font-weight: 600;
}
.loading-overlay-inner {
display: flex;
flex-direction: column;
align-items: center;
}
/* Toast消息 */
.toast-message {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background: var(--bg-primary);
backdrop-filter: blur(8px);
color: var(--text-primary);
padding: 0.75rem 1.5rem;
border-radius: 12px;
font-size: 0.875rem;
font-weight: 600;
z-index: 10000;
transition: all 0.3s ease;
box-shadow: var(--shadow-lg);
border: 1px solid var(--border-color);
}
.toast-message.toast-error {
background: var(--ship-red);
color: var(--white);
}
.toast-message.toast-success {
background: var(--accent-green);
color: var(--white);
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 4rem 2rem;
color: var(--text-secondary);
}
.empty-state .icon {
color: var(--text-muted);
margin-bottom: 1rem;
}
.empty-state h2 {
font-size: 1.25rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.5rem 0;
}
.empty-state p {
margin: 0;
font-size: 0.875rem;
}
.cache-hint {
margin-top: 1rem;
}
.cache-hint a {
color: var(--link-blue);
text-decoration: none;
font-weight: 600;
}
.cache-hint a:hover {
text-decoration: underline;
}
/* 快速链接 */
.quick-link-section {
margin-top: 2rem;
}
.quick-link-card {
display: flex;
align-items: center;
gap: 1.25rem;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 1.5rem;
text-decoration: none;
color: inherit;
transition: all 0.25s ease;
}
.quick-link-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-hover);
border-color: var(--link-blue);
}
.quick-link-card .icon:first-child {
color: var(--link-blue);
flex-shrink: 0;
}
.quick-link-card h3 {
margin: 0 0 0.25rem 0;
font-size: 1rem;
font-weight: 700;
color: var(--text-primary);
}
.quick-link-card p {
margin: 0;
font-size: 0.8125rem;
color: var(--text-secondary);
}
.quick-link-card .icon:last-child {
color: var(--text-muted);
margin-left: auto;
flex-shrink: 0;
}
/* ============================================
响应式设计
============================================ */
@media (max-width: 768px) {
.page-header {
padding: 1.5rem;
}
.page-title {
font-size: 1.375rem;
}
.filter-bar {
flex-direction: column;
gap: 0.75rem;
padding: 1rem;
}
.filter-group {
width: 100%;
}
.filter-group.search-box {
min-width: auto;
}
.filter-actions {
width: 100%;
}
.filter-actions .btn {
flex: 1;
justify-content: center;
}
.view-toggle {
align-self: flex-end;
}
.export-actions-bar {
flex-direction: column;
gap: 0.75rem;
text-align: center;
}
.export-buttons {
width: 100%;
}
.export-buttons .btn {
flex: 1;
justify-content: center;
}
.books-grid {
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 1rem;
}
.card-content {
padding: 1rem;
}
.card-title {
font-size: 0.875rem;
}
.list-item {
flex-direction: column;
gap: 0.75rem;
}
.list-item-image img {
width: 60px;
height: 90px;
}
.quick-link-card {
flex-direction: column;
text-align: center;
gap: 0.75rem;
}
.quick-link-card .icon:last-child {
margin-left: 0;
}
}
@media (max-width: 480px) {
.page-header {
padding: 1.25rem;
border-radius: 12px;
}
.page-title {
font-size: 1.125rem;
}
.page-title .icon {
width: 20px;
height: 20px;
}
.filter-bar {
border-radius: 12px;
}
/* 移动端单列大卡片 */
.books-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
/* 移动端 .card-image 容器改用 3/2.5(更高一点,让内嵌 2:3 画框更显眼) */
.card-image {
aspect-ratio: 3 / 2.5;
}
.card-badge {
width: 32px;
height: 32px;
font-size: 0.8125rem;
}
.card-category-tag {
font-size: 0.6875rem;
padding: 0.25rem 0.625rem;
}
.rank-change {
right: 48px;
font-size: 0.6875rem;
padding: 0.2rem 0.5rem;
}
.card-content {
padding: 1rem;
}
.card-title {
font-size: 1rem;
margin-bottom: 0.375rem;
}
.card-author {
font-size: 0.875rem;
margin-bottom: 0.375rem;
}
/* 移动端显示关键信息 */
.card-meta-grid {
grid-template-columns: repeat(2, 1fr);
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.card-meta-item {
font-size: 0.75rem;
padding: 0.375rem 0.5rem;
}
.card-desc {
font-size: 0.8125rem;
line-height: 1.5;
}
.list-item-header {
gap: 0.5rem;
}
.list-item-title {
font-size: 0.875rem;
}
.list-item-desc {
display: none;
}
}
/* ===================================================================
v0.9.55: 骨架屏(skeleton)样式 - 用于按需加载的分类切换
复用 animations.css 的 .skeleton shimmer 动画,这里只补布局
=================================================================== */
.card-skeleton {
cursor: default;
pointer-events: none;
user-select: none;
/* 保持与真实 .card 一致的圆角和阴影 */
background: var(--bg-card);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.card-skeleton .skeleton-image {
/* 与首页真实卡片一致:.charts-page .card-image 为 height: 258px、aspect-ratio: auto */
width: 100%;
height: 258px;
aspect-ratio: auto;
}
.card-skeleton .skeleton-content {
padding: var(--spacing-md);
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.card-skeleton .skeleton-title {
height: 1rem;
width: 90%;
margin-bottom: 0;
}
.card-skeleton .skeleton-author {
height: 0.75rem;
width: 60%;
margin-bottom: 0;
}
.card-skeleton .skeleton-tag {
height: 1.25rem;
width: 4rem;
border-radius: var(--radius-full);
margin-bottom: 0;
}
/* ---- 紧凑五列骨架图高度 ---- */
/* 真实卡片在紧凑五列下是 168px 高,骨架图需一致,避免切换时跳动 */
.charts-page .books-grid.bestseller-grid[data-grid-view="compact"] .card-skeleton .skeleton-image {
height: 168px;
}
/* Round3: compact serif journal header, token spacing/radius/border; no stripe or huge card frame. */
.page-header {
background: transparent;
border: 0;
border-radius: 0;
padding: 8px 0 12px;
margin-bottom: 16px;
position: static;
overflow: visible;
}
.page-header::before { display: none; }
.page-title {
font-family: var(--font-serif);
font-size: clamp(24px, 2.6vw, 32px);
font-weight: 700;
color: var(--text-primary);
margin: 0 0 8px 0;
display: block;
letter-spacing: -0.02em;
line-height: 1.15;
overflow-wrap: anywhere;
}
.page-subtitle {
margin: 0;
font-size: 0.875rem;
color: var(--text-muted);
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.cache-badge {
background: var(--badge-bg);
color: var(--badge-text);
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 600;
}
/* Round3: filter bar uses existing radius token, 44px controls. */
.filter-bar {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: flex-end;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}
.filter-group {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.filter-group.search-box {
flex: 1;
min-width: 200px;
position: relative;
}
.filter-label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-secondary);
letter-spacing: 0.125px;
text-transform: uppercase;
white-space: normal !important;
}
.filter-select,
.filter-input {
padding: 0.5rem 0.875rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-tertiary);
color: var(--text-primary);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
min-height: 44px;
min-width: 140px;
}
.filter-select:hover {
border-color: var(--primary-color);
}
/* Round3: shared button baseline 44px + modest radius; primary black/white. */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-card);
color: var(--text-secondary);
font-family: inherit;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
min-height: 44px;
min-width: 44px;
white-space: nowrap;
}
.btn:hover {
color: var(--text-primary);
border-color: var(--text-muted);
}
.btn-primary {
background: var(--primary-color);
color: var(--bg-primary);
border-color: var(--primary-color);
}
.btn-primary:hover {
background: var(--primary-color);
border-color: var(--primary-color);
color: var(--bg-primary);
opacity: 0.88;
}
.btn-secondary {
background: var(--bg-tertiary);
border-color: var(--border-color);
}
.btn-secondary:hover {
background: var(--gray-100);
}
.btn-icon {
padding: 0.375rem;
min-height: 44px;
min-width: 44px;
}
@media (max-width: 760px) {
.page-header { padding: 8px 0 12px; margin-bottom: 12px; }
.filter-bar { padding: 16px; }
}
@media(max-width:768px){body.charts-page .home-toolbar .toolbar-actions{flex:1 1 100%;width:100%}body.charts-page .home-toolbar .export-buttons{display:flex;flex-direction:column;width:100%;min-width:0;align-items:stretch;gap:.5rem}body.charts-page .home-toolbar .export-buttons #btn-export-all{flex:0 0 auto;width:100%;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}body.charts-page .home-toolbar .export-buttons .export-scope-note{width:100%;white-space:normal;overflow-wrap:anywhere}}
/* ============================================
BookRank 首页样式 (Notion 设计系统)
============================================ */
/* 翻译进度条 - 改为底部轻量指示器 */
.translation-progress {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--bg-primary);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
color: var(--text-primary);
padding: 8px 20px;
z-index: 9999;
display: flex;
align-items: center;
gap: 12px;
font-size: 0.8125rem;
transform: translateY(100%);
transition: transform 0.3s ease;
border-top: 1px solid var(--border-color);
}
.translation-progress.active {
transform: translateY(0);
}
.progress-bar {
flex: 1;
max-width: 200px;
height: 4px;
background: var(--bg-tertiary);
border-radius: 2px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--primary-gradient);
width: 0%;
transition: width 0.3s ease;
border-radius: 2px;
}
.progress-text {
white-space: nowrap;
color: var(--text-secondary);
}
/* 页面头部 */
.page-header {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 2rem 2.5rem;
margin-bottom: 1.5rem;
position: relative;
overflow: hidden;
}
.page-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background: var(--primary-gradient);
}
.page-title {
font-size: 1.75rem;
font-weight: 700;
color: var(--text-primary);
margin: 0 0 0.5rem 0;
display: flex;
align-items: center;
gap: 0.75rem;
letter-spacing: -0.625px;
}
.page-title .text-gold {
color: var(--primary-color);
}
.page-subtitle {
margin: 0;
font-size: 0.875rem;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.cache-badge {
background: var(--badge-bg);
color: var(--badge-text);
padding: 0.125rem 0.5rem;