/* dh7 导航主题 - 带房贷计算器自定义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: #f9fafb;
    min-height: 100vh;
    color: #111827;
    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: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.header-container {
    max-width: 1400px;
    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: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text:hover {
    opacity: 0.8;
}

.logo-subtitle {
    font-size: 12px;
    color: #6b7280;
    display: none;
}

@media (min-width: 640px) {
    .logo-subtitle {
        display: block;
    }
}

/* 统计信息 */
.stats {
    display: none;
    align-items: center;
    gap: 24px;
}

@media (min-width: 768px) {
    .stats {
        display: flex;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #eff6ff;
    border-radius: 9999px;
}

.stat-item svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.stat-item.verified {
    background: #f0fdf4;
}

.stat-item.verified svg {
    color: #22c55e;
}

.stat-text {
    font-size: 14px;
    color: #374151;
}

.stat-text strong {
    color: #2563eb;
    font-weight: 600;
}

.stat-item.verified .stat-text strong {
    color: #16a34a;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: block;
    padding: 8px;
    border-radius: 8px;
    color: #4b5563;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* ==================== 移动端菜单 ==================== */
.mobile-menu {
    border-top: 1px solid #f3f4f6;
    background: white;
    padding: 16px;
}

.mobile-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.mobile-stat span:first-child {
    color: #6b7280;
}

.mobile-stat span:last-child {
    font-weight: 600;
}

.mobile-stat .sites-count {
    color: #2563eb;
}

.mobile-stat .verified-count {
    color: #16a34a;
}

/* ==================== 房贷计算器区域 ==================== */
.calculator-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 48px 0;
}

.calculator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 32px;
}

.calculator-header h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .calculator-header h2 {
        font-size: 36px;
    }
}

.calculator-header p {
    color: #dbeafe;
    max-width: 672px;
    margin: 0 auto;
}

/* 计算器卡片 */
.calculator-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 24px;
    color: #1f2937;
}

@media (min-width: 768px) {
    .calculator-card {
        padding: 32px;
    }
}

.calculator-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #111827;
}

/* 表单元素 */
.form-row {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.form-label {
    width: 96px;
    background: #f3f4f6;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-right: 1px solid #d1d5db;
    flex-shrink: 0;
}

.form-input,
.form-select {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 14px;
    background: white;
}

.form-input:read-only {
    background: #f9fafb;
}

.form-unit {
    padding: 12px 16px;
    background: #f3f4f6;
    border-left: 1px solid #d1d5db;
    font-size: 14px;
    color: #4b5563;
}

/* 计算按钮 */
.calc-btn {
    width: 100%;
    padding: 16px;
    background: #2563eb;
    color: white;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.2s;
}

.calc-btn:hover {
    background: #1d4ed8;
}

/* 结果对比区域 */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.result-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.result-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.result-header {
    text-align: center;
    padding: 16px;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.result-header.principal {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

.result-header.interest {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.result-row {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.result-row:hover {
    background: #eff6ff;
}

.result-row.interest:hover {
    background: #fef2f2;
}

.result-label {
    width: 50%;
    padding: 12px 16px;
    background: #f9fafb;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.result-value {
    width: 50%;
    padding: 12px 16px;
    text-align: right;
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.result-value.highlight {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

.result-value.interest-highlight {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
}

.result-value.save {
    color: #16a34a;
    font-weight: 700;
}

.result-row.save {
    background: #f0fdf4;
}

.result-row.save .result-label {
    background: #dcfce7;
    color: #166534;
}

.result-btn {
    width: 100%;
    padding: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.result-btn.principal {
    background: #2563eb;
    color: white;
}

.result-btn.principal:hover {
    background: #1d4ed8;
}

.result-btn.principal:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.result-btn.interest {
    background: #ef4444;
    color: white;
}

.result-btn.interest:hover {
    background: #dc2626;
}

.result-btn.interest:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ==================== 搜索区域 ==================== */
.search-section {
    background: linear-gradient(180deg, white 0%, #f9fafb 100%);
    border-bottom: 1px solid #f3f4f6;
    padding: 32px 0;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.search-header {
    text-align: center;
    margin-bottom: 32px;
}

.search-header h2 {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .search-header h2 {
        font-size: 36px;
    }
}

.search-header .gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-header p {
    color: #4b5563;
    max-width: 672px;
    margin: 0 auto;
}

/* 搜索框 */
.search-box {
    max-width: 672px;
    margin: 0 auto 32px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 48px 16px 56px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    font-size: 16px;
    color: #111827;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 24px;
    height: 24px;
}

.search-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-clear:hover {
    background: #f3f4f6;
}

.search-clear svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

/* 分类标签 */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f9fafb;
}

.tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tab-count {
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 9999px;
    background: #f3f4f6;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 主内容区 ==================== */
.main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 16px;
}

/* 搜索结果提示 */
.search-result-tip {
    margin-bottom: 24px;
    padding: 16px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
}

.search-result-text {
    color: #1e40af;
    font-size: 14px;
}

/* 行业区块 */
.industry-section {
    margin-bottom: 48px;
}

.industry-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.industry-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.industry-icon svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.industry-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.industry-count {
    margin-left: 16px;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 14px;
    font-weight: 500;
    border-radius: 9999px;
}

/* ==================== 站点网格 ==================== */
.sites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .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: flex;
    align-items: flex-start;
    padding: 24px;
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.25);
}

/* 图标区域 */
.site-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    margin-right: 16px;
}

/* 内容区域 */
.site-content {
    flex: 1;
    min-width: 0;
}

.site-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    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: #4b5563;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.site-description.empty {
    color: #9ca3af;
    font-style: italic;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 96px 20px;
}

.empty-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    background: #f3f4f6;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 48px;
    height: 48px;
    color: #9ca3af;
}

.empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.empty-text {
    color: #6b7280;
    max-width: 448px;
    margin: 0 auto;
}

/* 搜索空状态 */
.search-empty .empty-icon {
    width: 80px;
    height: 80px;
    background: #eff6ff;
}

.search-empty .empty-icon svg {
    width: 40px;
    height: 40px;
    color: #2563eb;
}

.search-empty .empty-title {
    font-size: 20px;
}

.clear-search-btn {
    margin-top: 24px;
    padding: 10px 24px;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.clear-search-btn:hover {
    background: #1d4ed8;
}

/* ==================== 底部 ==================== */
.footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

.footer-section-title svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.footer-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-update {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.footer-update svg {
    width: 16px;
    height: 16px;
}

/* 友情链接 */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #2563eb;
}

.footer-link svg {
    width: 12px;
    height: 12px;
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-link:hover svg {
    color: #2563eb;
}

/* 统计数据 */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #eff6ff;
    border-radius: 12px;
}

.stat-card.verified {
    background: #f0fdf4;
}

.stat-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    background: #dbeafe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.verified .stat-card-icon {
    background: #dcfce7;
}

.stat-card-icon svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
}

.stat-card.verified .stat-card-icon svg {
    color: #16a34a;
}

.stat-card-label {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.stat-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
}

.stat-card.verified .stat-card-value {
    color: #16a34a;
}

/* 版权栏 */
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    font-size: 14px;
    color: #4b5563;
    text-align: center;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6b7280;
}

.footer-info a {
    color: #6b7280;
    transition: color 0.2s;
}

.footer-info a:hover {
    color: #2563eb;
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}