/* 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;
}

/* ==================== 善择网络工具箱 Hero ==================== */
.toolbox-hero {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 40%, #1e40af 70%, #0f172a 100%);
    overflow: hidden;
    padding: 56px 16px;
    text-align: center;
}

.toolbox-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(147, 197, 253, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.toolbox-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.toolbox-hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: toolboxFloat 3s ease-in-out infinite;
}

.toolbox-hero-icon svg {
    width: 40px;
    height: 40px;
    color: #93c5fd;
}

@keyframes toolboxFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.toolbox-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.toolbox-hero-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.toolbox-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #93c5fd;
}

.hero-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
    .toolbox-hero {
        padding: 72px 16px;
    }
    .toolbox-hero-title {
        font-size: 44px;
    }
    .toolbox-hero-desc {
        font-size: 18px;
    }
}

/* ==================== 通用区块容器 ==================== */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 16px;
}

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

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

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

.section-date-badge {
    font-size: 13px;
    color: #3b82f6;
    background: #eff6ff;
    padding: 4px 14px;
    border-radius: 9999px;
    font-weight: 500;
}

/* ==================== 日历卡片 ==================== */
.calendar-section {
    background: #f8fafc;
}

.calendar-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* 左侧日期区 */
.calendar-left {
    flex-shrink: 0;
    width: 200px;
    background: linear-gradient(160deg, #1e40af 0%, #1e3a8a 60%, #172554 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}

.calendar-left::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.calendar-left::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.calendar-date-big {
    display: flex;
    align-items: baseline;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.date-day {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.date-ym {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-month {
    font-size: 22px;
    font-weight: 600;
    opacity: 0.9;
}

.date-year {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
}

.calendar-week {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.calendar-lunar-badge {
    margin-top: 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 14px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 右侧详情区 */
.calendar-right {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.cal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.cal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.cal-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    min-width: 36px;
}

.cal-value {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

.cal-value.cai {
    color: #dc2626;
    font-weight: 600;
}

.cal-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

/* 宜忌 */
.cal-yiji {
    gap: 28px;
}

.cal-yi,
.cal-ji {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.cal-yi-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.cal-yi-text {
    font-size: 14px;
    color: #166534;
    padding-top: 3px;
}

.cal-ji-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.cal-ji-text {
    font-size: 14px;
    color: #991b1b;
    padding-top: 3px;
}

/* 穿衣颜色 */
.cal-dress {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.cal-dress-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.cal-dress-colors {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
}

.color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* 周信息 */
.cal-week-info p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    padding: 10px 0;
}

.cal-week-info strong {
    color: #1e40af;
}

/* 节日提醒 */
.cal-festival {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 4px;
}

.cal-festival p {
    font-size: 14px;
    color: #92400e;
}

.cal-festival strong {
    color: #dc2626;
}

/* 日历响应式 */
@media (max-width: 767px) {
    .calendar-card {
        flex-direction: column;
    }
    .calendar-left {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        padding: 24px 16px;
        flex-wrap: wrap;
    }
    .calendar-date-big {
        align-items: center;
    }
    .date-day {
        font-size: 48px;
    }
    .calendar-week {
        margin-top: 0;
    }
    .calendar-lunar-badge {
        margin-top: 0;
    }
    .calendar-right {
        padding: 20px 16px;
    }
    .cal-row {
        gap: 12px;
    }
    .cal-item {
        min-width: 120px;
    }
}

/* ==================== 工具卡片网格 ==================== */
.tools-section {
    background: white;
    border-top: 1px solid #f1f5f9;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

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

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

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

/* ==================== 工具卡片 ==================== */
.tool-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.1);
    transform: translateY(-3px);
    border-color: #dbeafe;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.tool-icon.health {
    background: #ecfdf5;
}

.tool-icon.lang {
    background: #eff6ff;
}

.tool-icon.life {
    background: #fef3c7;
}

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

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

.tool-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
