/* ================================================================
   首页样式 — 统一浅色渐变体系 + 动效
   ================================================================ */

/* ========== CSS 变量 ========== */
:root {
    --primary: #1E78FF;
    --primary-dark: #0a4da8;
    --primary-light: rgba(30,120,255,.08);
    --bg-light: #f5f7fb;
    --text-muted: #6c757d;
    --text-dark: #1a1a2e;
    --gradient-primary: linear-gradient(135deg, #1E78FF, #0a4da8);
    --gradient-green: linear-gradient(135deg, #10B981, #059669);
    --card-shadow: 0 2px 16px rgba(30,120,255,.06);
    --glass-bg: rgba(255,255,255,.7);
    --glass-border: rgba(255,255,255,.9);
    --section-bg: linear-gradient(180deg, #f8faff 0%, #eef2ff 50%, #f5f7fb 100%);
}

/* ========== 全局装饰 ========== */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: .5;
    animation: float 8s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ========== Hero ========== */
.hero {
    background:
        radial-gradient(circle at 86% 12%, rgba(30,120,255,.1), transparent 30%),
        radial-gradient(circle at 8% 86%, rgba(99,102,241,.07), transparent 32%),
        linear-gradient(180deg, #f8faff 0%, #eef4ff 58%, #fff 100%);
    padding: 76px 0 44px;
    color: var(--text-dark);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(30,120,255,.05) 0%, transparent 70%);
    pointer-events: none;
    animation: float 12s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,.04) 0%, transparent 70%);
    pointer-events: none;
    animation: float 10s ease-in-out infinite reverse;
}
.hero-container { position: relative; z-index: 1; }
.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-dark);
}
.hero h1 span {
    background: linear-gradient(90deg, #1E78FF, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 480px;
    line-height: 1.7;
}
.hero .btn-group-hero {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 10px;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    text-decoration: none;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}
.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
    transition: left .5s;
}
.btn-hero-primary:hover::before { left: 100%; }
.btn-hero-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,120,255,.3); }
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    color: var(--primary);
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid rgba(30,120,255,.15);
    text-decoration: none;
    transition: all .3s;
}
.btn-hero-secondary:hover { background: rgba(30,120,255,.08); color: var(--primary); border-color: rgba(30,120,255,.3); }

.hero-left { padding-right: 30px !important; }
.hero-right {
    padding-left: 100px !important;
    transform: translateX(18px);
}

/* 搜索框 */
.search-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    transition: box-shadow .3s;
}
.search-box:focus-within {
    box-shadow: 0 4px 24px rgba(30,120,255,.1);
}
.search-box .search-input-group {
    display: flex;
    background: rgba(245,247,251,.8);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,.04);
    transition: border-color .2s;
}
.search-box .search-input-group:focus-within {
    border-color: rgba(30,120,255,.2);
}
.search-box .search-input-group input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-size: .95rem;
    outline: none;
}
.search-box .search-input-group input::placeholder { color: var(--text-muted); }
.search-box .search-input-group button {
    padding: 0 20px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    transition: all .2s;
}
.search-box .search-input-group button:hover { background: #1666e0; }
.search-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.search-tags .tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: .78rem;
    background: rgba(30,120,255,.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    border: 1px solid rgba(30,120,255,.08);
}
.search-tags .tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 统计卡片 */
.hero-stats { display: flex; gap: 10px; }
.hero-stats .stat-item {
    flex: 1;
    min-width: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(30,120,255,.08);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30,120,255,.04);
    transition: all .3s;
}
.hero-stats .stat-item:hover {
    border-color: rgba(30,120,255,.2);
    box-shadow: 0 4px 16px rgba(30,120,255,.08);
    transform: translateY(-2px);
}
.hero-stats .stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.hero-stats .stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.hero-stats .stat-desc { font-size: .68rem; color: var(--text-muted); opacity: .6; margin-top: 1px; }

/* ========== Features ========== */
.features {
    padding: 58px 0 72px;
    background:
        radial-gradient(circle at 14% 10%, rgba(30,120,255,.06), transparent 28%),
        linear-gradient(180deg, #fff 0%, #f8faff 100%);
    position: relative;
    overflow: hidden;
}
.features::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: min(1120px, calc(100% - 30px));
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(30,120,255,.12), transparent);
    pointer-events: none;
}
.section-title {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}
.section-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--text-muted);
    font-size: .92rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}
.features .row { position: relative; z-index: 1; justify-content: center; }
.feature-intro {
    text-align: left;
    margin-bottom: 0;
    padding-right: 28px;
}
.feature-intro span {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.feature-intro h2 {
    font-size: 2rem;
    line-height: 1.25;
}
.feature-intro p {
    margin: 0;
    max-width: 360px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30,120,255,.08);
    box-shadow: 0 10px 28px rgba(30,120,255,.06);
    border-radius: 18px;
    padding: 24px;
    text-align: left;
    height: 100%;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(30,120,255,.12);
    border-color: rgba(30,120,255,.2);
    background: rgba(255,255,255,.95);
}
.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0;
    flex: 0 0 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    background: rgba(30,120,255,.06);
    border: 1px solid rgba(30,120,255,.1);
    transition: all .3s;
}
.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(30,120,255,.25);
    transform: scale(1.05);
}
.feature-card h5 { font-size: .98rem; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.feature-card p { font-size: .83rem; color: var(--text-muted); margin-bottom: 0; line-height: 1.7; }

/* ========== API Grid ========== */
.api-marketplace {
    padding: 60px 0 70px;
    background: var(--section-bg);
    position: relative;
}
.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.market-header h3 { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--text-dark); }
.market-header .api-count { font-size: .85rem; color: var(--text-muted); }
.market-header .api-count strong { color: var(--primary); font-size: 1rem; }

.api-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30,120,255,.06);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    transition: all .35s cubic-bezier(.4,0,.2,1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
}
.api-card:hover {
    box-shadow: 0 12px 36px rgba(30,120,255,.1);
    transform: translateY(-4px);
    border-color: rgba(30,120,255,.2);
    background: rgba(255,255,255,.9);
}
.api-card .card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.api-card .card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.api-card .api-method {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .5px;
}
.api-card .api-method.free { background: var(--gradient-green); }
.api-card .api-cost { font-size: .78rem; font-weight: 600; color: #f39c12; }
.api-card .api-cost.free { color: #10b981; }
.api-card .api-cost i { margin-right: 3px; }
.api-card .api-endpoint {
    font-size: .78rem;
    background: rgba(30,120,255,.04);
    padding: 3px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-family: 'SFMono-Regular', Consolas, monospace;
}
.api-card .card-title { font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.api-card .card-text {
    font-size: .84rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.api-card .card-footer {
    background: rgba(30,120,255,.03);
    border-top: 1px solid rgba(30,120,255,.06);
    border-radius: 0 0 14px 14px;
    padding: .7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.api-card .card-footer .status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-muted);
}
.api-card .card-footer .status .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
    50% { opacity: .7; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}
.api-card .card-footer .view-link {
    font-size: .82rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
}
.api-card:hover .card-footer .view-link { gap: 8px; }

/* ========== 接口定制开发流程 ========== */
.custom-dev-section {
    padding: 76px 0 56px;
    background: #fff;
    position: relative;
    overflow: hidden;
}
.custom-dev-section::before {
    content: '';
    position: absolute;
    top: -160px; right: -120px;
    width: 360px; height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,120,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.custom-dev-section .container {
    position: relative;
    z-index: 1;
}
.custom-dev-section .section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 36px;
}
.custom-dev-section .section-header p {
    margin-left: auto;
    margin-right: auto;
}
.custom-dev-section .row.align-items-stretch > [class*="col-"] {
    display: flex;
}
.custom-process-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    height: 100%;
}
.custom-process-item {
    position: relative;
    min-height: 210px;
    padding: 24px;
    border: 1px solid rgba(30,120,255,.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: var(--card-shadow);
    transition: all .3s;
    overflow: hidden;
}
.custom-process-item::after {
    content: '';
    position: absolute;
    right: -40px; bottom: -40px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: rgba(30,120,255,.05);
}
.custom-process-item:hover {
    transform: translateY(-4px);
    border-color: rgba(30,120,255,.2);
    box-shadow: 0 12px 28px rgba(30,120,255,.1);
}
.process-index {
    position: absolute;
    top: 18px; right: 22px;
    color: rgba(30,120,255,.14);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.process-icon {
    width: 46px; height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.1rem;
}
.custom-process-item h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 1.08rem;
    font-weight: 700;
}
.custom-process-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.7;
}
.custom-dev-card {
    width: 100%;
    min-height: 100%;
    padding: 24px;
    border: 1px solid rgba(30,120,255,.12);
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff, #fff);
    color: var(--text-dark);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}
.custom-dev-card::before {
    content: '';
    position: absolute;
    right: -70px; top: -70px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(30,120,255,.08);
}
.custom-dev-card h3 {
    position: relative;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 1.15rem;
    font-weight: 700;
}
.custom-dev-card p {
    position: relative;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.7;
}
.custom-dev-card ul {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.custom-dev-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: #475569;
    font-size: .92rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(30,120,255,.08);
}
.custom-dev-card li:last-child { border-bottom: none; }
.custom-dev-card li i {
    margin-top: 3px;
    color: #10b981;
}
.custom-dev-btn {
    position: relative;
    width: 100%;
    justify-content: center;
}
.custom-dev-btn:hover {
    color: #fff;
}

/* ========== CTA ========== */
.cta-section {
    padding: 58px 0 70px;
    background: var(--section-bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(30,120,255,.1), transparent);
}
.cta-qrcode img {
    max-width: 230px;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(30,120,255,.08);
    background: #fff;
    padding: 8px;
    transition: transform .3s;
}
.cta-qrcode img:hover { transform: scale(1.03); }
.cta-section h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.cta-section .cta-text { padding-left: 90px; }
.cta-section .cta-btn-wrap { margin-top: 20px; text-align: left; }
.cta-section p { color: var(--text-muted); margin-bottom: 24px; }

/* ========== 分类 Tab ========== */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 4px; }
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid rgba(30,120,255,.1);
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    color: #555;
    font-size: .85rem;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}
.cat-tab:hover { border-color: rgba(30,120,255,.3); color: var(--primary); background: rgba(30,120,255,.06); }
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(30,120,255,.25); }
.cat-tab .cat-count { font-size: .7rem; background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 10px; }
.cat-tab.active .cat-count { background: rgba(255,255,255,.25); }

/* ========== 动效 ========== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-up.show { opacity: 1; transform: translateY(0); }

/* 交错淡入延迟 */
.fade-up:nth-child(2) { transition-delay: .1s; }
.fade-up:nth-child(3) { transition-delay: .2s; }
.fade-up:nth-child(4) { transition-delay: .3s; }

/* 图标浮动 */
.feature-icon { animation: iconFloat 4s ease-in-out infinite; }
.feature-card:nth-child(2) .feature-icon { animation-delay: .5s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 1s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 1.5s; }
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.feature-card:hover .feature-icon { animation: none; }

/* 搜索框脉冲 */
.search-box::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(30,120,255,.1), transparent, rgba(99,102,241,.08));
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    z-index: -1;
}
.search-box { position: relative; }
.search-box:focus-within::after { opacity: 1; }

/* ========== 响应式 ========== */
@media (max-width: 991px) {
    .hero { padding: 50px 0 60px; }
    .hero h1 { font-size: 1.6rem; }
    .hero-left { padding-right: 0 !important; }
    .hero-right { padding-left: 0 !important; margin-top: 30px; transform: none; }
    .feature-intro {
        text-align: center;
        padding-right: 0;
        margin-bottom: 28px;
    }
    .feature-intro p {
        margin: 0 auto;
        max-width: 560px;
    }
    .custom-dev-section { padding: 56px 0 44px; }
    .custom-dev-section .row.align-items-stretch > [class*="col-"] { display: block; }
    .custom-dev-card { min-height: auto; }
    .cta-section .cta-text { padding-left: 0; }
    .cta-section .cta-btn-wrap { text-align: center; }
    .cta-section .col-md-4.text-center { margin-top: 30px; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 1.4rem; }
    .features { padding-top: 34px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 20px; }
    .hero-stats { flex-wrap: wrap; }
    .hero-stats .stat-item { flex: 0 0 calc(33.33% - 10px); min-width: 0; }
    .api-card .card-footer { flex-direction: column; gap: 4px; }
    .custom-process-grid { grid-template-columns: 1fr; }
    .custom-process-item { min-height: auto; padding: 20px; }
    .cta-section { padding: 40px 0; }
    .cta-section h3 { font-size: 1.3rem; }
}
@media (max-width: 576px) {
    .hero h1 { font-size: 1.2rem; }
    .hero-stats .stat-item { flex: 0 0 calc(50% - 10px); }
    .hero-stats .stat-item:nth-child(5) { flex: 0 0 calc(100% - 10px); }
    .custom-dev-section { padding: 44px 0 34px; }
    .custom-dev-card { padding: 22px; border-radius: 18px; }
    .cta-qrcode { text-align: center; }
    .cta-qrcode img { display: inline-block; width: auto; max-width: 150px; }
}
