/* =======================================================
 * iice-theme - 基于 vb1.cn 的导航主题样式
 * ======================================================= */

:root {
    --bg-body: #f5f6f8;
    --bg-white: #ffffff;
    --bg-topbar: #3d4556;
    --bg-footer: #3d4556;
    --text-main: #334155;
    --text-sub: #475569;
    --text-desc: #94a3b8;
    --color-primary: #3b82f6;
    --color-success: #10b981;
    --max-width: 1330px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; outline: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* 统一容器边距 */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* --- 1. 顶部黑色条 --- */
.top-bar { background-color: var(--bg-topbar); color: #b8c4d8; font-size: 11px; padding: 8px 0; letter-spacing: 0.5px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }

.direct-switch { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.direct-switch span { font-size: 11px; color: #b8c4d8; transition: color 0.3s; }
.direct-switch:hover span { color: #fff; }
.switch-track { position: relative; width: 28px; height: 14px; border-radius: 10px; background-color: #64748b; transition: 0.3s; }
.switch-track.active { background-color: var(--color-success); }
.switch-dot { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background-color: #fff; border-radius: 50%; transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); }
.switch-track.active .switch-dot { transform: translateX(14px); }

/* --- 2. 头部导航 --- */
.site-header { background: var(--bg-white); padding: 14px 0; border-bottom: 1px solid #ebebeb; }
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }

.logo-area { display: flex; align-items: center; gap: 10px; order: 1; }
.logo-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.logo-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-text h1 { font-size: 18px; font-weight: 700; color: #1e293b; line-height: 1.2; letter-spacing: 0.2px; }
.logo-text p { font-size: 11px; color: #94a3b8; white-space: nowrap; letter-spacing: 0.2px; }

.header-nav { display: flex; gap: 16px; align-items: center; order: 2; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nav-item img { width: 22px; height: 22px; object-fit: contain; }
.nav-item span { font-size: 12px; font-weight: 500; color: var(--text-sub); letter-spacing: 0.3px; }

/* --- 3. 搜索框与多源下拉菜单 --- */
.header-search { order: 2; width: auto; flex: 1; max-width: 600px; margin-left: 20px; margin-right: 20px; }

/* --- 3.5 副导航菜单 --- */
.secondary-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    padding-left: 4px;
}

.secondary-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.secondary-nav-item {
    font-size: 12.5px;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: 0.2s;
    flex-shrink: 0;
}

.secondary-nav-item:hover {
    color: var(--color-primary);
}

.secondary-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.secondary-nav-item:hover .secondary-nav-icon {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.secondary-nav-text {
    font-weight: 500;
}

/* --- 4. 搜索框与多源下拉菜单 --- */
.header-search { order: 3; width: 100%; margin-top: 16px; }
#search-box-pill {
    display: flex; align-items: center; width: 100%; height: 44px;
    background: var(--bg-white); border: 2px solid #e5e7eb; border-radius: 12px;
    padding: 0 10px; transition: 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    position: relative;
}
#search-box-pill:focus-within { border-color: var(--color-primary); }

.search-btn-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: #999; cursor: pointer; }
.search-btn-icon:hover { color: var(--color-primary); }
#main-search { flex: 1; height: 100%; border: none; background: transparent; font-size: 14px; font-weight: 500; outline: none; padding: 0 8px; }

/* 下拉菜单机制 */
.search-engine-selector { height: 100%; display: flex; align-items: center; }
.engine-dropdown {
    position: absolute; top: 48px; left: 0; width: 100%;
    background: var(--bg-white);
    border: 2px solid #e5e7eb; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 8px; list-style: none; display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    z-index: 100;
}
.engine-dropdown.show { display: grid; }
.engine-item {
    display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 2px; cursor: pointer;
    border-radius: 8px; font-size: 12px; color: var(--text-main); transition: 0.2s;
    white-space: nowrap; overflow: hidden; text-overflow: clip;
}
.engine-item:hover { background: #f3f4f6; }
.engine-item img { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.engine-item i { font-size: 16px; }
.current-engine-icon { width: 18px; height: 18px; object-fit: contain; }

/* --- 4. 分类与卡片网格 --- */
.main-content { flex-grow: 1; padding-top: 20px; padding-bottom: 20px; }
.category-section { margin-bottom: 24px; }
.category-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; padding: 0 4px; }
.category-title { font-size: 14.5px; font-weight: 600; color: #4b5563; line-height: 1; letter-spacing: 0.3px; }
.category-desc { font-size: 11px; color: var(--text-desc); margin-bottom: 1px; letter-spacing: 0.2px; }
.category-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}
.category-more:hover {
    background: #eff6ff;
    gap: 6px;
}
.category-more i {
    font-size: 10px;
}

.app-grid { display: grid; gap: 10px; }

.app-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 0;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

.app-card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.app-card-icon span {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.app-card-name {
    flex: 1;
    min-width: 0;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

/* 查看更多卡片样式 */
.app-card-more {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    background: var(--bg-white);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
    min-width: 0;
}

.app-card-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

.app-card-more .app-card-icon {
    color: var(--color-primary);
}

.app-card-more .more-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.app-card-more .more-arrow {
    font-size: 12px;
    color: #94a3b8;
}

/* 响应式 */
@media (max-width: 768px) {
    .app-card {
        padding: 10px 12px;
        gap: 8px;
    }

    .app-card-icon {
        width: 20px;
        height: 20px;
    }

    .app-card-name {
        font-size: 13px;
    }
}
    transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.app-card-more .app-card-icon i {
    font-size: 14px; color: #8ba4c7; transition: 0.2s;
}
.app-card-more .more-text {
    font-size: 13px; font-weight: 500; color: #8ba4c7; transition: 0.2s;
}
.app-card-more .more-arrow {
    font-size: 11.5px; color: #8ba4c7; transition: 0.2s; margin-top: 1px;
}

.app-card-more:hover .app-card-icon i,
.app-card-more:hover .more-text,
.app-card-more:hover .more-arrow {
    color: var(--color-primary);
}

/* 相关网址卡片 */
.detail-related-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.detail-related-card .related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-related-card .related-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-related-card .related-header h3 i {
    color: #3b82f6;
    font-size: 14px;
}

.detail-related-card .related-count {
    font-size: 12px;
    color: #94a3b8;
}

.detail-related-card .related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.detail-related-card .related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 0;
    text-decoration: none;
}

.detail-related-card .related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

.detail-related-card .related-card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-related-card .related-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.detail-related-card .related-card-name {
    flex: 1;
    min-width: 0;
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .detail-related-card .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-related-card .related-card {
        padding: 10px 12px;
        gap: 8px;
    }

    .detail-related-card .related-card-icon {
        width: 20px;
        height: 20px;
    }

    .detail-related-card .related-card-name {
        font-size: 13px;
    }
}

/* --- 5. 赞赏模块 --- */
.appreciation-section {
    background: var(--bg-white);
    padding: 48px 0;
    border-top: 1px solid #e2e8f0;
}

.appreciation-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.appreciation-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.appreciation-title i {
    color: #ef4444;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
}

.appreciation-desc {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 24px;
}

.appreciation-qrcode {
    max-width: 200px;
    margin: 0 auto 16px;
}

.appreciation-qrcode img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.appreciation-note {
    font-size: 13px;
    color: var(--text-desc);
}

/* --- 分类页面 --- */
.category-page {
    padding: 20px 0;
}

.category-page-header {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}

.category-page-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-page-icon {
    width: 64px;
    height: 64px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-page-icon i {
    font-size: 28px;
    color: #3b82f6;
}

.category-page-info {
    flex: 1;
}

.category-page-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.category-page-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.6;
}

.category-page-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.meta-item i {
    font-size: 11px;
    color: #3b82f6;
}

.category-sites-wrapper {
    margin-bottom: 30px;
}

.category-sites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.sites-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sites-section-title i {
    color: #3b82f6;
    font-size: 14px;
}

.sites-count {
    font-size: 12px;
    color: #94a3b8;
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
}

.pagination a:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.pagination .current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.pagination .dots {
    border: none;
    background: transparent;
    color: #cbd5e1;
}

.pagination .prev,
.pagination .next {
    font-weight: 500;
}

/* 空内容样式 */
.no-content {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.no-content-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.no-content-title {
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 8px;
}

.no-content-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

@media (max-width: 768px) {
    .category-page-header {
        padding: 20px;
    }

    .category-page-header-content {
        flex-direction: column;
        text-align: center;
    }

    .category-page-icon {
        width: 56px;
        height: 56px;
    }

    .category-page-icon i {
        font-size: 24px;
    }

    .category-page-title {
        font-size: 18px;
    }

    .category-page-meta {
        justify-content: center;
    }

    .category-sites-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }
}

/* --- 6. 页脚 --- */
.site-footer { background: var(--bg-footer); padding: 16px 0 24px 0; color: #a0aec0; font-size: 11.5px; position: relative; margin-top: auto; }

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    line-height: 1.6;
    color: #9ca3af;
    letter-spacing: 0.5px;
    width: 100%;
}
.footer-links { text-align: center; }
.footer-copyright { text-align: center; }
.footer-meta a { margin: 0 4px; transition: color 0.2s; }
.footer-meta a:hover { color: #fff; text-decoration: underline; }

/* --- 6. 网址详情页（全新布局） --- */
.site-detail-page-new {
    max-width: 1400px;
    margin: 0 auto;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 24px;
    align-items: start;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 网站信息卡片 */
.detail-info-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.detail-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.detail-title-area {
    flex: 1;
    min-width: 0;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.detail-url {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-desc);
}

.detail-url i {
    font-size: 12px;
}

.detail-url a {
    color: var(--color-primary);
    text-decoration: none;
    word-break: break-all;
}

.detail-url a:hover {
    text-decoration: underline;
}

.detail-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-sub);
    margin-bottom: 16px;
}

.detail-meta-info {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.meta-info-item {
    font-size: 13px;
    color: var(--text-desc);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-info-item i {
    color: var(--color-primary);
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-visit:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-mobile-wrapper {
    position: relative;
    display: inline-block;
}

.btn-mobile,
.btn-favorite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f5f9;
    color: var(--text-sub);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mobile:hover,
.btn-favorite:hover {
    background: var(--bg-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 二维码悬浮层 */
.mobile-qrcode {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
    min-width: 180px;
    text-align: center;
}

.mobile-qrcode::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.btn-mobile-wrapper:hover .mobile-qrcode {
    opacity: 1;
    visibility: visible;
}

.mobile-qrcode img {
    width: 150px;
    height: 150px;
    display: block;
    margin: 0 auto 8px;
    border: 2px solid #f1f5f9;
    border-radius: 8px;
}

.mobile-qrcode p {
    font-size: 13px;
    color: var(--text-sub);
    margin: 0;
}

/* 分类与标签卡片 */
.detail-taxonomy-card,
.detail-content-card,
.detail-related-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.detail-taxonomy-card h3,
.detail-content-card h3,
.detail-related-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
}

.taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.taxonomy-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.2s;
}

.taxonomy-cat {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.taxonomy-cat:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.taxonomy-tag-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.taxonomy-tag-item:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

/* 详细介绍 */
.detail-content-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-sub);
}

.detail-content-text p {
    margin-bottom: 12px;
}

/* 相关推荐 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.related-item:hover {
    background: #f8fafc;
}

.related-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.related-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
}

.related-desc {
    font-size: 12px;
    color: var(--text-desc);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧预览 */
.detail-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-preview-card,
.detail-tdk-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: var(--text-sub);
}

.preview-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.preview-header span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 比例 */
    background: #f8fafc;
    overflow: hidden;
}

.preview-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TDK信息 */
.tdk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.tdk-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.tdk-edit {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-primary);
}

.tdk-edit:hover {
    text-decoration: underline;
}

.tdk-list {
    padding: 16px 20px;
}

.tdk-item {
    margin-bottom: 16px;
}

.tdk-item:last-child {
    margin-bottom: 0;
}

.tdk-label {
    font-size: 12px;
    color: var(--text-desc);
    margin-bottom: 6px;
}

.tdk-value {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
    word-break: break-all;
}

/* 响应式 */
@media (max-width: 1200px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .detail-preview-card {
        order: -1;
    }
}

@media (max-width: 768px) {
    .detail-info-card,
    .detail-taxonomy-card,
    .detail-content-card,
    .detail-related-card {
        padding: 16px;
    }

    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-visit,
    .btn-mobile,
    .btn-favorite {
        width: 100%;
        justify-content: center;
    }
}
.site-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.site-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.site-detail-main {
    min-width: 0;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-desc);
    margin-bottom: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb a {
    color: var(--color-primary);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover {
    color: #2563eb;
}

.breadcrumb i {
    font-size: 11px;
    color: var(--text-desc);
}

.breadcrumb span {
    color: var(--text-main);
    font-weight: 500;
}

.site-detail-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.site-detail-header {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.site-detail-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.site-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.site-detail-info {
    flex: 1;
    min-width: 0;
}

.site-detail-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    line-height: 1.3;
}

.site-detail-subtitle {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
}

.site-detail-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-detail-body h3 i {
    color: var(--color-primary);
    font-size: 16px;
}

.site-detail-content {
    margin-bottom: 28px;
}

.site-detail-content .content-text {
    line-height: 1.8;
    color: var(--text-sub);
    font-size: 15px;
}

.site-detail-content .content-text p {
    margin-bottom: 12px;
}

.site-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-sub);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: var(--bg-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 右侧信息栏 */
.site-detail-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.sidebar-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-card h3 i {
    color: var(--color-primary);
}

.sidebar-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 13px;
    color: var(--text-desc);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-label i {
    color: var(--color-primary);
    font-size: 12px;
}

.info-value {
    font-size: 14px;
    color: var(--text-sub);
    word-break: break-all;
}

.info-value a {
    color: var(--color-primary);
    text-decoration: underline;
}

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

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.2s;
}

.sidebar-tag-cat {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.sidebar-tag-cat:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.sidebar-tag-tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-sub);
}

.sidebar-tag-tag:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: var(--text-main);
}

/* 相关推荐 */
.related-sites {
    margin-top: 0;
}

.related-sites h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-sites h3 i {
    color: var(--color-primary);
}

/* 响应式 */
@media (max-width: 1024px) {
    .site-detail-layout {
        grid-template-columns: 1fr;
    }

    .site-detail-sidebar {
        position: static;
    }
}

@media (min-width: 1024px) {
    .app-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1280px) {
    .app-grid { grid-template-columns: repeat(7, 1fr); }
}

@media (max-width: 768px) {
    .site-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-detail-card {
        padding: 20px;
    }

    .site-detail-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .secondary-nav-wrapper {
        gap: 15px;
    }

    .secondary-nav-item {
        font-size: 11.5px;
    }

    .secondary-nav-icon {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

/* --- 7. 搜索结果 --- */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-results-list {
    padding: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f3f4f6;
}

.search-result-item img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-main);
}

.search-result-desc {
    font-size: 11px;
    color: var(--text-desc);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 8. 分页 --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.05);
}

.pagination .current {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* --- 9. 404页面 --- */
.error-404-page {
    max-width: 800px;
    margin: 0 auto;
}

.error-404-content {
    text-align: center;
    padding: 60px 20px;
}

.error-404-icon {
    margin-bottom: 20px;
}

.error-404-title {
    font-size: 72px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.error-404-desc {
    font-size: 16px;
    color: var(--text-sub);
    margin-bottom: 32px;
}

.error-404-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-404-suggestions {
    margin-top: 48px;
}

.error-404-suggestions h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    color: #1e293b;
}

/* --- 10. 工具类 --- */
.no-content {
    text-align: center;
    padding: 60px 20px;
}

#toast {
    white-space: nowrap;
}

#toast.show {
    visibility: visible !important;
    opacity: 1 !important;
}

/* --- 11. 响应式排版 --- */
@media (min-width: 640px) {
    .app-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
@media (min-width: 768px) {
    .app-grid { grid-template-columns: repeat(5, 1fr); }
    .header-search { order: 2; width: auto; flex: 1; max-width: 600px; margin-top: 0; margin-left: 20px; margin-right: 20px; }
    .header-nav { order: 3; }
    .footer-meta { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1024px) {
    .app-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1280px) {
    .app-grid { grid-template-columns: repeat(7, 1fr); }
}

@media (max-width: 768px) {
    .secondary-nav-wrapper {
        gap: 15px;
    }

    .secondary-nav-item {
        font-size: 11.5px;
    }

    .secondary-nav-icon {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .site-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-detail-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
