/* ===== 全局重置与基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    color: #222;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body.dark a {
    color: #8ab4f8;
}

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

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

body.dark .header {
    background: rgba(30, 30, 30, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .logo {
    color: #ffd700;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav a {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

body.dark .nav a {
    color: #ccc;
}

.nav a:hover,
.nav a.active {
    border-bottom-color: #1a73e8;
    color: #1a73e8;
    text-decoration: none;
}

body.dark .nav a:hover {
    color: #8ab4f8;
    border-bottom-color: #8ab4f8;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

body.dark .mobile-menu-btn {
    color: #ccc;
}

.dark-toggle {
    background: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background 0.2s, transform 0.2s;
}

body.dark .dark-toggle {
    border-color: #555;
    color: #ccc;
}

.dark-toggle:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

body.dark .dark-toggle:hover {
    background: #333;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.dark .hero {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a2a4a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 50%, rgba(26, 115, 232, 0.1) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 5%); }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
    display: inline-block;
    background: #ffd700;
    color: #1a1a2e;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: #ffed4a;
    text-decoration: none;
}

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

/* ===== Section ===== */
.section {
    padding: 60px 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }
.section:nth-child(7) { animation-delay: 0.6s; }
.section:nth-child(8) { animation-delay: 0.7s; }

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #1a73e8;
    margin: 12px auto 0;
    border-radius: 2px;
}

body.dark .section-title::after {
    background: #8ab4f8;
}

/* ===== Grid & Cards ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark .card {
    background: rgba(42, 42, 42, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body.dark .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.2) rotate(5deg);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

body.dark .card p {
    color: #aaa;
}

/* ===== About ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.05rem;
}

.about-content p {
    margin-bottom: 16px;
}

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

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a73e8;
    transition: color 0.3s;
}

body.dark .stat-number {
    color: #8ab4f8;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

body.dark .stat-label {
    color: #aaa;
}

/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 0;
    transition: background 0.2s;
}

body.dark .faq-item {
    border-bottom-color: #333;
}

.faq-item:hover {
    background: rgba(26, 115, 232, 0.02);
}

body.dark .faq-item:hover {
    background: rgba(138, 180, 248, 0.05);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 0;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #1a73e8;
}

body.dark .faq-question:hover {
    color: #8ab4f8;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
    color: #555;
    font-size: 0.95rem;
}

body.dark .faq-answer {
    color: #aaa;
}

.faq-answer.open {
    max-height: 500px;
    padding: 12px 16px;
}

.faq-toggle {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

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

/* ===== HowTo ===== */
.howto-steps {
    max-width: 700px;
    margin: 0 auto;
}

.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.howto-step:hover {
    transform: translateX(8px);
}

.step-number {
    background: #1a73e8;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.3s;
}

body.dark .step-number {
    background: #8ab4f8;
    color: #121212;
}

.howto-step:hover .step-number {
    transform: scale(1.15);
    background: #ffd700;
    color: #1a1a2e;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.step-content p {
    color: #555;
    font-size: 0.95rem;
}

body.dark .step-content p {
    color: #aaa;
}

/* ===== Articles ===== */
.articles .article-card {
    padding: 20px;
}

.article-card .article-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
}

body.dark .article-card .article-date {
    color: #999;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.article-card p {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

body.dark .article-card p {
    color: #aaa;
}

.article-card .read-more {
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.article-card .read-more:hover {
    color: #ffd700;
    padding-left: 5px;
    text-decoration: none;
}

/* ===== Contact ===== */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.contact-info .contact-label {
    font-weight: 600;
    display: inline-block;
    width: 80px;
}

.search-box {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 20px auto;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

body.dark .search-box input {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

.search-box input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

body.dark .search-box input:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
}

.search-box button {
    padding: 10px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
}

body.dark .search-box button {
    background: #8ab4f8;
    color: #121212;
}

.search-box button:hover {
    background: #1557b0;
    transform: scale(1.05);
}

body.dark .search-box button:hover {
    background: #6c9cf0;
}

.search-results {
    max-width: 600px;
    margin: 20px auto;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s, padding-left 0.2s;
}

body.dark .search-result-item {
    border-bottom-color: #333;
}

.search-result-item:hover {
    background: #f5f5f5;
    padding-left: 20px;
}

body.dark .search-result-item:hover {
    background: #2a2a2a;
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 20px 20px;
    font-size: 0.9rem;
}

body.dark .footer {
    background: #0a0a1a;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 30px;
}

.footer h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1rem;
}

.footer a {
    color: #aaa;
    display: block;
    margin-bottom: 6px;
    transition: color 0.2s, padding-left 0.2s;
}

.footer a:hover {
    color: #fff;
    padding-left: 5px;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 16px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.85rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
}

body.dark .back-to-top {
    background: #8ab4f8;
    color: #121212;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    background: #1557b0;
}

body.dark .back-to-top:hover {
    background: #6c9cf0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    body.dark .nav {
        background: rgba(30, 30, 30, 0.95);
    }
    .nav.open {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 16px;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .section {
        padding: 40px 16px;
    }
    .card {
        padding: 16px;
    }
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    .search-box button {
        width: 100%;
    }
}