/* 全局重置与基础样式 */
* {
    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: #f9f9fb;
    transition: background 0.3s, color 0.3s;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f0f1a;
        color: #e0e0e0;
    }
    .card {
        background: #1a1a2e;
        color: #ddd;
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
    .card h3 {
        color: #ffc107;
    }
    .faq-item {
        border-bottom-color: #2a2a3e;
    }
    .faq-question {
        color: #ffc107;
    }
    .howto-step {
        background: #1a1a2e;
    }
    .knowledge-links a {
        background: #2a2a3e;
        color: #ffc107;
    }
    .knowledge-links a:hover {
        background: #3a3a4e;
    }
    .footer {
        background: #0a0a1a;
    }
    .back-to-top {
        background: #ffc107;
        color: #1a1a2e;
    }
    nav {
        background: #0a0a1a;
    }
    .hero {
        background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    }
    a {
        color: #66b0ff;
    }
    h1, h2, h3 {
        color: #f0f0ff;
    }
}

/* 头部与导航 */
header, main, footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a:hover {
    text-decoration: underline;
}

nav {
    background: #1a1a2e;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.95);
    transition: background 0.3s;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    color: #ddd;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffc107;
    transition: width 0.3s;
}

nav ul li a:hover {
    color: #fff;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 通用段落 */
section {
    padding: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }
section:nth-child(11) { animation-delay: 1.1s; }
section:nth-child(12) { animation-delay: 1.2s; }
section:nth-child(13) { animation-delay: 1.3s; }
section:nth-child(14) { animation-delay: 1.4s; }
section:nth-child(15) { animation-delay: 1.5s; }

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

h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #1a1a2e;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    margin-top: 8px;
    border-radius: 2px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

/* Hero区域 - 渐变Banner */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,193,7,0.1) 0%, transparent 70%);
    animation: heroGlow 6s ease infinite;
}

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

.hero h1 {
    color: #fff;
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin: 20px 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.hero .cta {
    display: inline-block;
    background: #ffc107;
    color: #1a1a2e;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.hero .cta:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
    text-decoration: none;
}

/* 网格布局 - 圆角卡片 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card h3 {
    color: #1a1a2e;
}

/* FAQ样式 */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(255, 193, 7, 0.05);
    border-radius: 8px;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a1a2e;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.3s;
}

.faq-question:hover {
    background: rgba(26, 26, 46, 0.05);
}

.faq-answer {
    padding-top: 10px;
    display: none;
    padding-left: 10px;
    animation: fadeIn 0.3s ease;
}

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

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}

/* 使用指南步骤 */
.howto-step {
    margin-bottom: 15px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #ffc107;
}

.howto-step:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.howto-step strong {
    color: #1a1a2e;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.footer a {
    color: #aaa;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ffc107;
    text-decoration: none;
}

.footer .legal {
    margin-top: 20px;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    padding-top: 15px;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-to-top.show {
    display: block;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.back-to-top:hover {
    background: #ffc107;
    color: #1a1a2e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* 通用按钮 */
.btn {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
    text-decoration: none;
}

/* 知识链接 */
.knowledge-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.knowledge-links a {
    background: #e8f0fe;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1a1a2e;
    transition: all 0.3s;
}

.knowledge-links a:hover {
    background: #d2e3fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* 引用块 */
blockquote {
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 15px 0;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    transition: background 0.3s;
}

blockquote:hover {
    background: rgba(255, 193, 7, 0.1);
}

/* 列表样式 */
ul, ol {
    padding-left: 20px;
    margin: 10px 0;
}

li {
    margin-bottom: 8px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 10px;
    }

    nav ul li a {
        padding: 8px 0;
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .hero {
        padding: 40px 15px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    section {
        padding: 30px 0;
    }

    .faq-question {
        font-size: 0.95rem;
    }

    .knowledge-links {
        gap: 8px;
    }

    .knowledge-links a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .cta {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .card {
        padding: 15px;
    }
}

/* 暗色模式更细致的调整 */
@media (prefers-color-scheme: dark) {
    nav {
        background: rgba(10, 10, 26, 0.95);
    }

    .card {
        background: rgba(26, 26, 46, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .card:hover {
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    }

    .howto-step {
        background: rgba(26, 26, 46, 0.8);
        border-left-color: #ffc107;
    }

    .howto-step:hover {
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    }

    .faq-question:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    blockquote {
        background: rgba(255, 193, 7, 0.08);
    }

    blockquote:hover {
        background: rgba(255, 193, 7, 0.12);
    }

    .knowledge-links a {
        background: rgba(42, 42, 62, 0.9);
    }

    .knowledge-links a:hover {
        background: rgba(58, 58, 78, 0.9);
    }

    .footer {
        background: #0a0a1a;
    }

    .back-to-top {
        background: #ffc107;
        color: #1a1a2e;
    }

    .back-to-top:hover {
        background: #ffb300;
        color: #1a1a2e;
    }

    .btn {
        background: #3a7bd5;
    }

    .btn:hover {
        background: #2a6bc5;
    }

    .hero .cta {
        background: #ffc107;
        color: #1a1a2e;
    }

    .hero .cta:hover {
        background: #ffb300;
    }

    h2::after {
        background: linear-gradient(90deg, #ffc107, #ff9800);
    }
}

/* 滚动条美化（可选） */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar-track {
        background: #1a1a2e;
    }

    ::-webkit-scrollbar-thumb {
        background: #444;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}