/**
 * Site Directory - 前台样式 (SEO优化版)
 * 现代化网址卡片布局，完整的SEO页面结构样式
 */

/* ========== 容器 ========== */
.site-directory-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========== 面包屑 ========== */
.sd-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}
.sd-breadcrumb a {
    color: #4a6cf7;
    text-decoration: none;
}
.sd-breadcrumb a:hover {
    text-decoration: underline;
}
.sd-breadcrumb-sep {
    margin: 0 8px;
    color: #ccc;
}
.sd-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ========== 页面头部 ========== */
.sd-page-header {
    margin-bottom: 28px;
}
.sd-hero-header {
    background: linear-gradient(135deg, #f0f1fe 0%, #e8f0fe 100%);
    padding: 32px 36px;
    border-radius: 16px;
    border: 1px solid #dde3f9;
}
.sd-page-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a2e;
    line-height: 1.4;
}
.sd-hero-header .sd-page-title {
    font-size: 28px;
}
.sd-page-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 12px;
}
.sd-hero-header .sd-page-desc {
    font-size: 15px;
    color: #555;
}
.sd-page-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}
.sd-page-stats strong {
    color: #4a6cf7;
    font-weight: 600;
}

/* ========== 区块标题 ========== */
.sd-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f1;
}

/* ========== 子分类导航卡片 ========== */
.sd-subcats {
    margin-bottom: 32px;
}
.sd-subcat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.sd-subcat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}
.sd-subcat-card:hover {
    border-color: #4a6cf7;
    box-shadow: 0 4px 15px rgba(74,108,247,0.08);
    transform: translateY(-2px);
}
.sd-subcat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a6cf7, #6d8aff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.sd-subcat-info {
    flex: 1;
    min-width: 0;
}
.sd-subcat-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}
.sd-subcat-count {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.sd-subcat-arrow {
    color: #ccc;
    font-size: 16px;
}

/* ========== 父级返回链接 ========== */
.sd-parent-link {
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
}
.sd-parent-link a {
    color: #4a6cf7;
    font-weight: 500;
    text-decoration: none;
}
.sd-parent-link a:hover {
    text-decoration: underline;
}

/* ========== 网址卡片网格 ========== */
.sd-sites-section {
    margin-bottom: 32px;
}
.site-directory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* ========== 网址卡片 ========== */
.site-card {
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 12px;
    transition: all 0.25s ease;
    overflow: hidden;
}
.site-card:hover {
    border-color: #4a6cf7;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.10);
    transform: translateY(-2px);
}
.site-card-inner {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    gap: 12px;
}
.site-card-favicon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: contain;
    background: #f5f5fa;
}
.site-card-body {
    flex: 1;
    min-width: 0;
}
.site-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px;
    line-height: 1.3;
}
.site-card-title a {
    color: #1a1a2e;
    text-decoration: none;
}
.site-card-title a:hover {
    color: #4a6cf7;
}
.site-card-desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.site-card-meta {
    font-size: 11px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.site-card-cats a,
.site-mini-tag {
    color: #4a6cf7;
    text-decoration: none;
    font-size: 11px;
    background: #f0f1fe;
    padding: 1px 6px;
    border-radius: 4px;
}
.site-card-cats a:hover,
.site-mini-tag:hover {
    background: #e0e3fd;
}
.site-card-tags {
    display: flex;
    gap: 4px;
}
.site-card-date {
    color: #bbb;
}

/* ========== 访问按钮 ========== */
.site-card-visit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    background: #4a6cf7;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.site-card-visit:hover {
    background: #3b5de7;
    color: #fff;
}

/* ========== 单个网址详情页 ========== */
.site-directory-single {
    background: #fff;
    border-radius: 16px;
    padding: 32px 36px;
    border: 1px solid #e8e8ef;
    margin-bottom: 24px;
}
.site-entry-header {
    margin-bottom: 20px;
}
.site-entry-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.site-favicon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    flex-shrink: 0;
    object-fit: contain;
    background: #f5f5fa;
}
.site-title-area {
    flex: 1;
}
.site-entry-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
    line-height: 1.3;
}
.site-entry-meta-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.site-type-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    background: #eef1ff;
    color: #4a6cf7;
    border-radius: 20px;
}
.site-views-badge {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.site-date-badge {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

/* 操作栏 */
.site-action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fc;
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.site-visit-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: #4a6cf7;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s;
}
.site-visit-btn:hover {
    background: #3b5de7;
    color: #fff;
}
.site-link-url {
    font-size: 13px;
    color: #999;
    word-break: break-all;
}

/* 描述 */
.site-entry-description {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}
.site-entry-description p {
    margin: 0;
}

/* 内容 */
.site-entry-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}
.site-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* footer meta */
.site-entry-footer {
    border-top: 1px solid #e8e8ef;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.site-meta {
    font-size: 14px;
    color: #666;
}
.meta-label {
    font-weight: 500;
    color: #333;
}
.site-meta a {
    color: #4a6cf7;
    text-decoration: none;
}
.site-meta a:hover {
    text-decoration: underline;
}
.site-tag {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px 4px 2px 0;
    background: #f0f1fe;
    color: #4a6cf7;
    border-radius: 6px;
    font-size: 13px;
}
.site-tag:hover {
    background: #dde3f9;
}

/* ========== 相关推荐 ========== */
.sd-related-section {
    margin-bottom: 32px;
}
.sd-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sd-related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 20px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}
.sd-related-link:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
    background: #fafafe;
}
.sd-related-badge {
    background: #f0f1fe;
    color: #4a6cf7;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 500;
}

/* ========== 全站分类导航 ========== */
.sd-all-cats-section {
    margin-bottom: 32px;
}
.sd-all-cats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.sd-all-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    color: #444;
    font-weight: 500;
    transition: all 0.2s;
}
.sd-all-cat-item:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
    background: #fafafe;
}
.sd-cat-active {
    border-color: #4a6cf7;
    background: #f0f1fe;
    color: #4a6cf7;
}
.sd-all-cat-count {
    font-size: 11px;
    color: #999;
    background: #f5f5fa;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 400;
}
.sd-cat-active .sd-all-cat-count {
    background: #dde3f9;
    color: #4a6cf7;
}

/* ========== 空状态 ========== */
.sd-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}
.sd-empty a {
    color: #4a6cf7;
    text-decoration: none;
}

/* ========== 分页 ========== */
.navigation.pagination {
    margin-top: 28px;
    text-align: center;
}
.navigation.pagination .nav-links {
    display: inline-flex;
    gap: 6px;
}
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #f5f5fa;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}
.navigation.pagination .page-numbers.current {
    background: #4a6cf7;
    color: #fff;
    font-weight: 600;
}
.navigation.pagination .page-numbers:hover:not(.current) {
    background: #e8e8ef;
}

/* ========== 评论区 ========== */
.site-comments-area {
    margin-top: 24px;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .site-directory-grid { grid-template-columns: repeat(3, 1fr); }
    .sd-subcat-grid { grid-template-columns: repeat(3, 1fr); }
    .sd-all-cats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .site-directory-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-subcat-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-all-cats-grid { grid-template-columns: repeat(3, 1fr); }
    .sd-hero-header { padding: 24px 20px; }
}
@media (max-width: 768px) {
    .site-directory-grid { grid-template-columns: 1fr; }
    .sd-subcat-grid { grid-template-columns: 1fr; }
    .sd-all-cats-grid { grid-template-columns: repeat(2, 1fr); }
    .sd-page-stats { flex-direction: column; gap: 6px; }
    .site-directory-single { padding: 20px 16px; }
    .site-entry-header-inner { flex-direction: column; align-items: flex-start; }
    .site-action-bar { flex-direction: column; align-items: flex-start; }
    .site-card-inner { padding: 14px 16px; gap: 10px; }
}
