/* dh3 导航主题 - 企业蓝商务风格自定义CSS */

/* ==================== 基础重置 ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #334155;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

[x-cloak] {
    display: none !important;
}

/* ==================== 头部 ==================== */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.logo-text:hover {
    color: #93c5fd;
}

/* 搜索框 */
.search-box {
    display: none;
    flex: 1;
    max-width: 448px;
    margin: 0 32px;
    position: relative;
}

@media (min-width: 768px) {
    .search-box {
        display: block;
    }
}

.search-input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.7);
}

/* 头部统计 */
.header-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stat-dot.green {
    background: #34d399;
}

.stat-dot.blue {
    background: #93c5fd;
}

.stat-text {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== 分类标签栏 ==================== */
.category-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 40;
}

.category-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

.category-list {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.tag-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all 0.2s ease;
}

.tag-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.tag-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tag-count {
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.7;
}

/* ==================== 移动端搜索 ==================== */
.mobile-search {
    display: block;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
}

@media (min-width: 768px) {
    .mobile-search {
        display: none;
    }
}

.mobile-search-box {
    position: relative;
}

.mobile-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.mobile-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.mobile-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* ==================== 主内容区 ==================== */
.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* 搜索结果提示 */
.search-result-tip {
    margin-bottom: 24px;
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}

.search-result-text {
    color: #1e40af;
    font-size: 14px;
}

.search-result-count {
    font-weight: 600;
}

/* ==================== 行业区块 ==================== */
.industry-section {
    margin-bottom: 40px;
}

.industry-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.industry-bar {
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, #3b82f6, #1e40af);
    border-radius: 2px;
    margin-right: 12px;
}

.industry-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.industry-count {
    margin-left: 12px;
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 9999px;
}

/* ==================== 站点网格 ==================== */
.sites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .sites-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== 站点卡片 - 极简版 ==================== */
.site-card {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.site-card:hover {
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.12);
    transform: translateY(-3px);
}

.site-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.site-card:hover .site-name {
    color: #2563eb;
}

.site-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-description.empty {
    color: #94a3b8;
    font-style: italic;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: #94a3b8;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.empty-text {
    color: #64748b;
}

/* 搜索空状态 */
.search-empty .empty-icon {
    background: #eff6ff;
}

.search-empty .empty-icon svg {
    color: #3b82f6;
}

.clear-search-btn {
    margin-top: 16px;
    padding: 10px 20px;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    font-size: 14px;
    transition: background 0.2s;
}

.clear-search-btn:hover {
    background: #2563eb;
}

/* ==================== 底部 ==================== */
.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 16px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* 友情链接 */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
}

.footer-links-label {
    color: #94a3b8;
}

.footer-links a {
    color: #64748b;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #2563eb;
}

/* 版权信息 */
.footer-info {
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-info {
        text-align: right;
    }
}

.footer-info p {
    margin-bottom: 4px;
}

.footer-info a {
    transition: color 0.2s;
}

.footer-info a:hover {
    color: #2563eb;
}

.footer-divider {
    margin: 0 8px;
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
