/* 使用聚合页面相同的容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 28px;
    margin-bottom: 8px;
    color: #333;
}

.page-description {
    color: #666;
    font-size: 14px;
}

/* 分类统计信息 */
.category-stats {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    text-align: center;
}

.stat-item {
    font-size: 14px;
    color: #666;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 3px;
    display: inline-block;
    justify-content: center;
}

/* 字母导航 */
.alphabet-nav {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
    overflow-x: auto;
}

/* 滑动提示样式 */
.nav-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
    background: #fff8e1;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ffe082;
}

.hint-icon {
    margin-right: 6px;
    font-size: 16px;
    animation: hint-pulse 2s infinite;
}

.hint-text {
    font-size: 13px;
}

/* 滚动遮罩效果 */
.scroll-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-mask.left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.scroll-mask.right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.alphabet-nav:hover .scroll-mask,
.alphabet-nav.scrolling .scroll-mask {
    opacity: 1;
}

/* 提示图标动画 */
@keyframes hint-pulse {
    0% {
        transform: translateX(-3px);
        opacity: 0.6;
    }
    50% {
        transform: translateX(3px);
        opacity: 1;
    }
    100% {
        transform: translateX(-3px);
        opacity: 0.6;
    }
}

/* 响应式：在桌面端隐藏提示，移动端显示 */
@media (min-width: 992px) {
    .nav-hint {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-hint {
        display: flex;
    }
}

.alphabet-nav-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: min-content;
    justify-content: center;
}

.alphabet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    text-align: center;
    color: #0073aa;
    background: #f8f9fa;
    border-radius: 3px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    text-decoration: none;
}

.alphabet-link[type="button"] {
    padding: 0;
    font-family: inherit;
}

.alphabet-link.active:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,115,170,0.3);
}

.alphabet-link.disabled {
    color: #ccc;
    background: #f8f9fa;
    cursor: not-allowed;
    border-color: #eee;
}

.alphabet-link.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* 字母分组 */
.letter-section {
    margin-bottom: 25px;
}

.letter-title {
    font-size: 20px;
    color: #333;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    position: relative;
    padding-left: 10px;
}

.letter-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: #0073aa;
    border-radius: 1.5px;
}

/* 分类网格布局 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.category-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-left: 3px solid #0073aa;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.category-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.category-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
}

.category-name a:hover {
    color: #0073aa;
}

.category-description {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
    border-left: 1px solid #eee;
    padding-left: 8px;
}

.category-meta {
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 3px;
}

.category-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-view-aggregation {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    flex: 1;
    background: #0073aa;
    color: white;
}

.btn-view-aggregation:hover {
    background: #005a87;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,115,170,0.3);
}

/* 缓存管理面板 */
.cache-admin-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 14px;
}

.cache-admin-panel h4 {
    margin-top: 0;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.cache-admin-panel p {
    margin: 6px 0;
}

.cache-admin-panel code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.button {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.button:hover {
    background: #005a87;
    color: white;
}

.notice {
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 14px;
}

.notice-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .alphabet-nav-inner {
        gap: 4px;
    }
    
    .alphabet-link {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 13px;
    }
    
    .letter-title {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .alphabet-nav-inner {
        justify-content: flex-start;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-description {
        font-size: 13px;
    }
    
    .category-stats {
        padding: 8px;
    }
    
    .stat-item {
        font-size: 12px;
        padding: 3px 6px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}