/* assets/css/index.css - index.php 页面专属样式（从内联 <style> 提取）*/

/* ── Hero 光球动画 ── */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 8s ease-in-out infinite;
}
.hero-bg .orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -200px; left: -150px;
    animation-delay: 0s;
}
.hero-bg .orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    bottom: -100px; right: -100px;
    animation-delay: -3s;
}
.hero-bg .orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 40%; left: 60%;
    animation-delay: -5s;
}
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -30px) scale(1.05); }
    66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* ── 网格线 ── */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ── Hero 区域 ── */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease both;
}
.hero-badge-dot {
    width: 8px; height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.3); }
}
.hero-title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-title .gradient-text {
    background: linear-gradient(135deg, #fff 30%, #818cf8 60%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.6s ease 0.3s both;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.25s;
    box-shadow: 0 4px 24px rgba(99,102,241,0.4);
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99,102,241,0.5);
}
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.25s;
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.12);
    color: white;
    transform: translateY(-2px);
}

/* ── Stats 区域 ── */
.stats-section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
}
.stat-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    overflow: hidden;
    transition: all 0.3s;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(99,102,241,0.3);
    transform: translateY(-4px);
}
.stat-card-icon {
    width: 56px; height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.stat-card:nth-child(1) .stat-card-icon { background: rgba(99,102,241,0.2); }
.stat-card:nth-child(2) .stat-card-icon { background: rgba(6,182,212,0.2); }
.stat-card:nth-child(3) .stat-card-icon { background: rgba(139,92,246,0.2); }
.stat-card-value {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease both;
}
.stat-card:nth-child(1) .stat-card-value { animation-delay: 0.4s; }
.stat-card:nth-child(2) .stat-card-value { animation-delay: 0.5s; }
.stat-card:nth-child(3) .stat-card-value { animation-delay: 0.6s; }
.stat-card-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}
.stat-card-sublabel {
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

/* ── API 示例区域 ── */
.api-section {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-tag {
    display: inline-block;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.25);
    color: #a5b4fc;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.section-desc {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}
.api-example-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
}
.api-example-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 1.5rem;
}
.api-tab {
    padding: 0.9rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all 0.2s;
}
.api-tab.active {
    color: #818cf8;
    border-bottom-color: #6366f1;
}
.api-example-body {
    padding: 2rem;
}
.code-block {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre;
    overflow-x: auto;
}
.code-block .c-key   { color: #f472b6; }
.code-block .c-str   { color: #34d399; }
.code-block .c-num   { color: #fbbf24; }
.code-block .c-keyword { color: #818cf8; }
.code-block .c-comment  { color: rgba(255,255,255,0.3); }

/* ── Features 区域 ── */
.features-section {
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
}
.feature-card:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(99,102,241,0.25);
    transform: translateY(-3px);
}
.feature-card-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.feature-card:nth-child(1) .feature-card-icon { background: rgba(99,102,241,0.2); }
.feature-card:nth-child(2) .feature-card-icon { background: rgba(6,182,212,0.2); }
.feature-card:nth-child(3) .feature-card-icon { background: rgba(139,92,246,0.2); }
.feature-card:nth-child(4) .feature-card-icon { background: rgba(16,185,129,0.2); }
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── CTA 区域 ── */
.cta-section {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.cta-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(6,182,212,0.2));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 24px;
    padding: 4rem 2rem;
}
.cta-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.cta-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ── 动画 ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 响应式 ── */
@media (max-width: 600px) {
    .topnav { padding: 0.8rem 1rem; }
    .hero-section { padding: 7rem 1.5rem 3rem; }
    .stats-section,
    .api-section,
    .features-section,
    .cta-section { padding: 3rem 1rem; }
    .cta-card { padding: 2.5rem 1.5rem; }
}
