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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

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

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

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }
    a {
        color: #82b1ff;
    }
    a:hover {
        color: #ffd700;
    }
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(26, 26, 46, 0.9);
    transition: background 0.3s, backdrop-filter 0.3s;
}

@media (prefers-color-scheme: dark) {
    header {
        background: rgba(18, 18, 18, 0.9);
        box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    transition: transform 0.3s;
}

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

.logo span {
    color: #fff;
}

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

nav ul li a {
    color: #ccc;
    font-size: 15px;
    padding: 5px 0;
    transition: color 0.3s, transform 0.3s;
    position: relative;
}

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

nav ul li a:hover {
    color: #ffd700;
    transform: translateY(-2px);
}

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

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: background 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 2px #ffd700;
}

.search-box input::placeholder {
    color: #aaa;
}

.search-box button {
    padding: 8px 16px;
    background: #ffd700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #1a1a2e;
    transition: background 0.3s, transform 0.3s;
}

.search-box button:hover {
    background: #e6c200;
    transform: translateY(-2px);
}

/* 面包屑 */
.breadcrumb {
    background: #e9ecef;
    padding: 10px 0;
    font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    .breadcrumb {
        background: #1e1e1e;
        color: #ccc;
    }
    .breadcrumb a {
        color: #82b1ff;
    }
}

.breadcrumb a {
    color: #1a73e8;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #ffd700;
}

/* Hero 区域 */
.hero {
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 20px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ffd700;
    color: #1a1a2e;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn:hover {
    background: #e6c200;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* 通用 Section */
.section {
    padding: 50px 0;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ffd700;
    margin: 10px auto 0;
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    .section-title {
        color: #e0e0e0;
    }
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

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

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

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

.card h3 {
    color: #1a1a2e;
    margin-bottom: 10px;
}

.card p {
    color: #555;
}

@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(30, 30, 30, 0.9);
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    .card h3 {
        color: #e0e0e0;
    }
    .card p {
        color: #bbb;
    }
    .card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    }
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

@media (prefers-color-scheme: dark) {
    .faq-item {
        border-color: #444;
    }
}

.faq-question {
    background: #f1f3f5;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question::after {
    content: "+";
    font-size: 20px;
    transition: transform 0.3s;
}

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

.faq-answer {
    padding: 15px 20px;
    display: none;
    background: #fff;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.faq-answer.show {
    display: block;
}

@media (prefers-color-scheme: dark) {
    .faq-question {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    .faq-question:hover {
        background: #333;
    }
    .faq-answer {
        background: #1e1e1e;
        color: #ccc;
    }
}

/* HowTo 步骤 */
.howto-steps {
    list-style: none;
    counter-reset: step;
}

.howto-steps li {
    counter-increment: step;
    margin-bottom: 15px;
    padding-left: 40px;
    position: relative;
    transition: transform 0.3s;
}

.howto-steps li:hover {
    transform: translateX(5px);
}

.howto-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    background: #ffd700;
    color: #1a1a2e;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    transition: transform 0.3s, background 0.3s;
}

.howto-steps li:hover::before {
    transform: scale(1.1);
    background: #e6c200;
}

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

.article-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-item h4 {
    color: #1a1a2e;
    margin-bottom: 8px;
}

.article-item .date {
    color: #888;
    font-size: 13px;
}

.article-item .summary {
    color: #555;
    margin: 10px 0;
}

.article-item a {
    color: #1a73e8;
    font-weight: bold;
    transition: color 0.3s;
}

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

@media (prefers-color-scheme: dark) {
    .article-item {
        background: #1e1e1e;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    .article-item h4 {
        color: #e0e0e0;
    }
    .article-item .summary {
        color: #bbb;
    }
}

/* 联系我们 */
.contact-info {
    background: #e9ecef;
    padding: 40px 0;
}

@media (prefers-color-scheme: dark) {
    .contact-info {
        background: #1e1e1e;
    }
}

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

/* Footer */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
    transition: background 0.3s;
}

@media (prefers-color-scheme: dark) {
    .footer {
        background: #0a0a0a;
    }
}

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

.footer a:hover {
    color: #ffd700;
}

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

.footer-links a {
    font-size: 14px;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffd700;
    transition: width 0.3s;
}

.footer-links a:hover::after {
    width: 100%;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 13px;
}

/* 回到顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ffd700;
    color: #1a1a2e;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border: none;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    visibility: hidden;
    animation: fadeInUp 0.5s ease-out forwards;
    animation-delay: 2s;
}

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

.back-to-top:hover {
    background: #e6c200;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* 滚动动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    nav ul {
        justify-content: center;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 16px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    .section-title {
        font-size: 24px;
    }
    .card {
        padding: 20px;
    }
}