* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #000;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 主容器 - 默认全宽 */
.main-container {
    width: 100%;
    max-width: 100%;
    background-color: #000;
    position: relative;
    min-height: 100vh;
    padding-bottom: 0px; /* 为固定footer留出空间 */
    overflow-x: hidden;
}

/* PC视图样式 - 通过JavaScript动态添加pc-view类 */
body.pc-view {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.pc-view .main-container {
    max-width: 414px;
    width: 100%;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    overflow: hidden;
    background-color: #000;
    position: relative;
    min-height: 100vh;
}

/* PC视图下的footer调整 */
body.pc-view .footer-section {
    max-width: 414px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* PC视图下的Telegram按钮调整 - 保持固定定位 */
body.pc-view .telegram-floating {
    position: fixed;
    /* 其他样式保持不变 */
}

/* 顶部背景区域 */
.top-section {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

.top-background {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-bg-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 下载按钮容器 */
.download-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.top-download-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.top-download-btn:hover {
    transform: scale(1.05);
}

.top-download-btn img {
    width: 360px;
    max-width: 90vw;
    height: auto;
    display: block;
}

/* Hot图标和奖励信息 */
.bonus-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.hot-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.bonus-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.withdraw-text {
    color: #fff;
    font-size: 12px;
    text-align: center;
    opacity: 0.8;
    margin: 0;
}

/* Instructions区域 */
.instructions-section {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #000;
}

.instructions-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 游戏展示区域 */
.games-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #000;
    position: relative;
}

.games-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 开始游戏按钮 - 放在游戏区域底部 */
.start-playing-section {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.start-playing-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0;
}

.start-playing-btn:hover {
    transform: scale(1.05);
}

.start-playing-btn img {
    width: auto;
    height: 60px;
    display: block;
}

/* 最佳游戏体验区域 */
.experience-section {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #000;
}

.experience-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 底部下载区域 - 固定在底部 */
.footer-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #3B1D0C 0%, #A15022 100%);
    padding: 15px 20px;
    color: #fff;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.footer-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.footer-logo-img {
    width: 48px;
    height: 48px;
    display: block;
    opacity: 1;
    transform: rotate(0deg);
}

.footer-text-section {
    flex: 1;
    text-align: left;
}

.footer-text {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #fff;
    font-weight: 500;
}

.footer-subtext {
    font-size: 12px;
    margin: 0;
    color: #FFC272;
}

.footer-download-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.footer-download-btn:hover {
    transform: scale(1.05);
}

.footer-download-img {
    width: 102px;
    height: 34px;
    display: block;
    opacity: 1;
    transform: rotate(0deg);
}

/* Telegram浮动按钮 - 可拖动 */
.telegram-floating {
    position: fixed;
    width: auto;
    height: auto;
    bottom: 100px;
    right: 10px;
    z-index: 1000;
    cursor: move;
    user-select: none;
    opacity: 1;
    display: block;
    /* 只在水平方向有过渡动画，垂直拖动时不要动画 */
    transition: left 0.3s ease, right 0.3s ease, transform 0.3s ease;
}

.telegram-floating:hover {
    transform: scale(1.05);
}

.telegram-floating:active {
    transform: scale(0.98);
}

/* QR码容器 */
.telegram-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* QR码图片样式 */
.telegram-icon {
    width: 95px;
    height: 95px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: block;
    object-fit: cover;
    background: white;
    padding: 5px;
}

/* Scan QR code 文字样式 */
.scan-qr-text {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    font-style: bold;
    /* 文字描边效果 - 使用-webkit-text-stroke */
    -webkit-text-stroke: 2px #780E0E;
    paint-order: stroke fill;
    /* 备用方案：使用text-shadow模拟描边 */
    text-shadow: 
        -1px -1px 1px #780E0E,
        1px -1px 1px #780E0E,
        -1px 1px 1px #780E0E,
        1px 1px 1px #780E0E,
        -1.5px 0 1px #780E0E,
        1.5px 0 1px #780E0E,
        0 -1.5px 1px #780E0E,
        0 1.5px 1px #780E0E;
}

.telegram-floating.dragging {
    z-index: 1001;
    opacity: 0.8;
    /* 拖动时禁用所有过渡动画，确保平滑跟随 */
    transition: none !important;
}

.telegram-floating.snap-left {
    left: 10px !important;
    right: auto !important;
}

.telegram-floating.snap-right {
    right: 10px !important;
    left: auto !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(40, 167, 69, 0.8);
    }
    100% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    }
}

/* 防止所有元素超出屏幕宽度 */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* 防止按钮和其他元素超出 */
button, input, select, textarea {
    max-width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .download-container {
        bottom: 24px;
        padding: 0 20px;
    }
    
    .top-download-btn img {
        width: 360px;
        max-width: 90vw;
        height: auto;
    }
    
    .bonus-text {
        font-size: 12px;
    }
    
    .footer-section {
        padding: 12px 15px;
    }
    
    .footer-content {
        gap: 15px;
        justify-content: space-between;
    }
    
    .footer-logo-img {
        width: 48px;
        height: 48px;
    }
    
    .footer-text {
        font-size: 14px;
    }
    
    .footer-subtext {
        font-size: 12px;
    }
    
    .footer-download-img {
        width: 102px;
        height: 34px;
    }
    
    .telegram-floating {
        bottom: 80px;
        right: 10px;
    }
    
    .telegram-icon {
        width: 70px;
        height: 70px;
    }
    
    .scan-qr-text {
        font-size: 12px;
        -webkit-text-stroke: 1px #780E0E;
        text-shadow: 
            -1px -1px 0 #780E0E,
            1px -1px 0 #780E0E,
            -1px 1px 0 #780E0E,
            1px 1px 0 #780E0E;
    }
    
    .telegram-floating.snap-left {
        left: 8px !important;
        right: auto !important;
    }
    
    .telegram-floating.snap-right {
        right: 8px !important;
        left: auto !important;
    }
    
    .start-playing-section {
        bottom: 15px;
    }
    
    .start-playing-btn img {
        height: 50px;
    }
    
    .download-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bonus-info {
        padding: 6px 12px;
        margin-bottom: 8px;
    }
    
    .bonus-text {
        font-size: 11px;
    }
    
    .withdraw-text {
        font-size: 10px;
    }
    
    .footer-logo {
        font-size: 28px;
    }
    
    .footer-text {
        font-size: 14px;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
}
