/* dh2 导航主题 - 深色科技风自定义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: #0a0f1c;
    min-height: 100vh;
    color: #d1d5db;
    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;
}

/* ==================== 布局容器 ==================== */
.container {
    display: flex;
    min-height: 100vh;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 256px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 50;
    overflow-y: auto;
    display: none;
}

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

/* Logo区域 */
.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.logo-text a:hover {
    color: #67e8f9;
}

.logo-text p {
    font-size: 12px;
    color: #6b7280;
}

/* 搜索框 */
.search-box {
    padding: 16px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: white;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.5);
}

.search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #6b7280;
}

/* 导航菜单 */
.nav-menu {
    padding: 0 12px 24px;
}

.nav-title {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 4px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    background: rgba(6, 182, 212, 0.1);
    border-left-color: #06b6d4;
}

.nav-item-content {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.nav-item.active svg {
    color: #06b6d4;
}

.nav-count {
    font-size: 12px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 侧边栏底部 */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    color: #4b5563;
    text-align: center;
}

/* ==================== 移动端头部 ==================== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

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

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

.mobile-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.mobile-logo span {
    font-weight: 700;
    color: white;
}

.mobile-menu-btn {
    padding: 8px;
    color: #9ca3af;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* 移动端菜单 */
.mobile-menu {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #0f172a;
    padding: 16px;
}

.mobile-menu input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: white;
    margin-bottom: 16px;
}

.mobile-menu input::placeholder {
    color: #6b7280;
}

.mobile-nav-item {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 4px;
    color: #9ca3af;
}

.mobile-nav-item.active {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.1);
}

/* ==================== 主内容区 ==================== */
.main {
    flex: 1;
    margin-left: 0;
    padding-top: 64px;
}

@media (min-width: 768px) {
    .main {
        margin-left: 256px;
        padding-top: 0;
    }
}

/* 顶部栏 */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 24px;
}

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

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.header-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-top: 2px;
}

.header-subtitle .search-term {
    color: #22d3ee;
    margin-left: 8px;
}

.header-stats {
    display: none;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

@media (min-width: 768px) {
    .header-stats {
        display: flex;
    }
}

.header-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ==================== 内容区域 ==================== */
.content {
    padding: 24px;
}

/* 行业分组 */
.industry-section {
    margin-bottom: 40px;
}

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

.industry-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.industry-count {
    font-size: 14px;
    color: #6b7280;
}

/* 站点网格 */
.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: 1280px) {
    .sites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 站点卡片 - 极简版 */
.site-card {
    display: block;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.site-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(6, 182, 212, 0.1);
}

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

.site-card:hover .site-name {
    color: #67e8f9;
}

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

.site-description.empty {
    color: #4b5563;
    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: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: #4b5563;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
}

/* 搜索无结果 */
.search-empty .empty-icon svg {
    color: #22d3ee;
}

.clear-search-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.2s;
}

.clear-search-btn:hover {
    background: rgba(34, 211, 238, 0.2);
}

/* ==================== 页脚 ==================== */
.footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: #6b7280;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #22d3ee;
}

.footer-info {
    text-align: left;
}

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

.footer-info p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

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

.footer-info a:hover {
    color: #22d3ee;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.3);
}