:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    width: 44px;
    height: 44px;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(118, 75, 162, 0.2));
    flex-shrink: 0;
}

.nav-brand .logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hero {
    margin-top: 65px;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-tagline {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    margin-bottom: 1.5rem;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

section {
    padding: 60px 0;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    line-height: 1.6;
}

.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}

.tools {
    background: white;
}

.tools.chinese-models {
    background: var(--bg-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tool-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e5e7eb;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.tool-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.tool-card.featured::before {
    content: '推荐';
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--bg-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-header h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.tool-badge {
    background: var(--bg-gradient);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.tool-badge.hot {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.88rem;
}

.tool-features {
    list-style: none;
}

.tool-features li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.tool-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-detail {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--bg-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-detail:active {
    transform: translateY(0);
}

.stats {
    background: var(--bg-gradient);
    color: white;
}

.stats .section-title,
.stats .section-subtitle {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: clamp(0.8rem, 2vw, 1rem);
    opacity: 0.9;
}

.faq {
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.faq-question {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
    gap: 1rem;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question h3 {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
}

.faq-answer > div {
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.faq-answer ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.faq-answer ul li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
}

.footer {
    background: #1f2937;
    color: white;
    padding: 2.5rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.7;
    font-size: 0.88rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.4rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.88rem;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

.footer-bottom p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0;
    font-size: 0.85rem;
}

.footer-divider {
    color: #4b5563;
}

.beian-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.beian-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.tool-card,
.stat-card {
    animation: fadeInUp 0.5s ease-out;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 16px;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .nav-brand .logo {
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        align-items: flex-start;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f3f4f6;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1rem;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.active {
        display: block;
    }

    .hero {
        margin-top: 56px;
        padding: 50px 0;
    }

    .hero-features {
        gap: 0.5rem;
    }

    .feature-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    section {
        padding: 40px 0;
    }

    .section-subtitle {
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    .features-grid,
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card,
    .tool-card {
        padding: 1.25rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .tool-header h3 {
        font-size: 1.05rem;
    }

    .tool-card.featured::before {
        top: -8px;
        right: 12px;
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem 0.75rem;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-answer > div {
        padding: 0 1rem 1rem 1rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .footer-section ul li {
        margin-bottom: 0;
    }

    .footer-bottom p {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-tagline {
        display: none;
    }

    .hero-features {
        justify-content: center;
    }

    .feature-badge {
        flex: 0 0 auto;
    }

    section {
        padding: 32px 0;
    }

    .feature-card,
    .tool-card {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .faq-question {
        padding: 0.875rem;
    }

    .faq-toggle {
        font-size: 1.25rem;
        width: 24px;
        height: 24px;
    }

    .faq-answer > div {
        padding: 0 0.875rem 0.875rem 0.875rem;
    }

    .faq-answer ul {
        padding-left: 1rem;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .feature-card:hover,
    .tool-card:hover {
        transform: none;
        box-shadow: var(--card-shadow);
    }

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

    .faq-question:hover {
        background: white;
    }

    .feature-card:active,
    .tool-card:active {
        transform: scale(0.98);
    }
}

@media print {
    .navbar,
    .nav-toggle,
    .nav-overlay {
        display: none !important;
    }

    .hero {
        margin-top: 0;
        background: #667eea !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .feature-card,
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-tagline {
        display: none;
    }

    section {
        padding: 30px 0;
    }
}

@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .nav-menu {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}

@media (prefers-color-scheme: dark) {

}
