/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 亮色主题（默认） */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #6366f1;
    --accent: #8b5cf6;
    --bg: #f8f9fb;
    --bg-secondary: #f1f3f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fd;
    --border: #e5e7ed;
    --border-light: #d8dae2;
    --text: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 48px rgba(0,0,0,.12);
    --transition: .25s cubic-bezier(.4,0,.2,1);
    --tag-bg: #f4f5f9;
    --tag-border: #e5e7ed;
    --code-bg: #f1f3f7;
    --code-text: #383a42;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #8b5cf6;
    --bg: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: #22222f;
    --border-light: #2a2a3a;
    --text: #e4e4ed;
    --text-secondary: #9d9db0;
    --text-muted: #6b6b80;
    --shadow: 0 4px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
    --tag-bg: rgba(255,255,255,.04);
    --tag-border: #22222f;
    --code-bg: #0d0d16;
    --code-text: #c9d1d9;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(248,249,251,.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(10,10,15,.85);
}

.navbar.scrolled {
    background: rgba(248,249,251,.95);
    box-shadow: 0 1px 20px rgba(99,102,241,.08);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(10,10,15,.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    border: none;
    outline: none;
}

.nav-logo:focus {
    outline: none;
}

.logo-img {
    display: block;
    height: 44px;
    width: auto;
    border: none;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--bg-card);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== Theme Toggle ========== */
.nav-actions {
    display: flex;
    align-items: center;
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-card-hover);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity .25s ease, transform .25s ease;
}

/* 默认亮色模式：显示月亮图标（切换到深色），隐藏太阳 */
:root .icon-sun { opacity: 0; transform: scale(0.6); }
:root .icon-moon { opacity: 1; transform: scale(1); }

[data-theme="dark"] .icon-sun { opacity: 1; transform: scale(1); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: scale(0.6); }

/* ========== Hero ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99,102,241,.12), transparent),
        radial-gradient(ellipse 40% 50% at 80% 80%, rgba(139,92,246,.08), transparent),
        radial-gradient(ellipse 40% 50% at 20% 70%, rgba(99,102,241,.06), transparent);
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.2);
    font-size: 13px;
    color: var(--primary-light);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 40%, #6366f1 80%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99,102,241,.35);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99,102,241,.06);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== Sections Common ========== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ========== Models Section ========== */
.models-section {
    padding: 100px 0;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.filter-btn.active {
    background: rgba(99,102,241,.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99,102,241,.08), transparent);
    opacity: 0;
    transition: opacity .3s;
}

.model-card:hover::before {
    opacity: 1;
}

.model-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.model-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.model-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.icon-text { background: rgba(99,102,241,.12); }
.icon-reasoning { background: rgba(245,158,11,.12); }
.icon-vision { background: rgba(34,197,94,.12); }
.icon-audio { background: rgba(236,72,153,.12); }
.icon-featured { background: rgba(139,92,246,.15); }
.icon-image { background: rgba(6,182,212,.12); }
.icon-video { background: rgba(244,114,82,.12); }

.model-badge {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-hot {
    background: rgba(239,68,68,.15);
    color: #f87171;
}

.badge-new {
    background: rgba(34,197,94,.15);
    color: #4ade80;
}

.badge-popular {
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
}

.model-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.model-id {
    font-size: 13px;
    color: var(--text-muted);
    font-family: "SF Mono", "Fira Code", monospace;
    margin-bottom: 12px;
}

.model-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.model-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--tag-bg);
    color: var(--text-muted);
    border: 1px solid var(--tag-border);
}

/* ========== Features ========== */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: rgba(99,102,241,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-light);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== Guide ========== */
.guide-section {
    padding: 100px 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.step-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.step-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.step-item h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

.step-arrow {
    font-size: 28px;
    color: var(--text-muted);
    font-weight: 300;
}

.code-block {
    max-width: 680px;
    margin: 0 auto;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #22c55e; }

.code-lang {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.code-block pre {
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--code-text);
}

.code-keyword { color: #d73a49; }
.code-string { color: #032f62; }
.code-comment { color: #6a737d; font-style: italic; }
.code-number { color: #005cc5; }

[data-theme="dark"] .code-keyword { color: #ff7b72; }
[data-theme="dark"] .code-string { color: #a5d6ff; }
[data-theme="dark"] .code-comment { color: #6e7681; }
[data-theme="dark"] .code-number { color: #79c0ff; }

/* ========== Contact ========== */
.contact-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99,102,241,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-light);
}

.contact-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    border: none;
    outline: none;
}

.footer-logo:focus {
    outline: none;
}

.footer-logo .logo-img {
    height: 44px;
    border: none;
}

.footer-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
}

.footer-nav a {
    color: var(--text-muted);
    transition: var(--transition);
    padding: 2px 4px;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-sep {
    color: var(--border);
    font-size: 12px;
    user-select: none;
    pointer-events: none;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.footer-bottom .footer-sep {
    margin: 0 6px;
}

.footer-address {
    color: var(--text-muted);
}

.footer-home {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-home:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-muted);
}

.icp {
    font-size: 12px;
}

.icp a {
    color: var(--text-muted);
    transition: var(--transition);
}

.icp a:hover {
    color: var(--text);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: fadeInUp .5s ease both;
}

/* ========== Models More Hint ========== */
.models-more {
    text-align: center;
    padding: 32px 24px;
    margin-top: 32px;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    transition: var(--transition);
}

.models-more:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.models-more-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.models-more p strong {
    color: var(--text);
    font-size: 15px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-actions {
        margin-left: auto;
        padding-left: 16px;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(248,249,251,.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    [data-theme="dark"] .nav-links {
        background: rgba(10,10,15,.98);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .step-item {
        max-width: 100%;
    }

    .footer-nav {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 30px;
    }

    .category-filters {
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
