/* 全局重置与基础样式 */
* { 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; line-height: 1.6; color: #222; background: linear-gradient(135deg, #f8f9fa, #e9ecef); scroll-behavior: smooth; min-height: 100vh; }
a { color: #e63946; text-decoration: none; transition: color 0.3s ease; }
a:hover { text-decoration: underline; color: #c1121f; }
img, svg { max-width: 100%; height: auto; display: block; }
::selection { background: #e63946; color: #fff; }

/* 导航吸顶 */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 2px solid #e63946; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 64px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: background 0.3s; }
.navbar .logo { font-size: 1.6rem; font-weight: 800; color: #e63946; letter-spacing: 2px; text-shadow: 0 2px 4px rgba(230,57,70,0.2); }
.navbar nav a { margin: 0 14px; font-size: 0.95rem; color: #333; font-weight: 500; position: relative; transition: color 0.3s; }
.navbar nav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #e63946; transition: width 0.3s ease; }
.navbar nav a:hover { color: #e63946; text-decoration: none; }
.navbar nav a:hover::after { width: 100%; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #333; transition: transform 0.3s; }
.menu-toggle:hover { transform: scale(1.1); }
@media (max-width: 768px) {
    .navbar nav { display: none; flex-direction: column; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); position: absolute; top: 64px; left: 0; width: 100%; border-bottom: 2px solid #e63946; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
    .navbar nav.active { display: flex; animation: slideDown 0.3s ease; }
    @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
    .navbar nav a { padding: 12px 0; border-bottom: 1px solid #eee; font-size: 1rem; }
    .navbar nav a:last-child { border-bottom: none; }
    .menu-toggle { display: block; }
}

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

/* 面包屑 */
.breadcrumb { font-size: 0.9rem; color: #666; padding: 12px 0; background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: 12px; padding: 10px 20px; margin-bottom: 20px; display: inline-block; }
.breadcrumb span { margin: 0 4px; color: #e63946; }

/* 通用标题 */
h1 { font-size: 2.4rem; margin: 24px 0 16px; color: #1a1a2e; text-shadow: 0 2px 8px rgba(0,0,0,0.05); background: linear-gradient(135deg, #1a1a2e, #e63946); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
h2 { font-size: 1.8rem; margin: 40px 0 20px; border-left: 6px solid #e63946; padding-left: 16px; color: #1a1a2e; position: relative; }
h2::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 6px; background: linear-gradient(180deg, #e63946, #ffb703); border-radius: 3px; }
h3 { font-size: 1.4rem; margin: 28px 0 14px; color: #333; }
h4 { font-size: 1.15rem; margin: 20px 0 10px; color: #555; }
p { margin-bottom: 16px; color: #444; }

/* 卡片 */
.card { background: rgba(255,255,255,0.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 20px; padding: 24px; margin-bottom: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.08); border: 1px solid rgba(255,255,255,0.3); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

/* 网格 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* 按钮 */
.btn { display: inline-block; background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; padding: 12px 28px; border-radius: 50px; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(230,57,70,0.3); position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s; }
.btn:hover { background: linear-gradient(135deg, #c1121f, #a00d1a); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,57,70,0.4); text-decoration: none; }
.btn:hover::before { left: 100%; }

/* Banner 轮播 */
.carousel { position: relative; overflow: hidden; border-radius: 24px; margin: 24px 0; background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); min-height: 350px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.carousel-slide { display: none; padding: 56px 40px; color: #fff; animation: fadeSlide 0.5s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.carousel-slide.active { display: block; }
.carousel-slide h2 { color: #fff; border-left-color: #ffb703; font-size: 2rem; }
.carousel-slide p { color: #ddd; font-size: 1.1rem; }
.carousel-dots { text-align: center; padding: 16px 0; position: absolute; bottom: 10px; left: 0; right: 0; }
.carousel-dots span { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.4); margin: 0 8px; cursor: pointer; transition: all 0.3s ease; }
.carousel-dots span.active { background: #e63946; transform: scale(1.2); box-shadow: 0 0 12px rgba(230,57,70,0.6); }

/* 数字动画 */
.stat { text-align: center; padding: 32px; background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); border-radius: 20px; transition: transform 0.3s; }
.stat:hover { transform: scale(1.02); }
.stat .number { font-size: 3rem; font-weight: 700; color: #e63946; text-shadow: 0 2px 8px rgba(230,57,70,0.2); }
.stat .label { font-size: 1rem; color: #666; margin-top: 8px; font-weight: 500; }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(224,224,224,0.6); padding: 18px 0; transition: background 0.3s; }
.faq-item:hover { background: rgba(230,57,70,0.03); }
.faq-question { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; color: #1a1a2e; }
.faq-question::after { content: "+"; font-size: 1.5rem; color: #e63946; transition: transform 0.3s ease; }
.faq-item.open .faq-question::after { content: "−"; transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; padding-top: 0; color: #555; }
.faq-item.open .faq-answer { max-height: 600px; padding-top: 14px; }

/* 文章卡片 */
.article-card { border-bottom: 1px solid rgba(238,238,238,0.6); padding: 18px 0; transition: padding-left 0.3s; }
.article-card:hover { padding-left: 8px; }
.article-card h4 { margin: 0 0 6px; }
.article-card h4 a { color: #1a1a2e; transition: color 0.3s; }
.article-card h4 a:hover { color: #e63946; }
.article-card .meta { font-size: 0.85rem; color: #999; }

/* 页脚 */
footer { background: linear-gradient(135deg, #1a1a2e, #16213e); color: #ddd; padding: 48px 16px 24px; margin-top: 48px; border-top: 3px solid #e63946; }
footer a { color: #ffb703; transition: color 0.3s; }
footer a:hover { color: #ffd166; }
footer .grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
@media (max-width: 768px) { footer .grid-4 { grid-template-columns: 1fr 1fr; } }
footer h4 { color: #fff; margin-bottom: 12px; font-size: 1.1rem; position: relative; display: inline-block; }
footer h4::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 30px; height: 2px; background: #e63946; }

/* 返回顶部 */
.back-to-top { position: fixed; bottom: 40px; right: 40px; background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.25); transition: all 0.3s ease; opacity: 0; pointer-events: none; z-index: 999; border: 2px solid rgba(255,255,255,0.2); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 8px 24px rgba(230,57,70,0.4); }

/* 暗黑模式 */
.dark-mode { background: linear-gradient(135deg, #121212, #1a1a2e); color: #e0e0e0; }
.dark-mode .card { background: rgba(30,30,30,0.8); backdrop-filter: blur(16px); border-color: rgba(255,255,255,0.1); color: #ddd; }
.dark-mode .navbar { background: rgba(30,30,30,0.85); backdrop-filter: blur(20px); border-bottom-color: #e63946; }
.dark-mode .navbar nav a { color: #ccc; }
.dark-mode h1 { background: linear-gradient(135deg, #f0f0f0, #e63946); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.dark-mode h2, .dark-mode h3, .dark-mode h4 { color: #f0f0f0; }
.dark-mode p { color: #bbb; }
.dark-mode footer { background: linear-gradient(135deg, #0a0a0a, #121212); }
.dark-mode .breadcrumb { background: rgba(30,30,30,0.6); color: #aaa; }
.dark-mode .stat { background: rgba(30,30,30,0.7); }
.dark-mode .stat .label { color: #aaa; }
.dark-mode .faq-item { border-bottom-color: rgba(51,51,51,0.6); }
.dark-mode .faq-question { color: #e0e0e0; }
.dark-mode .article-card { border-bottom-color: rgba(51,51,51,0.6); }
.dark-mode .article-card h4 a { color: #e0e0e0; }
.dark-mode .article-card h4 a:hover { color: #e63946; }
.dark-mode .menu-toggle { color: #ccc; }
.dark-mode .carousel { background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #0f3460); }

/* 滚动动画 */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* 站内搜索 */
.search-box { display: flex; max-width: 400px; margin: 16px 0; }
.search-box input { flex: 1; padding: 10px 18px; border: 2px solid rgba(221,221,221,0.6); border-radius: 30px 0 0 30px; outline: none; background: rgba(255,255,255,0.5); backdrop-filter: blur(8px); transition: border-color 0.3s; }
.search-box input:focus { border-color: #e63946; }
.search-box button { padding: 10px 22px; background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; border: none; border-radius: 0 30px 30px 0; cursor: pointer; transition: background 0.3s; }
.search-box button:hover { background: linear-gradient(135deg, #c1121f, #a00d1a); }

/* 图片懒加载占位 */
.lazy-placeholder { background: linear-gradient(135deg, #eee, #ddd); min-height: 100px; display: flex; align-items: center; justify-content: center; color: #aaa; border-radius: 12px; }

/* 其他 */
.contact-info p { margin: 6px 0; }
.tag { background: linear-gradient(135deg, #e63946, #c1121f); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; display: inline-block; margin-right: 6px; box-shadow: 0 2px 6px rgba(230,57,70,0.2); }

/* 响应式微调 */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .carousel-slide { padding: 32px 20px; }
    .carousel-slide h2 { font-size: 1.4rem; }
    .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.2rem; }
}