/* 导航站模板 - 自定义样式 */

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
}

/* 顶部导航 */
.navbar {
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--bg-light);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* 搜索框 */
.search-box {
    max-width: 400px;
}

.search-box .form-control {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border: 2px solid var(--border-color);
    border-right: none;
    padding: 0.625rem 1rem;
}

.search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.search-box .btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 0.625rem 1.25rem;
}

/* Hero 区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    padding: 3rem 0;
    color: white;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    opacity: 0.9;
    font-size: 1.125rem;
}

.hero-search {
    max-width: 600px;
    margin: 2rem auto 0;
}

.hero-search .form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.hero-search .btn {
    padding: 1rem 2rem;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    font-weight: 600;
}

/* 分类导航 */
.category-nav {
    background: var(--bg-card);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 56px;
    z-index: 100;
}

.category-nav .nav-pills .nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
}

.category-nav .nav-pills .nav-link:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.category-nav .nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

/* 侧边栏分类 */
.sidebar-categories {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-categories h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-categories .list-group-item {
    border: none;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.sidebar-categories .list-group-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.sidebar-categories .list-group-item.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-categories .list-group-item i {
    width: 20px;
    margin-right: 0.5rem;
}

.sidebar-categories .badge {
    font-weight: 500;
}

/* 站点卡片 */
.site-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    height: 100%;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.site-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.site-card .site-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.site-card .site-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.site-card .site-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.site-card .site-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-card .site-tags {
    margin-top: 0.75rem;
}

.site-card .site-tags .badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
}

/* 分类区块 */
.category-section {
    margin-bottom: 2.5rem;
}

.category-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.category-section .section-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.category-section .section-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.category-section .section-more {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.category-section .section-more:hover {
    color: var(--primary-color);
}

/* 热门推荐 */
.hot-sites {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.hot-sites h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.hot-sites h5 i {
    color: #ef4444;
    margin-right: 0.5rem;
}

.hot-sites .hot-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.hot-sites .hot-item:last-child {
    border-bottom: none;
}

.hot-sites .hot-item:hover {
    color: var(--primary-color);
}

.hot-sites .hot-rank {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.75rem;
    background-color: var(--bg-light);
    color: var(--text-secondary);
}

.hot-sites .hot-rank.top-1 {
    background-color: #fef3c7;
    color: #d97706;
}

.hot-sites .hot-rank.top-2 {
    background-color: #e5e7eb;
    color: #6b7280;
}

.hot-sites .hot-rank.top-3 {
    background-color: #fed7aa;
    color: #c2410c;
}

/* 标签云 */
.tag-cloud {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.tag-cloud h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.tag-cloud h5 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.tag-cloud .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud .tag-item {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-cloud .tag-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 详情页 */
.detail-header {
    background: var(--bg-card);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.detail-icon-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 2rem;
}

.detail-title {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.detail-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-meta span {
    margin-right: 1.5rem;
}

.detail-meta i {
    margin-right: 0.35rem;
}

.detail-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.detail-content h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-screenshot {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.detail-screenshot img {
    width: 100%;
    height: auto;
}

/* 分页 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    border: none;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

/* 面包屑 */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* 页脚 */
.footer {
    background: var(--bg-card);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .category-nav {
        top: 0;
    }
    
    .sidebar-categories,
    .hot-sites,
    .tag-cloud {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .site-card {
        padding: 1rem;
    }
    
    .detail-header {
        text-align: center;
    }
    
    .detail-icon,
    .detail-icon-placeholder {
        margin: 0 auto 1rem;
    }
}

/* 标签页样式 */
.tag-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    padding: 2rem 0;
    color: white;
}

.tag-page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tag-page-header .tag-count {
    opacity: 0.9;
}

.all-tags-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.all-tags-section .tag-group {
    margin-bottom: 1.5rem;
}

.all-tags-section .tag-group-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.all-tags-section .tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    text-decoration: none;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.all-tags-section .tag-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.all-tags-section .tag-item .count {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.all-tags-section .tag-item:hover .count {
    color: rgba(255, 255, 255, 0.8);
}
.directory-content p img{
    max-width: 100%;
}