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

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

body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* 导航 */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

.logo svg {
    width: 120px;
    height: auto;
}

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

nav ul li a {
    padding: 8px 14px;
    border-radius: 30px;
    transition: background 0.3s, transform 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    background: rgba(233,69,96,0.3);
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #fff;
    color: #fff;
    font-size: 24px;
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background: #1a1a2e;
        padding: 10px;
        border-radius: 16px;
    }
    nav ul.open {
        display: flex;
    }
}

/* Hero Banner 渐变毛玻璃 */
.hero {
    background: linear-gradient(135deg, #0f3460, #e94560, #533483);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero .btn {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(233,69,96,0.4);
}

/* 通用卡片 */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(8px);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

body.dark-mode .card {
    background: #1e1e2e;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* 网格 */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* 模块间距 */
section {
    padding: 60px 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #e94560;
    margin-top: 8px;
    border-radius: 4px;
}

.text-center {
    text-align: center;
}

/* 面包屑 */
.breadcrumb {
    background: #f0f0f0;
    padding: 12px 0;
}

body.dark-mode .breadcrumb {
    background: #1c1c2a;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb li+li::before {
    content: '›';
    margin-right: 8px;
    color: #999;
}

/* 轮播 */
.carousel {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    padding: 0 10px;
}

/* 底部 */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
}

footer a {
    color: #e94560;
}

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

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* 暗黑切换 */
.dark-toggle {
    background: none;
    border: 2px solid #fff;
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, color 0.3s;
}

.dark-toggle:hover {
    background: rgba(255,255,255,0.1);
}

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

.back-top:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #ddd;
    padding: 16px 0;
}

body.dark-mode .faq-item {
    border-color: #333;
}

.faq-question {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-top: 8px;
}

.faq-item.open .faq-answer {
    max-height: 400px;
}

/* 动画占位 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 数字动画 */
.count-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e94560;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #ccc;
    flex: 1;
}

.search-box button {
    background: #e94560;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #d63850;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
}

/* SVG 占位背景 */
.svg-placeholder {
    background: #e0e0e0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

body.dark-mode .svg-placeholder {
    background: #2a2a3a;
}