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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.8;
    transition: background 0.4s ease, color 0.4s ease;
}

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

a:hover {
    color: #ffa07a;
}

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

/* ===== 导航吸顶 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
    padding: 10px 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}

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

.navbar .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff6b6b;
    background: linear-gradient(135deg, #ff6b6b, #ffa07a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .logo span {
    color: #e0e0e0;
    -webkit-text-fill-color: #e0e0e0;
}

.navbar nav a {
    margin: 0 12px;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
    color: #ccc;
    transition: color 0.3s;
}

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

.navbar nav a:hover {
    color: #fff;
}

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

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.search-box input {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(42, 42, 74, 0.6);
    backdrop-filter: blur(4px);
    color: #e0e0e0;
    width: 180px;
    transition: border-color 0.3s, background 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b6b;
    background: rgba(42, 42, 74, 0.8);
}

.search-box button {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b, #e55a5a);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

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

.breadcrumb a {
    color: #ff6b6b;
}

.breadcrumb span {
    color: #888;
}

/* ===== Banner 渐变轮播 ===== */
.banner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin: 20px 0;
    height: 380px;
    background: linear-gradient(145deg, #1a1a3e, #2a1a3e);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(255,160,122,0.05));
}

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

.banner-slide h2 {
    font-size: 2.4rem;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #fff, #ffa07a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-slide p {
    font-size: 1.15rem;
    color: #ddd;
    max-width: 700px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

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

.banner-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    backdrop-filter: blur(2px);
}

.banner-dots span.active {
    background: #ff6b6b;
    transform: scale(1.2);
}

.banner-dots span:hover {
    background: rgba(255, 107, 107, 0.7);
}

/* ===== 模块通用 ===== */
.section {
    padding: 60px 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.section-title {
    font-size: 2.2rem;
    color: #ff6b6b;
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #ff6b6b, #ffa07a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ffa07a);
    margin: 12px auto 0;
    border-radius: 4px;
}

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

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

/* ===== 圆角卡片 + 毛玻璃 + hover ===== */
.card {
    background: rgba(30, 30, 54, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s, background 0.3s;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.2);
    background: rgba(40, 40, 70, 0.8);
    border-color: rgba(255, 107, 107, 0.2);
}

.card h3 {
    color: #ffa07a;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

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

/* ===== FAQ 毛玻璃 ===== */
.faq-item {
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
    padding: 18px 0;
    transition: background 0.3s;
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question {
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffa07a;
    font-size: 1.1rem;
    padding: 4px 0;
}

.faq-question::after {
    content: '+';
    font-size: 1.6rem;
    color: #ff6b6b;
    transition: transform 0.4s ease;
    font-weight: 300;
}

.faq-item.open .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s;
    padding-top: 0;
    color: #bbb;
    padding-left: 4px;
}

.faq-item.open .faq-answer {
    max-height: 600px;
    padding-top: 18px;
}

/* ===== HowTo 步骤 ===== */
.howto-step {
    background: rgba(30, 30, 54, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 22px 26px;
    margin-bottom: 18px;
    border-left: 4px solid #ff6b6b;
    transition: transform 0.3s, box-shadow 0.3s;
}

.howto-step:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.1);
}

.howto-step h4 {
    color: #ffa07a;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

/* ===== 文章列表 ===== */
.article-item {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.2);
    transition: background 0.3s;
    border-radius: 12px;
    padding-left: 12px;
    padding-right: 12px;
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.article-item svg {
    flex-shrink: 0;
    width: 140px;
    height: 90px;
    border-radius: 12px;
    background: rgba(42, 42, 74, 0.5);
    transition: transform 0.3s;
}

.article-item:hover svg {
    transform: scale(1.03);
}

.article-item .info {
    flex: 1;
}

.article-item .info h3 {
    color: #e0e0e0;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.article-item:hover .info h3 {
    color: #ffa07a;
}

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

.article-item .info p {
    color: #aaa;
}

.article-item .info .read-more {
    color: #ff6b6b;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s;
}

.article-item .info .read-more:hover {
    transform: translateX(4px);
}

/* ===== 数字动画 ===== */
.counter-wrap {
    text-align: center;
    padding: 30px 0;
}

.counter-wrap .number {
    font-size: 3.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b, #ffa07a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-wrap .label {
    color: #aaa;
    font-size: 1rem;
    margin-top: 5px;
}

/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #ff6b6b, #e55a5a);
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    border: none;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
}

/* ===== 暗黑模式切换按钮 ===== */
.dark-mode-toggle {
    position: fixed;
    bottom: 105px;
    right: 40px;
    background: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 999;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    background: rgba(255, 107, 107, 0.7);
}

/* ===== 页脚 ===== */
.footer {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px 0 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(42, 42, 74, 0.3);
}

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

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

.footer a {
    display: block;
    margin: 6px 0;
    color: #aaa;
    transition: color 0.3s, transform 0.3s;
}

.footer a:hover {
    color: #ff6b6b;
    transform: translateX(4px);
}

.footer .copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(42, 42, 74, 0.3);
    margin-top: 30px;
    color: #888;
    font-size: 0.9rem;
}

/* ===== 滚动动画 ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .navbar nav {
        display: none;
        width: 100%;
        margin-top: 12px;
        flex-direction: column;
        align-items: center;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(12px);
        border-radius: 12px;
        padding: 12px 0;
    }

    .navbar nav.show {
        display: flex;
    }

    .navbar nav a {
        margin: 10px 0;
        font-size: 1rem;
    }

    .menu-toggle {
        display: block;
    }

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

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

    .banner {
        height: 280px;
    }

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

    .banner-slide p {
        font-size: 0.95rem;
    }

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

    .article-item {
        flex-direction: column;
    }

    .article-item svg {
        width: 100%;
        height: 160px;
    }

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

    .dark-mode-toggle {
        bottom: 75px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .section {
        padding: 40px 0;
    }

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

@media (max-width: 480px) {
    .banner {
        height: 240px;
        border-radius: 12px;
    }

    .banner-slide h2 {
        font-size: 1.3rem;
    }

    .banner-slide p {
        font-size: 0.85rem;
    }

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

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