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

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f5f6fa;
    color: #2c3e50;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a2e;
        color: #e0e0e0;
    }
    .card, .faq-item, .howto-steps, .article-item {
        background: #2d2d44 !important;
        color: #ccc;
    }
    .card p, .faq-item p, .article-item p {
        color: #bbb !important;
    }
    .section h2 {
        color: #e0e0e0;
    }
    .section h3 {
        color: #ccc;
    }
    .section h4 {
        color: #aaa;
    }
    header {
        background: #16213e !important;
    }
    footer {
        background: #0f3460 !important;
    }
    .banner {
        background: linear-gradient(135deg, #16213e, #0f3460) !important;
    }
    .back-to-top {
        background: #e94560 !important;
    }
    nav a {
        color: #ddd !important;
    }
    nav a:hover {
        color: #e94560 !important;
    }
    .logo span {
        color: #e94560 !important;
    }
}

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

/* ===== 头部 ===== */
header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background: rgba(44, 62, 80, 0.92);
    transition: background 0.3s;
}

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

.logo {
    font-size: 1.6rem;
    font-weight: bold;
}

.logo span {
    color: #e67e22;
    transition: color 0.3s;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color 0.3s, transform 0.2s;
    position: relative;
}

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

nav a:hover {
    color: #e67e22;
    transform: translateY(-1px);
}

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

/* ===== Banner ===== */
.banner {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: bannerGlow 8s infinite alternate;
}

@keyframes bannerGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(10%, 10%) rotate(10deg); }
}

.banner h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.banner p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

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

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

.section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 30px;
    border-left: 5px solid #e67e22;
    padding-left: 15px;
    transition: color 0.3s;
}

.section h3 {
    font-size: 1.3rem;
    margin: 25px 0 15px;
    color: #34495e;
}

.section h4 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: #7f8c8d;
}

/* ===== 网格布局 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* ===== 卡片 ===== */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.85);
}

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

.card h3 {
    margin-top: 0;
}

.card p {
    color: #555;
    transition: color 0.3s;
}

/* ===== FAQ ===== */
.faq-item {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.85);
}

.faq-item:hover {
    transform: scale(1.01);
}

.faq-item h3 {
    margin: 0;
    font-size: 1.1rem;
}

.faq-item p {
    display: none;
    margin-top: 10px;
    color: #444;
}

.faq-item.active p {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== HowTo ===== */
.howto-steps {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.85);
}

.howto-steps ol {
    padding-left: 20px;
}

.howto-steps li {
    margin-bottom: 15px;
}

/* ===== 文章列表 ===== */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.85);
}

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

.article-item h3 {
    font-size: 1.1rem;
}

.article-item .meta {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 5px 0;
}

.article-item a {
    color: #e67e22;
    text-decoration: none;
    transition: color 0.2s;
}

.article-item a:hover {
    color: #d35400;
}

/* ===== 页脚 ===== */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    margin-top: 50px;
}

footer .grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    margin: 5px 0;
    transition: color 0.2s, padding-left 0.2s;
}

footer a:hover {
    color: #e67e22;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding: 20px 0 0;
    border-top: 1px solid #34495e;
    margin-top: 30px;
}

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

.back-to-top.show {
    display: flex;
    animation: fadeInUp 0.4s ease;
}

.back-to-top:hover {
    background: #d35400;
    transform: scale(1.1);
}

/* ===== 滚动动画（通用） ===== */
.section {
    opacity: 0;
    transform: translateY(40px);
    animation: scrollReveal 0.8s ease 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:nth-child(9) { animation-delay: 0.8s; }

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    nav {
        margin-top: 10px;
    }
    nav a {
        margin: 0 10px;
        font-size: 0.85rem;
    }
    .banner h1 {
        font-size: 2rem;
    }
    .banner p {
        font-size: 1rem;
    }
    .section h2 {
        font-size: 1.5rem;
    }
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
    .article-list {
        grid-template-columns: 1fr;
    }
    footer .grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== 毛玻璃卡片增强 ===== */
.card, .faq-item, .howto-steps, .article-item {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (prefers-color-scheme: dark) {
    .card, .faq-item, .howto-steps, .article-item {
        background: rgba(45, 45, 68, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}