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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.5s, color 0.5s;
}

a {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

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

/* 头部 - 渐变毛玻璃效果 */
header {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(22, 33, 62, 0.85) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.5s, box-shadow 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #e74c3c, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    background: linear-gradient(45deg, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: #fff;
    transform: translateY(-2px);
}

nav a:hover::before {
    width: 60%;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 4px 4px 4px 18px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.2);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 10px;
    outline: none;
    width: 200px;
    font-size: 14px;
    transition: width 0.3s;
}

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

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

.search-box button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Banner - 渐变与毛玻璃 */
.banner {
    background: linear-gradient(135deg, #0f3460 0%, #533483 50%, #e74c3c 100%);
    color: white;
    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(255,255,255,0.05) 0%, transparent 70%);
    animation: bannerGlow 8s ease-in-out infinite alternate;
}

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

.banner h1 {
    font-size: 46px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #fff, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    padding: 15px 30px;
    border-radius: 30px;
    display: inline-block;
}

.banner .btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 16px 50px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.banner .btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.5);
    text-decoration: none;
}

/* 通用区块标题 */
.section {
    padding: 60px 0;
    transition: background 0.5s;
}

.section-title {
    font-size: 34px;
    text-align: center;
    margin-bottom: 45px;
    color: #2c3e50;
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
}

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

/* 网格卡片 - 毛玻璃圆角 */
.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(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    border-color: rgba(231, 76, 60, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 14px;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.card p {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* FAQ 样式 */
.faq-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 15px;
    padding: 0 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 20px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    transition: color 0.3s;
}

.faq-question:hover {
    color: #e74c3c;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: #e74c3c;
    transition: transform 0.4s, color 0.3s;
    font-weight: 300;
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
    color: #f1c40f;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.4s ease;
    padding: 0 0 0 0;
    color: #555;
    line-height: 1.8;
    font-size: 15px;
}

.faq-item.active .faq-answer {
    max-height: 400px;
    padding: 0 0 20px 0;
}

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

.article-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
}

.article-card .date {
    color: #999;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.article-card h3 {
    margin: 12px 0;
    font-size: 20px;
    color: #2c3e50;
    transition: color 0.3s;
}

.article-card:hover h3 {
    color: #e74c3c;
}

.article-card p {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

.article-card .read-more {
    color: #e74c3c;
    font-weight: 600;
    display: inline-block;
    margin-top: 12px;
    transition: all 0.3s;
}

.article-card .read-more:hover {
    transform: translateX(5px);
    text-decoration: none;
}

/* 教程区域 */
.howto-steps {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s;
}

.howto-steps:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

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

.howto-steps li {
    margin-bottom: 18px;
    font-size: 16px;
    color: #444;
    line-height: 1.8;
    padding: 8px 15px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 10px;
    transition: background 0.3s;
}

.howto-steps li:hover {
    background: rgba(231, 76, 60, 0.1);
}

.howto-steps li::marker {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
}

.howto-steps p {
    margin-bottom: 15px;
    color: #555;
}

/* 联系信息 */
.contact-info {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s;
}

.contact-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.contact-info p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.8;
}

.contact-info strong {
    color: #2c3e50;
}

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

.dark-mode .card,
.dark-mode .article-card,
.dark-mode .faq-item,
.dark-mode .howto-steps,
.dark-mode .contact-info {
    background: rgba(42, 42, 62, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

.dark-mode .card h3,
.dark-mode .article-card h3,
.dark-mode .faq-question,
.dark-mode .contact-info strong {
    color: #fff;
}

.dark-mode .card p,
.dark-mode .article-card p,
.dark-mode .faq-answer,
.dark-mode .howto-steps p,
.dark-mode .howto-steps li,
.dark-mode .contact-info p {
    color: #bbb;
}

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

.dark-mode .section-title::after {
    background: linear-gradient(90deg, #e74c3c, #f1c40f);
}

.dark-mode header {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.95), rgba(20, 20, 40, 0.95));
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .banner {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #2e0a1a 100%);
}

.dark-mode .howto-steps li {
    background: rgba(231, 76, 60, 0.1);
}

.dark-mode .howto-steps li:hover {
    background: rgba(231, 76, 60, 0.2);
}

.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ccc;
    padding: 50px 0 30px;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

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

.footer h4 {
    color: #fff;
    margin-bottom: 18px;
    font-size: 16px;
    letter-spacing: 1px;
    position: relative;
}

.footer h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: #e74c3c;
    margin-top: 8px;
}

.footer ul {
    list-style: none;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    transition: all 0.4s;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.5);
}

/* 滚动动画（由JS触发） */
.card, .article-card, .faq-item, .howto-steps, .contact-info {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

    nav {
        justify-content: center;
        gap: 8px;
    }

    nav a {
        padding: 6px 12px;
        font-size: 14px;
    }

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

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

    .banner {
        padding: 50px 0;
    }

    .banner h1 {
        font-size: 28px;
    }

    .banner p {
        font-size: 16px;
        padding: 12px 20px;
    }

    .banner .btn {
        padding: 14px 35px;
        font-size: 16px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 26px;
    }

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

    .card, .article-card, .howto-steps, .contact-info {
        padding: 20px;
    }

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

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

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

    .faq-question {
        font-size: 16px;
        padding: 16px 0;
    }

    .faq-item {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    nav a {
        font-size: 13px;
        padding: 5px 10px;
    }

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

    .search-box button {
        padding: 8px 14px;
        font-size: 12px;
    }

    .banner h1 {
        font-size: 24px;
    }

    .banner p {
        font-size: 14px;
    }

    .section-title {
        font-size: 22px;
    }

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