/* style.css */
@media (max-width: 768px) {
    nav ul {
        gap: 10px;
    }

    nav ul li a {
        font-size: 12px;
    }

    .logo {
        height: 28px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.4s ease, color 0.4s ease;
}

body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.fade-in {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
}

.container {
    width: 90%;
    max-width: 800px; /* 更紧凑的宽度 */
    margin: auto;
    padding: 30px 15px; /* 更小内边距 */
}

header {
    background-color: var(--header-bg);
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 80px;
}

/* 让 header 内容垂直居中 */
header .container {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 标题区域防止被 header 遮挡 */
.hero {
    scroll-margin-top: 90px;
}

/* Logo 适配 header 高度 */
.logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}
.logo {
    float: left;
    height: 80px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px; /* 原来是 20px */
}

nav ul li a {
    text-decoration: none;
    color: var(--nav-link-color);
    font-weight: 500;
    font-size: 14px; /* 原来是 16px */
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

button {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px; /* 调整字体大小 */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
.hero {
    min-height: 60vh; /* 原来是 100vh */
    padding: 60px 20px 30px;
    text-align: center;
    color: var(--hero-text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    scroll-margin-top: 60px;
}

.hero h1 {
    font-size: 2.5rem; /* 原来是 4rem */
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 600px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 123, 255, 0.4);
}

.features-preview {
    padding: 60px 0;
    background-color: transparent; /* 删除背景色 */
}

.features-preview h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--section-title-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-item {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: var(--card-title-color);
}

.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: var(--footer-bg);
    padding: 30px 0;
    text-align: center;
    color: var(--footer-text-color);
    font-size: 0.9rem;
}

/* 禁用所有背景图片 */
.parallax,
.hero {
    background-image: none !important;
    background-color: transparent !important;
}

/* 导航栏居中 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 统一按钮样式 */
button, .btn {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover, .btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* 英雄区域布局 */

/* 修复标题被 header 遮挡的问题 */
.hero {
    min-height: 60vh;
    padding: 60px 20px 30px;
    text-align: center;
    color: var(--hero-text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    scroll-margin-top: 80px; /* 必须大于 header 的高度 */
}

/* header 固定定位，确保不会影响布局 */
header {
    background-color: var(--header-bg);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 123, 255, 0.4);
}