/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f9f9fb;
    color: #333;
}

/* ===== 顶部 Banner ===== */
.site-banner {
    position: relative;
    height: 130px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.site-banner .banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease;
}
.site-banner .banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
}
.site-banner .banner-text {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.site-banner .banner-text h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.site-banner .banner-text p {
    font-size: 14px;
    opacity: 0.9;
}
.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}
.banner-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}
.banner-dot:hover { background: rgba(255,255,255,0.8); }

/* ===== 导航栏 ===== */
.site-nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}
.site-nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.site-nav ul {
    list-style: none;
    display: flex;
}
.nav-search {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}
.nav-search-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3e8ff;
    color: #8B5CF6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}
.nav-search-icon:hover {
    background: #8B5CF6;
    color: #fff;
}
.nav-search-box {
    display: none;
    align-items: center;
    gap: 6px;
}
.nav-search-box.active { display: flex; }
.nav-search-form {
    display: flex;
    gap: 6px;
    align-items: center;
}
.nav-search-box input {
    width: 200px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.nav-search-box input:focus { border-color: #8B5CF6; }
.nav-search-box button {
    padding: 7px 14px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.nav-search-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
}
.site-nav li a {
    display: block;
    padding: 16px 24px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}
.site-nav li a:hover,
.site-nav li a.active {
    color: #a18cd1;
    border-bottom: 3px solid #a18cd1;
    background: rgba(161, 140, 209, 0.05);
}

/* ===== 文字广告位 ===== */
.text-ads {
    max-width: 1200px;
    margin: 15px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.text-ads a {
    flex: 1;
    min-width: calc(25% - 15px);
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
}
.text-ads a:hover {
    border-color: #a18cd1;
    color: #a18cd1;
    box-shadow: 0 2px 8px rgba(161, 140, 209, 0.15);
}

/* ===== 主内容容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Banner 广告位（footer） ===== */
.banner-ads {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}
.banner-ads a {
    flex: 1;
    display: block;
}
.banner-ads img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ===== 页脚 ===== */
.site-footer {
    background: linear-gradient(135deg, #f9a8a8 0%, #f0b8c8 50%, #b5a8d9 100%);
    padding: 20px 20px 30px;
    margin-top: 40px;
    text-align: center;
    color: #fff;
}
.site-footer .footer-info {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.8;
}
.site-footer .footer-info p {
    margin: 0;
}
.site-footer .footer-info p + p {
    margin-top: 6px;
}
.site-footer .footer-info a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
}

/* ===== 首页专用样式 ===== */
.gradient-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}
.text-gradient {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.site-card {
    transition: all .3s ease;
    position: relative;
    overflow: visible;
    z-index: 1;
}
.site-card:hover {
    z-index: 50;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -6px rgba(139,92,246,.25);
}
.site-card:hover .visit-btn {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(139,92,246,.4);
}
.visit-btn {
    transition: all .25s ease;
}
.filter-btn {
    background: #f3f4f6;
    color: #6b7280;
    transition: all .2s;
}
.filter-btn.active {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #fff;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 640px) {
    .site-banner { height: 120px; }
    .site-banner .banner-text h1 { font-size: 20px; }
    .site-banner .banner-text p { font-size: 12px; }
    .site-nav .nav-inner { padding: 0 10px; }
    .site-nav li a { padding: 14px 14px; font-size: 14px; }
    .nav-search { right: 10px; }
    .nav-search-box input { width: 130px; }
    .text-ads { padding: 0 15px; }
    .text-ads a {
        min-width: calc(50% - 8px);
        font-size: 13px;
        padding: 10px 12px;
    }
    .container { padding: 15px; }
    .banner-ads { flex-direction: column; }
}

/* ===== 文章/页面内容样式 ===== */
.article-content { line-height: 1.8; color: #374151; font-size: 15px; word-wrap: break-word; word-break: break-word; }
.article-content h1 { font-size: 1.75rem; font-weight: 700; margin: 1.5em 0 .8em; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; margin: 1.5em 0 .8em; border-left: 4px solid #8B5CF6; padding-left: 12px; }
.article-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.2em 0 .6em; }
.article-content p { margin: 1em 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; }
.article-content ul, .article-content ol { padding-left: 2em; margin: 1em 0; }
.article-content li { margin: .5em 0; }
.article-content blockquote { border-left: 4px solid #EC4899; padding: .5em 1em; margin: 1em 0; background: #faf5ff; color: #6b7280; border-radius: 0 8px 8px 0; }
.article-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: .9em; color: #EC4899; }
.article-content pre { background: #1f2937; color: #f9fafb; padding: 1em; border-radius: 8px; overflow-x: auto; margin: 1em 0; }
.article-content pre code { background: transparent; color: inherit; padding: 0; }
.article-content a { color: #8B5CF6; text-decoration: underline; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.article-content th, .article-content td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.article-content th { background: #faf5ff; font-weight: 600; }

/* ===== 申请收录页 ===== */
.submit-hero { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); border-radius: 20px; padding: 40px 30px; text-align: center; color: #fff; margin-bottom: 30px; }
.submit-hero h1 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.submit-hero p { opacity: .85; font-size: 14px; margin: 0; }
.submit-wrap { max-width: 800px; margin: 0 auto; }
.submit-card { background: #fff; border-radius: 20px; padding: 35px; box-shadow: 0 4px 20px rgba(139,92,246,.08); border: 1px solid #f0edf7; }
.submit-form label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.submit-form label .req { color: #ef4444; margin-left: 2px; }
.submit-form input[type=text], .submit-form textarea, .submit-form select { width: 100%; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 12px; font-size: 14px; transition: all .2s; outline: none; background: #fafafa; }
.submit-form input:focus, .submit-form textarea:focus, .submit-form select:focus { border-color: #8B5CF6; background: #fff; box-shadow: 0 0 0 3px rgba(139,92,246,.1); }
.submit-form textarea { resize: vertical; min-height: 80px; }
.fetch-btn { padding: 10px 20px; border: none; border-radius: 12px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; background: linear-gradient(135deg, #8B5CF6, #EC4899); transition: opacity .2s; }
.fetch-btn:hover { opacity: .9; }
.fetch-btn:disabled { opacity: .5; cursor: not-allowed; }
.submit-btn { width: 100%; padding: 13px; border: none; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #8B5CF6, #EC4899); transition: opacity .2s; margin-top: 10px; }
.submit-btn:hover { opacity: .9; }
.req-card { background: linear-gradient(135deg, #faf5ff, #fdf2f8); border-radius: 16px; padding: 25px; border: 1px solid #f0edf7; }
.req-card h3 { font-size: 16px; font-weight: 700; color: #333; margin: 0 0 15px; display: flex; align-items: center; gap: 8px; }
.req-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 13px; color: #666; }
.req-num { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6, #EC4899); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.msg-box { padding: 12px 18px; border-radius: 12px; font-size: 14px; margin-bottom: 20px; }
.msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.msg-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ===== 工具页底部推荐 ===== */
.tb-wrap { max-width: 900px; margin: 40px auto 0; padding: 0 16px; }
.tb-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 14px; padding-left: 10px; border-left: 4px solid #8B5CF6; }
.tb-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tb-tool { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid #f0edf7; border-radius: 12px; text-decoration: none; color: #555; font-size: 13px; transition: all .25s; }
.tb-tool:hover { border-color: #c4b5fd; box-shadow: 0 6px 18px rgba(139,92,246,.12); transform: translateY(-2px); color: #7c3aed; }
.tb-tool-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; color: #fff; }
.tb-list { list-style: none; padding: 0; margin: 0 0 28px 0; }
.tb-list li { border-bottom: 1px dashed #eee; }
.tb-list li:last-child { border-bottom: none; }
.tb-list a { display: block; padding: 10px 4px; color: #666; font-size: 13px; text-decoration: none; transition: color .2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-list a:hover { color: #8B5CF6; }
.tb-rank { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; font-size: 11px; color: #fff; margin-right: 8px; background: #c4b5fd; }
.tb-list li:nth-child(1) .tb-rank { background: #ef4444; }
.tb-list li:nth-child(2) .tb-rank { background: #f97316; }
.tb-list li:nth-child(3) .tb-rank { background: #eab308; }
