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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark {
    background: #0f0f1a;
    color: #e0e0e0;
}

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

/* ===== 渐变Banner ===== */
.hero {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    animation: slideInDown 0.6s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeIn 1s ease-out 0.3s both;
}

.hero .btn {
    background: #ff6b35;
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite;
}

.hero .btn:hover {
    background: #e55a2b;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* ===== 圆角卡片 ===== */
.card {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

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

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

body.dark .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* ===== 毛玻璃 ===== */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark .glass {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ===== 网格布局 ===== */
.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: repeat(4, 1fr);
    gap: 20px;
}

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

/* ===== 导航 ===== */
nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark nav {
    background: #12121e;
    border-color: #2a2a3e;
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #e55a2b;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

body.dark .nav-menu a {
    color: #ccc;
}

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

.nav-menu a:hover {
    color: #ff6b35;
    transform: translateY(-1px);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 5px 15px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark .search-box {
    background: #2a2a3e;
}

.search-box:focus-within {
    box-shadow: 0 0 0 2px #ff6b35;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px;
    outline: none;
    width: 150px;
    transition: color 0.3s ease;
}

body.dark .search-box input {
    color: #fff;
}

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

body.dark .search-box input::placeholder {
    color: #777;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ff6b35;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.1);
}

.dark-toggle {
    background: none;
    border: 2px solid #ccc;
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

body.dark .dark-toggle {
    border-color: #ff6b35;
    color: #ff6b35;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: inherit;
    transition: transform 0.2s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 15px;
        gap: 10px;
    }

    .nav-menu.open {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-menu-btn {
        display: block;
    }

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

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

.breadcrumb a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #e55a2b;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 6px;
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a2e;
    color: #bbb;
    padding: 50px 0 20px;
    margin-top: 60px;
}

footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ff6b35;
}

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

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

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom a {
    margin: 0 5px;
}

/* ===== 返回顶部 ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

#backToTop:hover {
    background: #e55a2b;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

/* ===== 轮播图 ===== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 40px;
}

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

.carousel-item {
    min-width: 100%;
    padding: 60px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    text-align: center;
}

.carousel-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.carousel-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 15px;
}

.carousel-btn.next {
    right: 15px;
}

/* ===== 图片懒加载 ===== */
img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* ===== 数字滚动 ===== */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff6b35;
    animation: countUp 2s ease-out;
}

/* ===== 通用 ===== */
h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

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

.badge {
    background: #ff6b35;
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
    transition: background 0.3s ease;
}

.badge:hover {
    background: #e55a2b;
}

/* ===== 滚动动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    .hero p {
        font-size: 1rem;
    }

    .hero .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .card {
        padding: 20px;
    }

    .glass {
        padding: 20px;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ===== 暗色模式额外优化 ===== */
body.dark .breadcrumb {
    color: #999;
}

body.dark .breadcrumb a {
    color: #ff8c5a;
}

body.dark .footer-bottom {
    border-color: #2a2a3e;
}

/* ===== 图片圆角与响应 ===== */
.card img,
.glass img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 15px;
}

/* ===== FAQ 样式 ===== */
[itemscope][itemtype="https://schema.org/FAQPage"] h3 {
    margin-top: 20px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: color 0.3s ease;
}

[itemscope][itemtype="https://schema.org/FAQPage"] h3:hover {
    color: #ff6b35;
}

[itemscope][itemtype="https://schema.org/FAQPage"] p {
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #ff6b35;
}

body.dark [itemscope][itemtype="https://schema.org/FAQPage"] p {
    border-left-color: #ff8c5a;
}

/* ===== HowTo 样式 ===== */
[itemscope][itemtype="https://schema.org/HowTo"] h3 {
    margin-top: 15px;
    margin-bottom: 5px;
}

[itemscope][itemtype="https://schema.org/HowTo"] p {
    margin-bottom: 10px;
}

/* ===== 列表无样式 ===== */
ul[style="list-style:none;"] {
    list-style: none;
    padding: 0;
}

ul[style="list-style:none;"] li {
    margin-bottom: 5px;
}

/* ===== 联系区域 ===== */
#contact .flex-center span {
    background: rgba(255, 107, 53, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

#contact .flex-center span:hover {
    background: rgba(255, 107, 53, 0.2);
}

/* ===== 文章卡片 ===== */
article.card h4 {
    margin-bottom: 8px;
    color: #ff6b35;
}

article.card p {
    font-size: 0.95rem;
}

/* ===== 页脚链接 ===== */
footer ul li {
    margin-bottom: 6px;
}

/* ===== 图片占位 ===== */
img[data-src] {
    background: #e0e0e0;
    border-radius: 16px;
}

body.dark img[data-src] {
    background: #2a2a3e;
}

/* ===== 动画延迟 ===== */
.card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.card:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* ===== 平滑滚动 ===== */
html {
    scroll-behavior: smooth;
}

/* ===== 选中样式 ===== */
::selection {
    background: #ff6b35;
    color: #fff;
}

/* ===== 暗色滚动条 ===== */
body.dark ::-webkit-scrollbar {
    width: 10px;
}

body.dark ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 5px;
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #e55a2b;
}