/* CSS Document */

/* ============ 明亮配色设计系统 ============ */
:root {
    --brand-1: #6366f1;          /* 靛蓝 */
    --brand-2: #8b5cf6;          /* 紫罗兰 */
    --brand-3: #06b6d4;          /* 青 */
    --bg-base: #f7f8fc;          /* 浅灰白 */
    --bg-card: #ffffff;
    --bg-soft: #eef2ff;          /* 浅紫 */
    --bg-soft-blue: #eff6ff;     /* 浅蓝 */
    --text-main: #1e293b;        /* 深灰蓝 */
    --text-sub: #64748b;         /* 中灰 */
    --text-muted: #94a3b8;       /* 浅灰 */
    --border-light: #e2e8f0;
    --shadow-card: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px -8px rgba(15,23,42,.08);
    --shadow-card-hover: 0 4px 6px rgba(15,23,42,.05), 0 16px 40px -12px rgba(99,102,241,.25);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-base);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    margin: 0;
}

/* ============ 顶部导航 ============ */
.top-nav {
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: .85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.2rem;
}
.nav-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    box-shadow: 0 4px 12px -2px rgba(99,102,241,.4);
}
.nav-logo-text span { color: var(--brand-1); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nav-links a {
    padding: .45rem .9rem;
    border-radius: 8px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: all .15s ease;
    white-space: nowrap;
}
.nav-links a:hover {
    background: var(--bg-soft);
    color: var(--brand-1);
}
.nav-links a.more-link {
    color: var(--brand-1);
    font-weight: 600;
}

.btn-admin {
    padding: .45rem 1rem;
    border-radius: 8px;
    background: var(--text-main);
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: all .15s ease;
}
.btn-admin:hover {
    background: var(--brand-1);
    color: #fff;
}

/* ============ Hero ============ */
.hero {
    text-align: center;
    padding: 3rem 1rem 1rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(139,92,246,.12) 0%, rgba(99,102,241,.06) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--brand-1) 60%, var(--brand-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    color: var(--text-sub);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}
.hero-search {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-search input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    font-size: 1rem;
    background: #fff;
    color: var(--text-main);
    transition: all .2s ease;
    box-shadow: var(--shadow-card);
}
.hero-search input:focus {
    outline: none;
    border-color: var(--brand-1);
    box-shadow: 0 0 0 4px rgba(99,102,241,.12), var(--shadow-card);
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search .search-icon {
    position: absolute;
    right: 1.3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ============ 站点简介区 ============ */
.site-intro {
    max-width: 100%;
    margin: 1rem auto 0;
    text-align: center;
}

.site-intro-text {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 2.5rem;
    padding: 0 1rem;
}

/* 特色亮点 4 列 */
.site-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1.5rem 1rem;
    background: rgba(255,255,255,.65);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: all .25s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: var(--brand-1);
    box-shadow: 0 8px 24px -8px rgba(99,102,241,.2);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-soft), #eff6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-1);
    font-size: 1.25rem;
}

.feature-text h4 {
    font-size: .92rem;
    font-weight: 700;
    margin: 0 0 .2rem;
    color: var(--text-main);
}

.feature-text p {
    font-size: .78rem;
    color: var(--text-sub);
    margin: 0;
    line-height: 1.4;
}

.site-intro {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 2rem;
    text-align: center;
    /*background: rgba(255,255,255,.5);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -4px rgba(15,23,42,.06);*/
}

/* 响应式：小屏 2 列，超小屏 1 列 */
@media (max-width: 768px) {
    .site-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .site-intro-text {
        font-size: .92rem;
    }
}

@media (max-width: 480px) {
    .site-features {
        grid-template-columns: 1fr;
    }
}

/* ============ 分类区域（卡片化） ============ */
.categories-wrap {
    /* max-width: 1200px; */
    margin: 0 auto;
    /*padding: 0 1.5rem 4rem;*/
}
.category-block {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow .3s ease;
}
.category-block:hover {
    box-shadow: var(--shadow-card-hover);
}
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-soft-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-1);
    font-size: 1.15rem;
}
.category-title h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -.02em;
}
.category-title .cat-slug {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: .78rem;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 8px;
}
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .55rem 1.1rem;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--brand-1);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: all .15s ease;
    border: 1px solid transparent;
}
.btn-more:hover {
    background: var(--brand-1);
    color: #fff;
    border-color: var(--brand-1);
    transform: translateX(2px);
}
.btn-more i { font-size: .75rem; transition: transform .15s ease; }
.btn-more:hover i { transform: translateX(3px); }

/* ============ 工具卡片 ============ */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
/* ============ 工具卡片（上下两部分） ============ */
.tool-card {
    display: block;
    padding: 1.25rem;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: var(--text-main);
    transition: all .2s ease;
    border: 1px solid rgba(226,232,240,.6);
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    border-color: var(--brand-1);
    box-shadow: 0 8px 24px -6px rgba(99,102,241,.2);
    transform: translateY(-2px);
    color: var(--text-main);
}

/* ★ 上半部分：左图标 + 右名称 */
.tool-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: .9rem;
}
.tool-card-icon {
    width: 80px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-soft), #eff6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--brand-1);
    font-size: 1.15rem;
    flex-shrink: 0;
}
.tool-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tool-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* ★ 下半部分：简介 */
.tool-card-desc {
    font-size: .85rem;
    color: var(--text-sub);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
/* ============ 空状态 / 无结果 ============ */
.empty-tip, .no-result {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}
.empty-tip i, .no-result i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: .4;
    color: var(--brand-1);
}

/* 分类区域容器：全宽 */
.categories-wrap {
    width: 100%;
}

/* 每个分类区域：全宽铺满 + 色块背景 */
.category-block {
    width: 100%;
    padding: 2rem 2.5rem;
    margin-bottom: 0;            /* 去掉底部间距，色块紧贴 */
    border-radius: 0;             /* 去掉圆角，整行铺满 */
    box-shadow: none;             /* 去掉阴影 */
    background: var(--block-bg, #eef2ff);   /* 由 JS 按索引设置 */
    transition: background .3s ease;
}
.category-block:hover {
    /* 悬浮时稍微加深，但不用阴影 */
    background: var(--block-bg-hover, #e0e7ff);
}

/* 内容居中，最大宽度 1200px */
.category-block-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* 分类头（保持不变，但内部宽度受限） */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-title-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-1);
    font-size: 1.15rem;
    box-shadow: 0 2px 8px -2px rgba(99,102,241,.2);
}
.category-title h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -.02em;
}
.category-title .cat-slug {
    font-family: 'SF Mono', 'Courier New', monospace;
    font-size: .78rem;
    color: var(--text-muted);
    background: rgba(255,255,255,.7);
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 8px;
}

/* More 按钮在白底上更醒目 */
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .55rem 1.1rem;
    border-radius: 10px;
    background: rgba(255,255,255,.9);
    color: var(--brand-1);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: all .15s ease;
    border: 1px solid transparent;
}
.btn-more:hover {
    background: var(--brand-1);
    color: #fff;
    border-color: var(--brand-1);
    transform: translateX(2px);
}

/* 工具卡片：在白底上更清爽 */
.tool-card {
    display: block;
    padding: 1.25rem;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: var(--text-main);
    transition: all .2s ease;
    border: 1px solid rgba(226,232,240,.6);
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.tool-card:hover {
    border-color: var(--brand-1);
    box-shadow: 0 8px 24px -6px rgba(99,102,241,.2);
    transform: translateY(-2px);
    color: var(--text-main);
}

/* ============================================================
   页脚：深色科技风
   ============================================================ */
.site-footer {
    position: relative;
    background: #0a0e1a;
    color: #cbd5e1;
    margin-top: 4rem;
    overflow: hidden;
}

/* 浅色网格底纹 */
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,.06) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* 顶部发光渐变线 */
.site-footer::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99,102,241,.5) 30%,
        rgba(139,92,246,.7) 50%,
        rgba(99,102,241,.5) 70%,
        transparent 100%);
    z-index: 1;
}

/* 底纹上的径向光晕（增加层次感） */
.footer-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(99,102,241,.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(139,92,246,.10) 0%, transparent 40%);
}

.footer-main {
    position: relative;
    z-index: 2;
    padding: 3.5rem 0 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-col { min-width: 0; }

/* ---------- Logo ---------- */
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f8fafc;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.footer-logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .95rem;
    box-shadow: 0 4px 16px -2px rgba(99,102,241,.6);
}
.footer-logo-text span { color: var(--brand-1); }

.footer-desc {
    color: #94a3b8;
    font-size: .88rem;
    line-height: 1.7;
    margin: 0;
    max-width: 380px;
}

/* ---------- 快速导航 ---------- */
.footer-title {
    font-size: .82rem;
    font-weight: 700;
    color: #f1f5f9;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 1.25rem;
    position: relative;
    padding-bottom: .5rem;
}

/* 标题下的科技感短横线 */
.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    border-radius: 1px;
    box-shadow: 0 0 8px var(--brand-1);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-nav li {
    margin-bottom: .6rem;
}
.footer-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .88rem;
    transition: all .2s;
    display: inline-block;
    position: relative;
    padding-left: 0;
}
.footer-nav a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 1px;
    background: var(--brand-1);
    vertical-align: middle;
    margin-right: 0;
    transition: all .2s;
}
.footer-nav a:hover {
    color: #e0e7ff;
    padding-left: 10px;
}
.footer-nav a:hover::before {
    width: 6px;
    margin-right: 4px;
    box-shadow: 0 0 6px var(--brand-1);
}

/* ---------- 二维码 ---------- */
.qr-box {
    width: 120px;
    height: 120px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(99,102,241,.3),
        0 4px 20px -2px rgba(99,102,241,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.qr-hint {
    font-size: .75rem;
    color: #64748b;
    margin: .75rem 0 0;
}

/* ---------- 版权栏 ---------- */
.footer-bottom {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(99,102,241,.15);
    padding: 1.5rem 0;
    text-align: center;
    background: rgba(5,8,16,.6);
    backdrop-filter: blur(8px);
}
.footer-bottom p {
    color: #64748b;
    font-size: .82rem;
    margin: 0;
}
.footer-bottom strong {
    color: #cbd5e1;
    font-weight: 600;
}

/* ============================================================
   返回顶部按钮
   ============================================================ */
#backToTop {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: rgba(99, 102, 241, 1);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -6px rgba(99, 102, 241, 0.7),
                0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

#backToTop:active {
    transform: translateY(-1px) scale(0.95);
}

/* 手机端调整 */
@media (max-width: 768px) {
    #backToTop {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-desc {
        text-align: center;
        max-width: 100%;
    }
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-qr {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-main {
        padding: 2.5rem 0 2rem;
    }
}