/* ====== 基础 ====== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background: #f8f8f8;
}

a {
    text-decoration: none;
}

/* ====== Hero（PC 默认背景） ====== */
.hero {
    height: 600px;
    background: url("../images/headerBg2.jpg") center / cover no-repeat;
    position: relative;
    color: #fff;
}

.hero-inner {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    inset: 0;
    pointer-events: none; /* 可选：防止挡住点击 */
}

/* 整行容器 */
.hero-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: url("../images/titleBg.png") center / cover no-repeat;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: auto;
}

/* 左侧 LOGO + 名称 */
.hero-bar-left {
    display: flex;
    align-items: center;
}

.game-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    margin-right: 14px;
}

.game-name {
    font-size: 40px;
    font-weight: bold;
    color: #efddc9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* 右侧按钮 */
.hero-bar-right .play-btn {
    width: 155px; /* 根据你的按钮图尺寸微调 */
    height: 48px;
    padding: 12px 36px;
    font-size: 20px;
    text-align: center;
    border-radius: 6px;
    background: url("../images/btnBg.png") center / cover no-repeat;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* ====== LOGO ====== */
.logo {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    background: url("../images/titleBg.png") center / cover no-repeat;
    color: #efddc9;
}

.logo img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-right: 16px;
}

.logo span {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ====== 按钮 ====== */
.hero-buttons button {
    padding: 14px 36px;
    font-size: 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 15px;
}

.play-btn {
    background: #d63b3b;
    color: #fff;
}

.download-btn {
    background: #2f7adf;
    color: #fff;
}

/* ====== 导航 ====== */
.nav {
    position: sticky;
    top: 0;
    background: #222;
    z-index: 99;
}

.nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.nav li {
    color: #fff;
    margin: 0 20px;
    cursor: pointer;
}

.nav li.active {
    color: #ff4d4d;
    border-bottom: 2px solid #ff4d4d;
}

/* ====== 通用区块 ====== */
.section {
    padding: 60px 10%;
}

.section h2 {
    text-align: center;
    font-size: 32px;
}

.section-desc {
    text-align: center;
    font-size: 18px;
}

/* ====== 角色 ====== */
.characters {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.character {
    width: 30%;
    text-align: center;
}

.character img {
    width: 100%;
    border-radius: 8px;
}

/* ====== 新闻 ====== */
.news-list {
    max-width: 600px;
    margin: 30px auto 0;
    font-size: 18px;
}

.news-list li {
    margin-bottom: 12px;
}

/* ====== 弹窗 ====== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.modal-content {
    width: 300px;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin: 20vh auto;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 6px;
}

.android {
    background: #3db54a;
    color: #fff;
}

.ios {
    background: #000;
    color: #fff;
}

.close {
    background: #ccc;
}

/* ====== 页脚 ====== */
.footer {
    text-align: center;
    padding: 20px;
    color: #e6d3a3;
    font-size: 14px;
    background: url("../images/titleBg.png") center / cover no-repeat;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ====== 游戏特色区块 ====== */
.feature-section {
    background-color: #777777;
    position: relative;
    color: #f5f5f5;
}

/* 遮罩层，保证文字清晰 */
.feature-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

.feature-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-section h2 {
    color: #f3d7a2;
    margin-bottom: 30px;
}

.feature-text {
    font-size: 18px;
    line-height: 1.9;
    margin-bottom: 18px;
    text-align: justify;
}

/* 特色条目 */
.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.feature-list li {
    margin-bottom: 30px;
    padding-left: 18px;
    border-left: 3px solid #caa46a;
}

.feature-list h3 {
    font-size: 18px;
    color: #f1c98a;
    margin-bottom: 8px;
}

.feature-list p {
    font-size: 15px;
    line-height: 1.8;
    color: #eee;
}

/* 角色展示整体区域 */
#roles {
    position: relative;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

#roles h2 {
    text-align: center;
    font-size: 32px;
    color: #fff; /* 适配背景图的白色文字 */
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

/* 轮播外层容器：核心背景图+遮罩 */
.carousel-wrap {
    position: relative;
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    /* 自定义背景图：替换为你的背景图路径，no-repeat不重复，cover铺满，center居中 */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 背景遮罩：降低背景图亮度，保证轮播内容清晰 */
.carousel-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* 轮播核心容器：限制宽度，溢出隐藏 */
.characters-carousel {
    position: relative;
    width: 90%; /* 从70%调至90%，让容器更宽，适配竖屏图 */
    height: 650px; /* 适度加高，给竖屏图足够展示空间，可按需调整 */
    margin: 0 auto;
    padding: 20px 0; /* 上下内边距，让图和容器有间距，不贴边 */
    overflow: hidden;
    z-index: 2;
}

/* 轮播列表：横向排列，过渡动画实现轮播 */
.carousel-list {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    height: 100%;
    transition: transform 0.5s ease; /* 轮播切换动画，0.5秒平滑过渡 */
}

/* 轮播项：竖屏截图容器，等宽等高 */
.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0; /* 清除默认外边距，防止图偏移 */
}

/* 竖屏游戏截图：等比缩放，不拉伸，占满容器高度 */
.carousel-item img {
    max-width: 90%; /* 关键：用max-width限制，适配容器宽度，不超界 */
    max-height: 85%; /* 配合max-width，等比缩放，不拉伸 */
    width: auto;
    height: auto; /* 恢复auto，让图根据容器等比适配 */
    border-radius: 8px;
    border: 3px solid #f5d76e;
    box-shadow: 0 0 20px rgba(245, 215, 110, 0.5);
    object-fit: contain; /* 关键：保证图片完整显示，不裁剪、不拉伸 */
}

/* 角色名样式：居中显示，美化 */
.carousel-item p {
    margin-top: 20px;
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* 左右切换箭头：定位+美化 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}

/* 左箭头 */
.carousel-arrow.prev {
    left: 20px;
}

/* 右箭头 */
.carousel-arrow.next {
    right: 20px;
}

/* 箭头悬停效果：加深背景，放大一点 */
.carousel-arrow:hover {
    background: rgba(245, 215, 110, 0.8);
    transform: translateY(-50%) scale(1.1);
}

/* 底部圆点指示器容器 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

/* 圆点样式 */
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 当前页圆点高亮样式 */
.carousel-dot.active {
    background: #f5d76e;
    transform: scale(1.3);
}

/* ====== 手机端适配（切换背景图） ====== */
@media (max-width: 768px) {
    .characters-carousel {
        height: 450px; /* 小屏幕适度加高，适配竖屏图 */
        width: 95%; /* 小屏幕容器拉满，最大化展示 */
    }

    .carousel-item p {
        font-size: 20px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    /* 小屏幕图片适配，保证完整显示 */
    .carousel-item img {
        max-width: 95%;
        max-height: 80%;
    }

    .hero {
        height: 480px;
        background: url("../images/headerBg.jpg") center / cover no-repeat;
        position: relative;
    }

    .hero-inner {
        left: 0px;
        bottom: 0px;
        inset: 0;
        pointer-events: none; /* 可选：防止挡住点击 */
    }

    .hero-bar {
        padding: 12px 20px;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        pointer-events: auto;
    }

    .game-logo {
        width: 44px;
        height: 44px;
    }

    .game-name {
        font-size: 26px;
    }

    .hero-bar-right .play-btn {
        width: 155px; /* 根据你的按钮图尺寸微调 */
        height: 48px;
        padding: 10px 24px;
        font-size: 16px;
        text-align: center;
        background: url("../images/btnBg.png") center / cover no-repeat;
    }

    .logo img {
        width: 48px;
        height: 48px;
    }

    .logo span {
        font-size: 32px;
    }

    .hero-buttons button {
        width: 140px;
        margin-bottom: 10px;
    }

    .nav ul {
        overflow-x: auto;
        justify-content: flex-start;
        padding-left: 10px;
    }

    .section {
        padding: 40px 6%;
    }

    .characters {
        flex-direction: column;
    }

    .character {
        width: 100%;
    }

    .feature-section {
        background-color: #777777;
    }

    .feature-text {
        font-size: 16px;
    }

    .feature-list h3 {
        font-size: 16px;
    }

    .feature-list p {
        font-size: 14px;
    }
}
