/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 全局变量定义 */
:root {
    --main-color: #c72c41; /* 主色调-暗红（贴合游戏风格） */
    --dark-color: #1a1a1a; /* 深色背景 */
    --light-color: #f5f5f5; /* 浅色文本 */
    --gray-color: #333333; /* 灰色背景 */
    --shadow-color: rgba(0, 0, 0, 0.7); /* 阴影颜色 */
}

body {
    background-color: var(--dark-color);
    color: var(--light-color);
    scroll-behavior: smooth; /* 平滑滚动 */
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5rem;
    background-color: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-bottom: 2px solid var(--main-color);
}

.logo img {
    height: 50px;
}

.nav ul {
    display: flex;
    gap: 2.5rem;
}

.nav-item a {
    color: var(--light-color);
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-item a:hover {
    color: var(--main-color);
}

.nav-item.active a {
    color: var(--main-color);
}

.nav-item.active a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--main-color);
}

/* 横幅样式 */
.banner {
    height: 100vh;
    background: url("https://game.gtimg.cn/images/dwrg/cp/a20240429logo/img/bg.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 74px;
}

.banner-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.banner h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    text-shadow: 0 0 10px rgba(199, 44, 65, 0.5);
}

.banner p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

.btn {
    padding: 1rem 2.5rem;
    background-color: var(--main-color);
    color: var(--light-color);
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(199, 44, 65, 0.4);
}

.btn:hover {
    background-color: #a82336;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(199, 44, 65, 0.6);
}

/* 通用章节样式 */
.character-section, .feature-section, .about-section {
    padding: 8rem 5rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 5rem;
    color: var(--main-color);
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--main-color);
}

/* 角色展示样式 */
.character-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.character-card {
    background-color: var(--gray-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.character-card:hover {
    transform: translateY(-10px);
}

.character-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.character-card h3 {
    padding: 1rem;
    font-size: 1.5rem;
    color: var(--main-color);
}

.character-card p {
    padding: 0 1rem 1.5rem;
    color: #ccc;
}

/* 核心玩法样式 */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.feature-item {
    background-color: var(--gray-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--main-color);
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--main-color);
}

.feature-item p {
    color: #ccc;
    line-height: 1.6;
}

/* 关于游戏样式 */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--gray-color);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #eee;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* 底部样式 */
.footer {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    text-align: center;
    border-top: 2px solid var(--main-color);
    color: #999;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header {
        padding: 1rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }

    .banner h1 {
        font-size: 2.5rem;
    }

    .banner p {
        font-size: 1.2rem;
    }

    .character-section, .feature-section, .about-section {
        padding: 5rem 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}