@charset "utf-8";

:root {
    --primary-color: #ff4757;
    --secondary-color: #4ecdc4;
    --text-color: #fff;
    --bg-color: #1a1a2e;
    --container-width: 640px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                 "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background: transparent;
}

#app {
    position: relative;
    min-height: 100vh;
    background: transparent;
    /* 移动端保持全屏 */
    width: 100%;
    max-width: 100%;
}

/* 头部背景图 - 移动端全屏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.barrager-box {
    width: 100%;
    height: 100%;
}

.header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.8);
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

/* 确保主容器有足够的底部内边距，避免内容被遮挡 */
.main-container {
    position: relative;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-md);
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-flow {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding-top: 20vh;
}

/* 组件样式保持不变 */
.fixed-banner,
.small-banner,
.games-carousel,
.bottom-banner,
.download-button,
.title-section,
.bottom-title-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-md);
}

.fixed-banner {
    margin: 0;
    overflow: hidden;
}

.main-swiper {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.download-button {
    text-align: center;
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, 
        rgba(255, 71, 86, 0.255), 
        rgba(255, 107, 129, 0.282)
    );
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-img {
    width: 280px;
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 20px;
}

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

.small-banner {
    text-align: center;
}

.small-banner img {
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
}

.title-section,
.bottom-title-section {
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}

.title-image {
    width: 80%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.games-carousel {
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.6);
}

.games-swiper {
    padding: 20px 0;
}

.game-img {
    width: 90%;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.game-img:hover {
    transform: scale(1.05);
}

.bottom-banner {
    position: relative;
    margin: var(--spacing-lg) auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 3;
    /* 确保有足够的底部间距 */
    margin-bottom: 80px; /* 为固定按钮留出空间 */
}

/* 固定底部按钮 */
.fixed-bottom {
    position: relative; /* 改为相对定位 */
    width: 100%;
    text-align: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 15px 0;
    margin: -60px auto 20px; /* 负margin向上移动，正margin提供底部间距 */
    max-width: var(--container-width);
}

.fixed-bottom img {
    width: 600px;
    height: auto;
    cursor: pointer;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.fixed-bottom img:hover {
    transform: translateY(-2px);
}

.kf {
    position: fixed;
    top: 80%;
    right: 20px;
    z-index: 99;
    animation: float 3s ease-in-out infinite;
    border-radius: 50%;
    padding: 8px;
}

.kf img {
    width: 70px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.kf img:hover {
    transform: scale(1.1);
}

/* TG按钮 - 自适应版本 */
.tg {
    position: fixed;
    top: 50%;
    right: 20px; /* 改为相对值 */
    z-index: 99;
    animation: kf 2s infinite;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    /* 添加transform用于精确定位 */
    transform: translateX(0);
}

.tg img {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tg img:hover {
    transform: scale(1.1);
}

/* 添加kf关键帧动画定义 */
@keyframes kf {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 71, 87, 0.8);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* 响应式设计 - 移动端保持不变 */
@media (max-width: 768px) {
    .bottom-banner {
        margin-bottom: 70px; /* 减少底部间距 */
    }
    
    .fixed-bottom {
        margin: -50px auto 15px;
        padding: 12px 0;
    }

    .content-flow {
        padding-bottom: 70px;
    }
    
    .download-img {
        width: 220px;
    }
    
    .game-img {
        height: 120px;
    }
    
    .fixed-bottom {
        bottom: 15px;
    }
    
    .fixed-bottom img {
        width: 160px;
    }
    
    .kf {
        right: 15px;
        top: 65%;
    }
    
    .kf img {
        width: 40px;
        height: 40px;
    }
    .main-container {
        padding-bottom: 100px;
    }
    
    .content-flow {
        padding-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .content-flow {
        padding-top: 10vh;
        gap: var(--spacing-sm);
    }
    
    .main-container {
        padding: var(--spacing-sm);
    }
    
    .download-img {
        width: 180px;
    }
    
    .game-img {
        height: 100px;
    }
    
    .bottom-banner {
        margin-bottom: 60px;
    }
    
    .fixed-bottom {
        margin: -40px auto 12px;
        padding: 10px 0;
    }
    
    .fixed-bottom img {
        width: 330px;
    }
    
    .kf {
        right: 10px;
        padding: 6px;
    }
    
    .kf img {
        width: 70px;
        height: 80px;
    }
    .main-container {
        padding-bottom: 90px;
    }
    
    .content-flow {
        padding-bottom: 60px;
    }
}

/* ==================== PC端样式 ==================== */
@media (min-width: 1024px) {
    /* 只在PC端添加居中效果 */
    body {
        background: linear-gradient(135deg, #ffffff, #ffffff, #ffffff);
        display: flex;
        justify-content: center;
        align-items: flex-start;
        min-height: 100vh;
        padding: 40px 20px;
    }
    
    #app {
        width: 100%;
        max-width: var(--container-width);
        margin: 0;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        background: rgba(0, 0, 0, 0.8);
        min-height: auto;
    }
    
    .header {
        position: relative;
        height: 0px;
        border-radius: 20px 20px 0 0;
    }
    
    .header-img {
        border-radius: 20px 20px 0 0;
    }
    
    .main-container {
        min-height: auto;
    }
    
    .content-flow {
        padding-top: var(--spacing-lg);
        padding-bottom: 100px;
    }
    
    /* 调整客服按钮位置 */
    .kf {
        right: calc((100% - var(--container-width)) / 2 + 20px);
        top: 310px;
    }
}

/* 大屏PC端调整 */
@media (min-width: 1280px) {
    #app {
        max-width: var(--container-width);
    }
    
    .kf {
        right: calc((100% - var(--container-width)) / 2 + 30px);
    }
}

/* 超宽屏调整 */
@media (min-width: 1920px) {
    body {
        padding: 60px 20px;
    }
    
    #app {
        max-width: var(--container-width);
    }
}

@media (min-width: 1024px) {
    .tg {
        right: calc((100% - var(--container-width)) / 2 + 20px);
        top: 150px; /* 在客服按钮上方 */
        padding: 10px; /* PC端稍大一些 */
    }
    
    .tg img {
        width: 60px; /* PC端尺寸加大 */
        height: 60px;
    }
    
    /* 调整客服按钮位置 */
    .kf {
        right: calc((100% - var(--container-width)) / 2 + 20px);
        top: 250px; /* 在TG按钮下方 */
    }
    
    .kf img {
        width: 60px; /* 客服按钮也相应加大 */
        height: 60px;
    }
}

/* 大屏PC端调整 */
@media (min-width: 1280px) {
    .tg {
        right: calc((100% - var(--container-width)) / 2 + 30px);
        top: 580px;
        right: 1060px;
    }
    
    .tg img {
        width: 65px;
        height: 65px;
    }
    
    .kf {
        right: calc((100% - var(--container-width)) / 2 + 30px);
        top: 270px;
    }
    
    .kf img {
        width: 65px;
        height: 65px;
    }
}

/* 中等屏幕PC端 */
@media (min-width: 1024px) and (max-width: 1279px) {
    .tg {
        right: calc((100% - var(--container-width)) / 2 + 15px);
        top: 160px;
        padding: 9px;
    }
    
    .tg img {
        width: 55px;
        height: 55px;
    }
    
    .kf {
        right: calc((100% - var(--container-width)) / 2 + 15px);
        top: 230px;
    }
    
    .kf img {
        width: 55px;
        height: 55px;
    }
}