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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8f0 100%);
    color: #333;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

/* 头部导航 */
header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: background 0.3s;
}

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

header h1 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    transition: transform 0.3s;
}

header h1:hover {
    transform: scale(1.05);
}

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

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

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

nav a:hover {
    color: #e94560;
}

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

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 15px;
    border: none;
    border-radius: 25px 0 0 25px;
    width: 200px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(8px);
    transition: background 0.3s, width 0.3s;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-box input:focus {
    outline: none;
    background: rgba(255,255,255,0.25);
    width: 250px;
}

.search-box button {
    padding: 10px 18px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}

/* Banner 区域 */
.banner {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 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(233,69,96,0.1) 0%, transparent 70%);
    animation: bannerGlow 10s ease-in-out infinite alternate;
}

@keyframes bannerGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20%, 20%); }
}

.banner h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

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

.banner .btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 35px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(233,69,96,0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease 0.4s both;
}

.banner .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(233,69,96,0.5);
}

/* 通用区块 */
.section {
    padding: 70px 0;
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 45px;
    text-align: center;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    border-radius: 3px;
}

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

/* 卡片样式 - 毛玻璃效果 */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.3);
    transition: transform 0.4s, box-shadow 0.4s, background 0.3s;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    background: rgba(255, 255, 255, 0.85);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a1a2e;
    position: relative;
    padding-left: 15px;
}

.card h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #e94560, #ff6b6b);
    border-radius: 2px;
}

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

/* FAQ 样式 */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    transition: transform 0.3s, box-shadow 0.3s;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.faq-question {
    background: rgba(255,255,255,0.8);
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    color: #1a1a2e;
}

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

.faq-question span {
    font-size: 1.5rem;
    color: #e94560;
    transition: transform 0.3s;
}

.faq-answer {
    padding: 0 25px 18px;
    display: none;
    color: #555;
    line-height: 1.7;
}

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

/* 阅读指南步骤 */
.howto-steps {
    counter-reset: step;
    max-width: 700px;
    margin: 0 auto;
}

.howto-step {
    margin-bottom: 25px;
    padding-left: 50px;
    position: relative;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px 20px 20px 60px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 15px;
    top: 20px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(233,69,96,0.3);
}

.howto-step h3 {
    margin-bottom: 8px;
    color: #1a1a2e;
}

/* 文章列表 */
.article-list {
    max-width: 900px;
    margin: 0 auto;
}

.article-item {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border-left: 4px solid #e94560;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.article-item h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #1a1a2e;
}

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

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

.article-item a {
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.article-item a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* 页脚 */
footer {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    color: #ccc;
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

footer a {
    color: #e94560;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

footer .footer-links {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

footer .footer-links a {
    margin: 0 8px;
    font-size: 0.9rem;
}

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

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(233,69,96,0.5);
}

/* 暗色模式 */
.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #222 100%);
    color: #eee;
}

.dark-mode .card {
    background: rgba(40, 40, 60, 0.7);
    backdrop-filter: blur(16px);
    border-color: rgba(255,255,255,0.1);
}

.dark-mode .card:hover {
    background: rgba(50, 50, 70, 0.85);
}

.dark-mode .card h3 {
    color: #eee;
}

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

.dark-mode header {
    background: rgba(10, 10, 20, 0.95);
}

.dark-mode footer {
    background: rgba(10, 10, 20, 0.95);
}

.dark-mode .section-title {
    color: #eee;
}

.dark-mode .faq-item {
    background: rgba(40, 40, 60, 0.6);
    border-color: rgba(255,255,255,0.08);
}

.dark-mode .faq-question {
    background: rgba(40, 40, 60, 0.8);
    color: #eee;
}

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

.dark-mode .faq-answer {
    color: #bbb;
}

.dark-mode .howto-step {
    background: rgba(40, 40, 60, 0.5);
}

.dark-mode .howto-step h3 {
    color: #eee;
}

.dark-mode .article-item {
    background: rgba(40, 40, 60, 0.6);
}

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

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

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

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 滚动动画 - 卡片和元素初始状态由JS控制，这里做备用 */
.card, .article-item, .faq-item, .howto-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible, .article-item.visible, .faq-item.visible, .howto-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        justify-content: center;
        gap: 12px;
    }

    nav a {
        font-size: 0.9rem;
    }

    .search-box input {
        width: 150px;
    }

    .search-box input:focus {
        width: 180px;
    }

    .banner h2 {
        font-size: 2rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .howto-step {
        padding: 15px 15px 15px 55px;
    }

    .howto-step::before {
        left: 12px;
        top: 15px;
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .article-item {
        padding: 18px;
    }

    footer .footer-links a {
        margin: 0 5px;
        font-size: 0.8rem;
    }

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

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }

    .banner {
        padding: 50px 0;
    }

    .banner h2 {
        font-size: 1.6rem;
    }

    .section {
        padding: 40px 0;
    }

    .search-box input {
        width: 120px;
    }

    .search-box input:focus {
        width: 150px;
    }
}