/* 全局样式和变量定义 */
:root {
    --primary-color: #0ea5e9;
    --secondary-color: #64748b;
    --background-color: #f8fbff;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border-color: rgba(13, 23, 42, 0.08);
    --shadow-color: rgba(13, 23, 42, 0.12);
    --hover-bg-color: rgba(255, 255, 255, 0.9);
    --blue: #1d4ed8;
    --indigo: #6366f1;
    --violet: #a78bfa;
    --cyan: #22d3ee;
    --emerald: #10b981;
    --amber: #f59e0b;
}

[data-theme="dark"] {
    --primary-color: #22d3ee;
    --secondary-color: #cbd5e1;
    --background-color: #0b1120;
    --text-color: #e5e7eb;
    --card-bg: rgba(17, 25, 40, 0.6);
    --card-border-color: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --hover-bg-color: rgba(30, 41, 59, 0.9);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><circle cx="1" cy="1" r="1" fill="%23e9eef5"/></svg>');
    background-repeat: repeat;
    background-size: 28px 28px;
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><circle cx="1" cy="1" r="1" fill="%231a2332"/></svg>');
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 头部导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background 0.3s ease;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background-image: linear-gradient(90deg, var(--blue), var(--indigo), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-link {
    color: var(--secondary-color) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero区域 */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 4.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background-image: linear-gradient(90deg, var(--blue), var(--indigo), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 18px auto 0;
    max-width: 760px;
}

/* 特性介绍区域 */
.features {
    padding: 80px 0;
}

.feature-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    padding: 26px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 24px var(--shadow-color), 0 0 0 1px rgba(99,102,241,0.08) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.feature-box:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99,102,241,0.12) inset;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 600ms linear;
    background-color: rgba(14, 165, 233, 0.35);
    pointer-events: none;
}

@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.feature-box .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* 模型展示区域 */
.models {
    padding: 80px 0;
    background: transparent;
}

/* 按钮样式 */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.22);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.32);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* 页脚 */
footer {
    background: transparent;
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.0rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
}

/* 分页样式 */
.pagination {
    margin-top: 40px;
}

.page-item .page-link {
    color: #666;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0 14px;
    background-color: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] .page-item .page-link {
    background-color: rgba(17, 25, 40, 0.85);
    color: var(--secondary-color);
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .page-item .page-link:hover {
    background-color: rgba(30, 41, 59, 1);
}

.page-item .page-link:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3);
}

.page-item.disabled .page-link {
    color: #ccc;
    background-color: #f8f9fa;
    border-color: #ddd;
}

.pagination .page-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    display: none;
}

.aurora span {
    position: absolute;
    width: 52vw;
    height: 52vw;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    mix-blend-mode: screen;
    animation: auroraMove var(--dur, 18s) ease-in-out infinite;
}

.aurora span:nth-child(1) {
    top: -12%;
    left: -14%;
    background: radial-gradient(closest-side, rgba(37, 99, 235, 0.26), transparent 60%);
    --dur: 16s;
}

.aurora span:nth-child(2) {
    bottom: -18%;
    right: -10%;
    background: radial-gradient(closest-side, rgba(14, 165, 233, 0.24), transparent 60%);
    --dur: 20s;
}

.aurora span:nth-child(3) {
    top: 35%;
    right: -22%;
    width: 42vw;
    height: 42vw;
    background: radial-gradient(closest-side, rgba(16, 185, 129, 0.22), transparent 60%);
    --dur: 24s;
}

.aurora span:nth-child(4) {
    bottom: 6%;
    left: -8%;
    width: 36vw;
    height: 36vw;
    background: radial-gradient(closest-side, rgba(167, 139, 250, 0.20), transparent 60%);
    --dur: 22s;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #1d4ed8, #22d3ee, #10b981);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    z-index: 1000;
}

@keyframes auroraMove {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(3%, -3%, 0) rotate(18deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    box-shadow: 0 8px 24px var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 168px;
}

.stat h3 {
    margin: 0;
    font-size: 24px;
    color: var(--primary-color);
}

.stat p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--secondary-color);
}

.features-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    padding: 24px 18px;
    background-color: rgba(255,255,255,0.4);
}
.features-container::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
    background: var(--blue);
}

.feature-icon {
    font-size: 28px;
    color: var(--primary-color);
    background-color: rgba(14,165,233,0.12);
    padding: 10px;
    border-radius: 12px;
}

.feature-content h4 {
    margin: 10px 0 8px;
    font-size: 18px;
}

.section-guide {
    padding: 60px 0 20px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.guide-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 8px 24px var(--shadow-color);
    backdrop-filter: blur(12px);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
}

.additional-info .feature-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.code-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.code-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 12px;
    position: relative;
}

.code-block h5 {
    margin: 0 0 8px;
    padding-right: 72px;
}

.code-block pre {
    margin: 0;
    overflow: auto;
    max-height: 240px;
}

.code-block code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    display: block;
}

@media (max-width: 992px) {
    .code-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .code-grid { grid-template-columns: 1fr; }
    .code-box .code-grid {
        display: grid;
        grid-template-columns: 1fr;
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .code-box .code-block {
        min-width: 0;
        width: 100%;
    }
}

.code-box {
    display: block;
    text-align: left;
    width: 100%;
    overflow: hidden;
}
.code-box .feature-content { width: 100%; }
.code-box .code-grid { margin-top: 8px; }

.additional-info .code-box {
    display: block;
}

.code-box .code-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
}

.code-box .code-block {
    flex: 0 0 auto;
    min-width: 360px;
    scroll-snap-align: start;
}

.code-actions-float {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    gap: 6px;
    z-index: 1;
}
.code-btn {
    border: 1px solid var(--card-border-color);
    background: transparent;
    color: var(--secondary-color);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.code-btn:hover { background: var(--hover-bg-color); }

.code-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}
.code-modal.open { display: flex; }
.code-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 12px;
    padding: 16px;
    width: min(920px, 92vw);
    max-height: 82vh;
    box-shadow: 0 16px 36px var(--shadow-color);
}
.code-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.code-modal-content pre { margin: 0; overflow: auto; }

.channel-section {
    padding: 60px 0 20px;
}

.channel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.channel-meta h2 {
    margin: 0 0 10px;
}

.channel-meta .meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.channel-desc {
    margin: 6px 0 8px;
    color: var(--secondary-color);
}

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

.channel-link {
    color: var(--primary-color);
    text-decoration: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--primary-color);
    background-color: rgba(14,165,233,0.12);
    border: 1px solid rgba(14,165,233,0.25);
}

.badge-outline {
    background: transparent;
}

.badge-warn {
    color: #fff;
    background-color: var(--amber);
    border-color: var(--amber);
}

.info-card {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 16px;
}

.callout {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-left: 4px solid var(--amber);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.callout h3 {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.callout ul {
    padding-left: 18px;
    margin: 10px 0 0;
}

.callout-icon {
    font-size: 20px;
    color: var(--amber);
}

@media (max-width: 640px) {
    .channel-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .channel-actions { width: 100%; }
    .channel-actions .btn { flex: 1; }
}

.models-section {
    padding: 56px 0;
}

.models-blue {
    background-color: transparent;
}

.models-sky {
    background-color: transparent;
}

.models-emerald {
    background-color: transparent;
}

.models-blue,
.models-sky,
.models-emerald {
    position: relative;
}

.models-blue::before,
.models-sky::before,
.models-emerald::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
}

.models-blue::before { background: var(--blue); }
.models-sky::before { background: var(--cyan); }
.models-emerald::before { background: var(--emerald); }

.models-indigo {
    background-color: transparent;
    position: relative;
}
.models-indigo::before { background: var(--indigo); }

.models-violet {
    background-color: transparent;
    position: relative;
}
.models-violet::before { background: var(--violet); }

.models-amber {
    background-color: transparent;
    position: relative;
}
.models-amber::before { background: var(--amber); }

.models-section h2 {
    margin: 0 0 16px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.models-section h2 .feature-icon {
    background: none;
    padding: 0;
    border-radius: 0;
}

.models-section .model-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
    will-change: transform;
}

.models-section .model-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.models-section .model-card ul {
    padding-left: 18px;
    margin: 10px 0 0;
}

.footer {
    background: transparent;
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.theme-toggle {
    position: fixed;
    right: 20px;
    top: 72px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--card-border-color);
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 8px 24px var(--shadow-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(14, 165, 233, 0.25);
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.scenarios {
    padding: 60px 0;
    position: relative;
    background-color: rgba(255,255,255,0.4);
}
.scenarios::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 6px;
    background: var(--cyan);
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.scenario-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.scenario-card h3 {
    margin: 10px 0 6px;
    font-size: 18px;
}

.scenario-card p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 14px;
}

[data-theme="dark"] .navbar {
    background: rgba(16, 24, 40, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .features-container {
    background-color: rgba(0,0,0,0.2);
}

[data-theme="dark"] .scenarios {
    background-color: rgba(0,0,0,0.2);
}

[data-theme="dark"] #loading-overlay {
    background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 992px) {
    .features-container,
    .guide-grid,
    .scenario-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .features-container,
    .guide-grid,
    .scenario-grid {
        grid-template-columns: 1fr;
    }
    .hero { padding: 100px 0 60px; }
    .hero-actions { flex-direction: column; }
}
.loading-wrap { display: flex; align-items: center; flex-direction: column; gap: 12px; }
.loading-brand {
    font-weight: 800;
    font-size: 1.25rem;
    background-image: linear-gradient(90deg, var(--blue), var(--indigo), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.loading-dots { display: inline-flex; gap: 6px; }
.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.5;
    animation: pulse 1s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.4; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(0.9); opacity: 0.4; } }
