:root {
    --white-alpha-10: rgba(255, 255, 255, 0.1);
    --white-alpha-20: rgba(255, 255, 255, 0.2);
    --white-alpha-30: rgba(255, 255, 255, 0.3);
    --white-alpha-50: rgba(255, 255, 255, 0.5);
    --white-alpha-60: rgba(255, 255, 255, 0.6);
    --white-alpha-70: rgba(255, 255, 255, 0.7);
    --black-alpha-80: rgba(0, 0, 0, 0.8);
    --black-alpha-95: rgba(0, 0, 0, 0.95);
    --transition-base: all 0.3s ease;
    --blur-10: blur(10px);
    --blur-20: blur(20px);
}

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: Douyin Sans, Arial, sans-serif;
    color: white;
    overflow: hidden;
    background: black;
    /* 添加黑色背景作为底色 */
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.background::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: url('../resources/bg-space.png') no-repeat center center;
    background-size: cover;
    filter: var(--blur-10) brightness(0.5);
}

.logo {
    position: static;
    height: 35px;
    width: auto;
}

.menu,
.floating-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.menu-button {
    display: block;
    margin: 15px;
    padding: 12px 25px;
    font-size: 16px;
    color: white;
    background-color: var(--white-alpha-10);
    border: 2px solid var(--white-alpha-30);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition-base);
    width: 200px;
}

.menu-button:hover {
    background-color: var(--white-alpha-20);
    transform: scale(1.05);
    border-color: var(--white-alpha-60);
}

/* 修改内容区域的基础样式 */
.content-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 500vh;
    /* 增加高度以容纳 end-section */
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    touch-action: none;
    /* 防止移动端的默认滚动行为 */
}

.content-section {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100vh;
    color: white;
    text-align: center;
    padding-top: 50px;
    overflow-y: auto;
    line-height: 1.6;
    box-sizing: border-box;
}

/* 设置每个页面的位置 */
#home {
    top: 0;
}

#games {
    top: 100vh;
}

#section3 {
    top: 200vh;
}

#section4 {
    top: 300vh;
}

.back-button {
    position: static;
    margin-left: auto;
    padding: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.menu-icon {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.back-button:hover .menu-icon {
    stroke: white;
    stroke-width: 2.5;
}

.section-content {
    max-width: 1080px;
    margin: 0 auto;
    /* margin-right: 30px; */
    padding: 40px 20px;
    height: 100%;
    box-sizing: border-box;
}

.section-content h1 {
    text-align: left;
    margin: 6px 0;
    /* margin-right: auto; */
    font-size: 38px;
    width: 100%;
    background: linear-gradient(135deg, #FF7BAC, #FF9A64);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    background: linear-gradient(135deg, rgba(255, 123, 172, 0.1), rgba(255, 154, 100, 0.1));
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 123, 172, 0.2);
}

.feature-item {
    background: linear-gradient(135deg, rgba(255, 123, 172, 0.15), rgba(255, 154, 100, 0.15));
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    border: 1px solid rgba(255, 123, 172, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 123, 172, 0.5);
    box-shadow: 0 5px 15px rgba(255, 123, 172, 0.2);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 10px;
    border: 1px solid white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 添加顶部菜单栏样式 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--black-alpha-80);
    backdrop-filter: var(--blur-10);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 添加浮动菜单样式 */
.floating-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.floating-menu.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* 添加滚动提示器 */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.scroll-dot:hover {
    opacity: 0.8;
}

.scroll-dot.active {
    opacity: 1;
    background: white;
    transform: scale(1.2);
}

/* End 栏样式 */
.end-section {
    top: 400vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--blur-10);
    border-top: 1px solid var(--white-alpha-10);
    height: 40vh;
    display: flex;
    align-items: center;
}

.end-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 30px 20px;
    height: auto;
    /* 改为自适应高度 */
    min-height: 300px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.end-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.end-column {
    text-align: left;
}

.end-column h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.end-column p {
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
    font-size: 14px;
}

.end-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin: 5px 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

.end-column a:hover {
    color: white;
}

.end-social-links {
    display: flex;
    gap: 10px;
}

.end-social-links a {
    display: inline-block;
}

.end-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.end-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin: 5px 0;
}

.end-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.end-bottom a:hover {
    color: white;
}

/* 修改遮罩层样式 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    visibility: hidden;
    cursor: pointer;
    transition: background 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    visibility: visible;
    background: rgba(0, 0, 0, 0.2);
}

/* 修改浮动菜单的 z-index，确保在遮罩层之上 */
.floating-menu {
    z-index: 1000;
    /* 其他现有样式保持不变 */
}

/* 调整内容区域的滚动条样式 */
.content-section::-webkit-scrollbar {
    width: 8px;
}

.content-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.content-section::-webkit-scrollbar-thumb {
    background: var(--white-alpha-30);
    border-radius: 4px;
}

.content-section::-webkit-scrollbar-thumb:hover {
    background: var(--white-alpha-50);
}

/* 删除文件末尾原有的移动端适配代码，替换为以下统一的移动端适配样式 */
@media screen and (max-width: 768px) {

    /* 顶部栏移动端样式 */
    .top-bar {
        height: 40px;
        padding: 0 10px;
    }

    .logo {
        height: 28px;
    }

    /* 内容区域移动端样式 */
    .section-content {
        width: calc(100% - 20px);
        margin-right: auto;
        padding: 0px 6px;
        height: 95%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .social-links a {
        display: inline-block;
        margin: 5px;
    }

    .content-section {
        padding-top: 40px;
    }

    /* 滚动指示器移动端样式 */
    .scroll-indicator {
        right: 10px;
    }

    .scroll-dot {
        width: 8px;
        height: 8px;
    }

    /* End 栏移动端样式 */
    .end-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        font-size: 12px;
    }

    .end-column h4 {
        font-size: 14px;
    }

    .end-column p,
    .end-column a {
        font-size: 12px;
    }

    .end-social-links {
        justify-content: center;
    }

    .end-section {
        padding: 0px 10px;
        padding-top: 0;
    }

    .end-content {
        height: auto;
        padding: 0;
        min-height: auto;
    }

    .section-content h1 {
        font-size: 24px;
        margin-left: 15px;
    }
}

/* 修改移动端导航按钮的样式 */
.mobile-nav-button {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    cursor: pointer;
    animation: pulse 2s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 修改上下按钮位置到屏幕中间 */
.mobile-nav-up {
    top: 20px;
    /* 位于屏幕中间偏上位置 */
}

.mobile-nav-down {
    bottom: 20px;
    /* 位于屏幕中间偏下位置 */
}

/* 显示按钮的状态 */
.mobile-nav-button.visible {
    opacity: 1;
}

/* 移动端显示按钮 */
@media screen and (max-width: 768px) {
    .mobile-nav-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 箭头样式 */
.arrow-up,
.arrow-down {
    display: block;
    width: 12px;
    height: 12px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    position: absolute;
    left: 50%;
    top: 50%;
}

.arrow-up {
    transform: translate(-50%, -40%) rotate(135deg);
}

.arrow-down {
    transform: translate(-50%, -60%) rotate(-45deg);
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.game-button {
    background: linear-gradient(135deg, #FF7BAC, #FF9A64);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    margin: 15px auto;
    display: block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(255, 123, 172, 0.3);
}

.game-button:hover {
    background: linear-gradient(135deg, #FF8DBD, #FFAB7B);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 123, 172, 0.4);
}

.game-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 123, 172, 0.3);
}

.games-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    /* width: 100%; */
    max-width: 300px;
}

.games-grid .game-button {
    margin: 0;
}

.game-button.disabled {
    background: linear-gradient(135deg, rgba(255, 123, 172, 0.3), rgba(255, 154, 100, 0.3));
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none;
}

.game-button.disabled:hover {
    transform: none !important;
    box-shadow: none;
}