/* 低配优化版 CSS - 专业稳重风格 */

/* 日间模式 (默认) */
body {
    background: #f8fafc;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: #2d3748;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 夜间模式 */
body.dark-mode {
    background: #1a202c;
    color: #e2e8f0;
}

/* 移除所有高性能消耗的特效 */
.tech-bg, .grid-lines {
    display: none;
}

/* 简化网格布局 */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* 简化头部区域 */
.header-area {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

/* 隐藏数据来源显示 */
#data-source {
    display: none !important;
}

/* 标题渐变颜色和图标颜色的夜间模式支持 */
.dark-mode h1 .bg-clip-text {
    background-image: linear-gradient(to right, #4299e1, #63b3ed) !important;
}

/* 副标题渐变颜色的夜间模式支持 */
.dark-mode .header-area p .bg-clip-text {
    background-image: linear-gradient(to right, #38b2ac, #4fd1c5) !important;
}
.dark-mode h1 i {
    color: #4299e1 !important;
}

.dark-mode .header-area {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 简化卡片区域 */
.cards-area {
    grid-column: 1 / -1;
    grid-row: 2;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.dark-mode .cards-area {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 简化卡片滚动器 */
.card-scroller {
    display: flex;
    gap: 20px;
    padding: 10px 0 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.card-scroller::-webkit-scrollbar {
    height: 6px;
}

.card-scroller::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.card-scroller::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.dark-mode .card-scroller::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark-mode .card-scroller::-webkit-scrollbar-thumb {
    background: #4a5568;
}

/* 增加卡片高度和宽度 */
.card {
    scroll-snap-align: start;
    flex: 0 0 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-height: 550px;
    position: relative;
    transition: all 0.3s ease;
}

.dark-mode .card {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 卡片悬停效果 */
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.dark-mode .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #718096;
}

.card.active {
    background: #f7fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4299e1;
}

.dark-mode .card.active {
    background: #4a5568;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #63b3ed;
}

/* 调整卡片头部间距 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.dark-mode .card-header {
    border-bottom: 1px solid #4a5568;
}

/* 增大日期字体 */
.date {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748 !important;
    transition: color 0.3s ease;
}

.dark-mode .date {
    color: #e2e8f0 !important;
}

/* 重新设计热点导航按钮位置 */
.hotspot-nav {
    position: absolute;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    padding: 0 20px;
    pointer-events: none;
}

.hotspot-up-btn {
    top: 70px;
    justify-content: flex-start;
}

.hotspot-down-btn {
    bottom: 20px;
    justify-content: flex-end;
}

.hotspot-nav-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.dark-mode .hotspot-nav-btn {
    background: rgba(45, 55, 72, 0.9);
    border: 1px solid #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hotspot-nav-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark-mode .hotspot-nav-btn:hover {
    background: #2d3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 按钮图标样式 */
.hotspot-nav-btn i {
    font-size: 0.9rem;
    color: #4a5568;
}

.dark-mode .hotspot-nav-btn i {
    color: #e2e8f0;
}

/* 增加热点容器高度 */
.hotspot-container {
    position: relative;
    height: 383px;
    overflow-y: auto;
    margin-top: 10px;
}

/* 调整热点项间距 */
.hotspot {
    color: #2d3748;
    padding: 12px 15px;
    margin: 12px 0;
    border-radius: 8px;
    background: #f7fafc;
    border-left: 3px solid #4299e1;
    transition: all 0.3s ease;
}

.hotspot.active {
    color: #2d3748;
    background: #ebf4ff;
    border-left: 3px solid #3182ce;
}

.dark-mode .hotspot {
    background: #4a5568;
    border-left: 3px solid #63b3ed;
}

.dark-mode .hotspot.active {
    background: #2c5282;
    border-left: 3px solid #90cdf4;
}

/* 调整热点数字大小 */
.hotspot-number {
    background: #4299e1;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 10px;
    flex-shrink: 0;
}

/* 热点链接样式 */
.hotspot-link {
    color: #101111; /* 默认模式下的文本颜色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.hotspot-link:hover {
    color: #2b6cb0; /* 默认模式下的悬停颜色 */
}

/* 夜间模式下的热点链接样式 */
.dark-mode .hotspot-link {
    color: #e2e8f0; /* 夜间模式下的文本颜色 */
}

.dark-mode .hotspot-link:hover {
    color: #90cdf4; /* 夜间模式下的悬停颜色 */
}

.dark-mode .hotspot-number {
    background: #63b3ed;
}

/* 简化导航系统 */
.nav-level {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.nav-item {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    min-width: 60px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #2d3748;
}

.dark-mode .nav-item {
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
}

.nav-item:hover {
    background: #f7fafc;
    color: #2d3748;
}

.dark-mode .nav-item:hover {
    background: #4a5568;
    color: #e2e8f0;
}

.nav-item.active {
    background: #4299e1;
    color: white;
    font-weight: 600;
    border-color: #4299e1;
}

.dark-mode .nav-item.active {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
}

/* 导航标签文字颜色 */
.nav-label {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 4px;
    color: #4a5568;
}

.dark-mode .nav-label {
    color: #a0aec0;
}

/* 简化导航箭头 */
.scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.scroll-nav i {
    color: #4a5568; /* 确保箭头图标有颜色 */
}

.dark-mode .scroll-nav i {
    color: #e2e8f0;
}

.scroll-nav:hover {
    background: #f7fafc;
}

.dark-mode .scroll-nav {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode .scroll-nav:hover {
    background: #4a5568;
}

/* 简化主题切换按钮 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 26px;
    background: #e2e8f0;
    border-radius: 25px;
    border: 1px solid #cbd5e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 4px;
    z-index: 100;
    transition: all 0.3s ease;
}

.dark-mode .theme-toggle {
    background: #4a5568;
    border: 1px solid #718096;
}

.toggle-handle {
    width: 20px;
    height: 20px;
    background: #4299e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(0);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.dark-mode .toggle-handle {
    background: #63b3ed;
    transform: translateX(24px);
}

/* 简化热点组样式 */
.hotspot-group {
    display: none;
}

.hotspot-group.active {
    display: block;
}

.hotspot-item {
    padding: 8px 0;
    margin: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.dark-mode .hotspot-item {
    border-bottom: 1px solid #4a5568;
}

/* 主题感知的热点链接样式 */
.hotspot-link {
    color: #2563eb; /* 日间模式下的蓝色链接 */
    transition: color 0.3s ease;
}

.hotspot-link:hover {
    color: #1d4ed8; /* 日间模式下的悬停颜色 */
}

/* 夜间模式下的热点链接样式 */
.dark-mode .hotspot-link {
    color: #93c5fd; /* 夜间模式下的蓝色链接 */
}

.dark-mode .hotspot-link:hover {
    color: #bfdbfe; /* 夜间模式下的悬停颜色 */
}

.hotspot-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hotspot-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    color: #2d3748;
}

.dark-mode .hotspot-text {
    color: #e2e8f0;
}

/* 数据状态指示器文字颜色 */
#data-status {
    color: white;
    background: #4299e1;
    transition: all 0.3s ease;
}

.dark-mode #data-status {
    background: #2c5282 !important;
}

#data-source {
    color: #4a5568;
    transition: color 0.3s ease;
}

.dark-mode #data-source {
    color: #90cdf4 !important;
}

/* 添加禁用状态的样式 */
.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #a0aec0 !important;
}

.dark-mode .nav-item.disabled {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #718096 !important;
}

.nav-item.disabled:hover {
    background: #f1f5f9 !important;
    transform: none !important;
}

.dark-mode .nav-item.disabled:hover {
    background: #2d3748 !important;
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
        padding: 12px;
        gap: 12px;
    }

    .date {
        color: #2d3748;
        font-size: 1.2rem;
    }
    
    .dark-mode .date {
        color: #e2e8f0;
    }
    
    .card {
        flex: 0 0 85vw;
        min-height: 517px;
    }
    
    .hotspot-container {
        height: 350px;
    }
    
    .hotspot-nav {
        padding: 0 15px;
    }
    
    .hotspot-up-btn {
        top: 65px;
    }
    
    .scroll-nav {
        display: none;
    }
    
    .header-area,
    .cards-area {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .nav-level {
        gap: 6px;
        padding: 8px 0;
    }
    
    .nav-item {
        min-width: 50px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .card {
        min-height: 483px;
        padding: 16px;
    }
    
    .hotspot-container {
        height: 317px;
    }
    
    .date {
        font-size: 1.2rem;
    }
    
    .hotspot-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .hotspot-nav-btn i {
        font-size: 0.8rem;
    }
    
    .hotspot {
        padding: 10px 12px;
        margin: 10px 0;
    }
    
    .theme-toggle {
        color: #2d3748;
    }
    
    .toggle-handle {
        width: 18px;
        height: 18px;
    }
    
    .dark-mode .toggle-handle {
        transform: translateX(21px);
    }
}

/* 确保所有文字都有足够的对比度 */
h1, h2, h3, h4, h5, h6,
p, span, div, a {
    color: inherit;
}

/* 性能优化：减少重绘和重排 */
* {
    box-sizing: border-box;
}

/* 优化字体渲染 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 简化滚动行为 */
.card-scroller {
    scroll-behavior: auto;
}

/* 优化图片和图标加载 */
img, svg {
    max-width: 100%;
    height: auto;
}

/* 减少图层数量 */
.card, .header-area, .cards-area {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.current-hotspot {
    font-size: 0.8rem;
    color: #4a5568;
}

.dark-mode .current-hotspot {
    color: #a0aec0;
}

/* 确保图标颜色也合适 */
.fas, .fab, .far {
    color: inherit;
}

/* 滚动条文字颜色 */
.card-scroller::-webkit-scrollbar-thumb {
    background: #cbd5e0;
}

.dark-mode .card-scroller::-webkit-scrollbar-thumb {
    background: #4a5568;
}

/* 添加微妙的视觉反馈动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hotspot-nav-btn:active {
    transform: scale(0.95);
}

.hotspot-nav-btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.dark-mode .hotspot-nav-btn:focus {
    outline-color: #63b3ed;
}

.hotspot-nav-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
}