* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== 导航栏 ===== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

#header-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    width: 100%;
    height: 100%;
}

.logo {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 10%;
    /* logo 距页面左边 10% */
}

#logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    position: absolute;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-right: 10%;
    /* nav-links 右边距 10%，即处于页面 90% 处 */
    flex-shrink: 1;
    /* 宽度不足时收缩间距 */
}

.nav-links li {
    margin-left: 2rem;
    transition: all 0.3s ease;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a.active {
    color: #18d1ff;
    font-weight: bold;
}

/* ===== 主内容 ===== */
main {
    margin-top: 80px;
}

/* ===== Hero 区域 ===== */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.video-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.video-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
}

#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    transform: scale(1.2);
    transform-origin: center;
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* 标题 + 副标题叠加容器：绝对定位在 hero 40% 高度处 */
.hero-title-wrapper {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    overflow: visible;
}

#hero-title-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 副标题绝对定位：叠在标题图上方 */
#hero-subtitle-img {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translate(-43%, -50%);
    width: 45%;
    height: auto;
}

.download-btn,
#download-btn-img {
    width: 405px;
    max-width: 90vw;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

#download-btn-img:hover {
    transform: scale(1.05);
}

/* 下载按钮组：默认横排，固定在 hero 底部 */
.download-buttons {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    /* 横排 */
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

#android-btn-img,
#steam-btn-img {
    width: 405px;
    max-width: 90vw;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#android-btn-img:hover,
#steam-btn-img:hover {
    transform: scale(1.05);
}

/* ===== 通用区域背景 ===== */
.section-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.section-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

#features-bg-img,
#screenshots-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

/* ===== World View 区域 ===== */
#features {
    padding: 5rem 5%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#features h2 {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.worldview-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.worldview-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.worldview-card img {
    width: 400px;
    height: 600px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.worldview-content {
    flex: 1;
    color: #ffffff;
}

.worldview-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.worldview-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== Game Features / Screenshots 区域 ===== */
#screenshots {
    padding: 5rem 5%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#screenshots h2 {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.screenshots-slider {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    width: 100%;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.slider-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.slider-arrow:hover {
    background: rgba(24, 209, 255, 0.8);
}

.slider-arrow-left {
    left: 10px;
}

.slider-arrow-right {
    right: 10px;
}

.screenshot-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 1400px;
    margin: 0 auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

/* 伪元素占位用于居中：当子元素未溢出时自动居中，溢出时则从左边开始平稳滑动不错位 */
.screenshot-container::before,
.screenshot-container::after {
    content: '';
    margin: auto;
}

.screenshot-container::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    scroll-snap-align: center;
}

.screenshot-container img {
    width: 240px;
    height: 426px;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px;
}

.screenshot-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.screenshot-desc {
    color: #ffffff;
    font-size: 1.1rem;
    text-align: center;
    max-width: 240px;
    line-height: 1.4;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 0.5rem;
}

/* ===== 页脚 ===== */
footer {
    position: relative;
    color: white;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.footer-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

#footer-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 120px;
    height: 40px;
    margin-bottom: 1rem;
}

#footer-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== 高度不足时隐藏标题，只显示下载按钮 ===== */
@media (max-height: 520px) {
    .hero-title-wrapper {
        display: none;
    }

    .download-buttons {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }
}

/* 竖屏 或 宽度不足 600px：按钮切竖排；视频显示顶部 */
@media (orientation: portrait),
(max-width: 600px) {
    .download-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (orientation: portrait),
(max-width: 768px) {
    #hero-video {
        object-position: 50% 0%;
        /* 移动端优先显示顶部 */
    }
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .worldview-card {
        flex-direction: column;
        gap: 2rem;
    }

    .worldview-card img {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 2/3;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    #features h2,
    #screenshots h2 {
        font-size: 3rem;
        letter-spacing: 2px;
    }

    .worldview-content h3 {
        font-size: 2rem;
    }

    .worldview-content p {
        font-size: 1.1rem;
    }

    .screenshot-container {
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .screenshot-container img {
        width: 180px;
        height: 320px;
        padding: 6px;
    }

    .screenshot-desc {
        font-size: 1rem;
        max-width: 180px;
    }

    .download-btn,
    #download-btn-img,
    #android-btn-img,
    #steam-btn-img {
        width: 252px;
    }

    /* 移动端：隐藏标题组，只显示下载按钮并居中 */
    .hero-title-wrapper {
        display: none;
    }

    .download-buttons {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }
}