/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    transition: background 0.3s, color 0.3s;
}

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

a:hover {
    text-decoration: underline;
    color: #1557b0;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* 导航吸顶 */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    z-index: 1000;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: background 0.3s, border-color 0.3s;
}

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

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.navbar .nav-links li a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    color: #333;
}

.navbar .nav-links li a:hover {
    background: rgba(26, 115, 232, 0.1);
    color: #1a73e8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    transition: color 0.3s;
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #1a73e8;
}

.breadcrumb span {
    margin: 0 5px;
}

/* Banner 渐变 */
.banner {
    position: relative;
    overflow: hidden;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: gradientShift 8s ease infinite alternate;
}

@keyframes gradientShift {
    0% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    50% {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }
    100% {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    }
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    max-width: 700px;
    margin: 0 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: #f0f0f0;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-controls button {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s, transform 0.2s;
}

.banner-controls button:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 通用区块 */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 圆角卡片 + 毛玻璃效果 */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(224, 224, 224, 0.4);
    border-radius: 16px;
    padding: 25px;
    transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.12);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.9);
}

.card h3 {
    margin-bottom: 10px;
    color: #1a73e8;
    font-size: 1.25rem;
}

.card p {
    color: #555;
    line-height: 1.7;
}

/* 文章列表 */
.article-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(238, 238, 238, 0.6);
    transition: padding-left 0.3s;
}

.article-item:hover {
    padding-left: 10px;
    border-bottom-color: #1a73e8;
}

.article-item h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #222;
    transition: color 0.3s;
}

.article-item:hover h3 {
    color: #1a73e8;
}

.article-item .meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.article-item p {
    color: #555;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #1a73e8;
    font-weight: 500;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 4px;
    transition: margin-left 0.3s;
}

.read-more:hover::after {
    margin-left: 8px;
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(224, 224, 224, 0.4);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-question {
    background: rgba(249, 249, 249, 0.8);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(240, 240, 240, 0.9);
}

.faq-question span {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.faq-answer {
    padding: 15px 20px;
    display: none;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(224, 224, 224, 0.3);
}

.faq-answer.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HowTo */
.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
    padding: 15px;
    border-radius: 12px;
    transition: background 0.3s, transform 0.3s;
}

.howto-step:hover {
    background: rgba(26, 115, 232, 0.04);
    transform: translateX(6px);
}

.howto-step .step-num {
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.2);
    transition: transform 0.3s;
}

.howto-step:hover .step-num {
    transform: scale(1.1);
}

.howto-step h4 {
    margin-bottom: 5px;
    color: #1a73e8;
}

/* 联系方式 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-info div {
    padding: 20px;
    background: rgba(249, 249, 249, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-info div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.contact-info h4 {
    margin-bottom: 8px;
    color: #1a73e8;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ccc;
    padding: 40px 0 20px;
}

.footer a {
    color: #aaa;
    transition: color 0.3s, padding-left 0.3s;
}

.footer a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer .grid-4 {
    gap: 30px;
}

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

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(51, 51, 51, 0.6);
    margin-top: 30px;
    font-size: 0.9rem;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    z-index: 999;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

/* 数字动画 */
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 暗黑模式 */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(51, 51, 51, 0.5);
}

body.dark-mode .navbar .nav-links li a {
    color: #ccc;
}

body.dark-mode .navbar .nav-links li a:hover {
    background: rgba(26, 115, 232, 0.15);
    color: #6c63ff;
}

body.dark-mode .card {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(51, 51, 51, 0.4);
    color: #e0e0e0;
}

body.dark-mode .card h3 {
    color: #6c63ff;
}

body.dark-mode .card p {
    color: #bbb;
}

body.dark-mode .card:hover {
    background: rgba(40, 40, 40, 0.8);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .faq-item {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(51, 51, 51, 0.4);
}

body.dark-mode .faq-question {
    background: rgba(42, 42, 42, 0.8);
    color: #e0e0e0;
}

body.dark-mode .faq-question:hover {
    background: rgba(60, 60, 60, 0.9);
}

body.dark-mode .faq-answer {
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top-color: rgba(51, 51, 51, 0.3);
    color: #ccc;
}

body.dark-mode .banner {
    animation: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .banner-content {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .footer {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 100%);
}

body.dark-mode .contact-info div {
    background: rgba(42, 42, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(51, 51, 51, 0.3);
    color: #ccc;
}

body.dark-mode .contact-info h4 {
    color: #6c63ff;
}

body.dark-mode .article-item {
    border-bottom-color: rgba(51, 51, 51, 0.4);
}

body.dark-mode .article-item h3 {
    color: #ddd;
}

body.dark-mode .article-item:hover h3 {
    color: #6c63ff;
}

body.dark-mode .article-item .meta {
    color: #888;
}

body.dark-mode .article-item p {
    color: #bbb;
}

body.dark-mode .section-title p {
    color: #aaa;
}

body.dark-mode .breadcrumb {
    color: #aaa;
}

body.dark-mode .howto-step:hover {
    background: rgba(26, 115, 232, 0.08);
}

body.dark-mode .howto-step h4 {
    color: #6c63ff;
}

body.dark-mode .howto-step p {
    color: #bbb;
}

body.dark-mode .menu-toggle {
    color: #ccc;
}

.dark-toggle {
    background: none;
    border: 1px solid rgba(204, 204, 204, 0.4);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s, border-color 0.3s;
}

.dark-toggle:hover {
    background: rgba(26, 115, 232, 0.1);
    border-color: #1a73e8;
}

/* 搜索 */
.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 8px;
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.search-box button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.2);
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        border-bottom: 1px solid rgba(224, 224, 224, 0.5);
        padding: 20px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    }

    body.dark-mode .navbar .nav-links {
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom-color: rgba(51, 51, 51, 0.5);
    }

    .navbar .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .banner {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 1.8rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .back-to-top {
        bottom: 100px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
    }

    .search-box button {
        width: 100%;
    }

    .howto-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .howto-step .step-num {
        margin-bottom: 10px;
    }

    .footer .grid-4 {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .banner-content {
        padding: 15px;
        margin: 0 10px;
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }
}

/* 额外细节 */
::selection {
    background: rgba(26, 115, 232, 0.2);
    color: #1a73e8;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1a73e8, #6c63ff);
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #2a2a2a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6c63ff, #1a73e8);
}