/* ================= 全局重置与基础样式 ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    color: #FFD700;
    background-color: #003F3F;
    background-image: url('../img/pc_bg.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ================= 布局容器 ================= */
.container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ================= Header 区域 ================= */
.header {
    position: relative;
    text-align: center;
    padding: 0;
}

.top-image {
    display: inline-block;
    max-width: 392px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

/* ================= 语言切换器 ================= */
.language-switcher {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2000;
}

.custom-select {
    position: relative;
    width: 120px;
    background: #014A4F;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
}

.custom-select .selected {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
}

.custom-select .arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #fff;
    transition: transform 0.2s ease;
}

.custom-select.open .arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select .flag {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border-radius: 2px;
}

.custom-select .options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #004C4C;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.custom-select .options li {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    color: #fff;
}

.custom-select .options li:hover {
    background: #006060;
}

/* ================= Jackpot 区域 ================= */
.jackpot {
    text-align: center;
    margin: 20px auto 0 auto;
    position: relative;
}

.jackpot img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0;
}

.jackpot-number {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5A0601;
    font-size: 3.6em;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    letter-spacing: 10px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.jackpot-mobile { 
    display: none; 
}

.jackpot-pc { 
    display: block; 
}

/* ================= 幻灯片区域 ================= */
.slideshow-container { 
    position: relative; 
    margin: auto; 
}

.slides { 
    text-align: center; 
    display: none; 
}

.slides img { 
    margin: 0 auto; 
    width: 100%; 
    max-width: 1148px; 
}

.fade { 
    animation-name: fade; 
    animation-duration: 1.5s; 
}

@keyframes fade { 
    from { opacity: 0.4; } 
    to { opacity: 1; } 
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    user-select: none;
    transform: translateY(-50%);
}

.prev img, .next img { 
    width: 34px; 
}
.prev img{
    margin-left:-20px;
}
.next img{
    margin-right:-20px;
}
.next { 
    right: 0; 
}

.dots-container { 
    text-align: center; 
    padding: 0; 
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 2px;
    background-color: #D8D2FF;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover { 
    background-color: #978CD9; 
}

/* ================= 四图网格布局 ================= */
.center-and-three-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    border: 2px solid #128888;
    padding: 10px;
    border-radius: 10px;
    margin: 20px auto 0 auto;
    background-color: rgba(0,0,0,0.3);
    max-width: 1200px;
}

.center-and-three-container > * { 
    flex: 1 1 calc(25% - 15px); 
    text-align: center; 
}

.center-and-three-container img { 
    max-width: 90%; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
    cursor: pointer; 
    transition: all 0.3s ease;
}

.center-and-three-container img:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-content: center;
    align-items: start;
}

.image-box {
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
}

.image-box img {
    pointer-events: none;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.image-box:hover img {
    filter: brightness(1.2) saturate(1.1);
    transform: scale(1.05);

}

/* ================= 弹窗系统 - 修复PC端hover问题 ================= */
.hover-popup {
    position: absolute;
    bottom: 100%; /* 出现在图片上方 */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    border-radius: 10px;
    padding: 10px 25px;
    min-width: 280px; /* 保持合适的最小宽度 */
    width: max-content; /* 关键：根据内容自适应宽度 */
    max-width: 90vw; /* 防止超出屏幕 */
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid #FFD700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    font-family: Arial, sans-serif;
}

/* PC端 hover 显示 - 关键修复 */
@media (min-width: 769px) {
    .image-box:hover .hover-popup {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-15px);
    }
}

/* ================= URL 列表样式优化 - 简化版本 ================= */
.url-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.url-list li {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.url-list li:last-child {
    border-bottom: none;
}

.url-icon {
    font-size: 16px;
    width:26px;
    height: 26px;
    line-height: 26px;
    flex-shrink: 0;
}

.url-list a:not(.access-button) {
    color: #FFD700;
    text-decoration: none;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-list a:not(.access-button):hover {
    color: #FFFFFF;
}

.access-button {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #003F3F;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.access-button:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: translateY(-2px);
}

/* Telegram 弹层完整优化样式 */
.telegram-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    min-width: 240px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.telegram-popup img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: contain;
    filter: brightness(0.9);
}

.telegram-popup a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: #ff0;
    text-decoration: none;
    margin:5px auto;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.telegram-popup a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.telegram-popup a:hover::before {
    left: 100%;
}

.telegram-popup a:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.25);
}

.telegram-popup a:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .telegram-popup {

        min-width: 220px;
        gap: 6px;
    }
    
    .telegram-popup a {
        padding: 10px 14px;
        font-size: 16px;
        gap: 10px;
        margin:10px auto;
    }
    
    .telegram-popup img {
        width: 24px;
        height: 24px;
    }
}

/* 加载状态 */
.telegram-popup img {
    transition: opacity 0.3s ease;
}



/* 文字溢出处理 */
.telegram-popup a span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* APP 下载二维码样式优化 */
.qr-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-popup img.qr-img {
    width: 280px;
    height: 280px;
    border-radius: 8px;
    background: white;
    padding: 25px auto 5px auto;
}

.qr-popup p {
    color: #FFD700;
    margin-top: 8px;
    font-size: 16px;
    font-weight: bold;
}

/* 客服弹窗 */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.popup-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    overflow: hidden;
    width: 80vw;
    height: 80vh;
    max-width: 810px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.popup-content .close {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 30px;
    font-weight: bold;
    color: #555;
    z-index: 10;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-content .close:hover {
    color: #000;
}

.popup-content iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
}


/* ================= 页脚区域 ================= */
.footer { 
    text-align: center; 
    padding: 10px 0; 
    width: 100%; 
    font-size: 12px; 
}

.fixed-bottom-img {
    display: none;
}

/* ================= 移动端响应式设计 ================= */
@media (max-width: 768px) {
    /* Header 区域 */
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        text-align: left;
    }

    .top-image {
        margin: 0;
        max-width: 160px;
    }

    .language-switcher {
        position: static;
    }

    /* Jackpot 区域 */
    .jackpot-pc { 
        display: none; 
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    
    .jackpot-mobile { 
        display: inline-block; 
        border-top: 3px solid #ff0;    
        border-left: 3px solid #ff0;   
        border-right: 3px solid #ff0;   
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    
    .jackpot-number { 
        top: 68%; 
        font-size: 1.5em; 
        padding-top: 5px;  
        letter-spacing: 3px;
    }

    /* 幻灯片区域 */
    .slides img { 
        margin: 0 auto; 
        width: 100%; 
        max-width: 360px; 
    }

    /* 四图网格布局 */
    .center-and-three-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top:0;
        max-width: 96%;
        padding: 0;
        border: none;
        background-color: transparent;
    }
    
    .center-and-three-container > * { 
        flex: 1 1 80%; 
    }
    
    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    /* 移动端弹窗修复 */
    .hover-popup {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 100%;
        max-width: 380px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        /* 移动端默认隐藏 */
        display: none;
    }
    
    .hover-popup.show {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-15px);
        /* 点击时才显示 */
        display: block;
    }

    /* 确保图片容器有正确的定位上下文 */
    .image-box {
        position: relative;
    }

    /* 客服弹窗全屏 */
    .popup {
        align-items: flex-start;
    }

    .popup-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .popup-content .close {
        top: 15px;
        right: 15px;
        color: white;
        font-size: 32px;
    }


    /* 底部图片 */
    .fixed-bottom-img {
        display: block;
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;
        z-index: 1000;
        pointer-events: none;
        background-color: #036b2b;
    }

    body::after {
        content: "";
        display: block;
        height: 88px;
    }
}

/* ================= PC端特定样式 ================= */
@media (min-width: 769px) {
    .jackpot-pc { 
        display: block; 
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    
    .jackpot-mobile { 
        display: none; 
    }
}


/* ================= 中奖信息区域 ================= */
.winner-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.winner-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollLeft 30s linear infinite;
}

.gameBox {
    display: flex;
    align-items: center;
    margin: 0 10px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.gameBox img.game {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    margin-right: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.text { 
    display: flex; 
    flex-direction: column; 
    font-size: 12px; 
    line-height: 1.3; 
    flex: 1;
    min-width: 0;
}

.text03 { 
    display: flex; 
    justify-content: space-between; 
    font-size: 12px; 
    margin-top: 2px;
}

.text03 .orange { 
    color: #ffa500; 
    font-weight: bold; 
}

.winner-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.left-mask { 
    left: 0; 
    background: linear-gradient(to right, rgba(17,17,17,1), rgba(17,17,17,0)); 
}

.right-mask { 
    right: 0; 
    background: linear-gradient(to left, rgba(17,17,17,1), rgba(17,17,17,0)); 
}

@keyframes scrollLeft { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}


/* ================= 手机端中奖信息修复 - 每行2个一半宽度 ================= */
@media (max-width: 768px) {
    .winner-wrapper { 
        height: 200px; 
        border-left: 3px solid #ff0; 
        border-right: 3px solid #ff0; 
        border-bottom: 3px solid #ff0; 
        margin-top: -5px;
        padding: 5px 0;
        overflow: hidden;
        display: flex;
        justify-content: center;
        max-width: 556px;
    }
    .prev img, .next img { 
        width: 20px; 
    }
    .winner-track {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 95%; /* 使用百分比宽度 */
        animation: scrollUp 25s linear infinite;
        padding: 0 10px;
    }
    
    .winner-row {
        display: flex;
        justify-content: space-between; /* 改为 space-between 确保平均分布 */
        gap: 10px;
        width: 100%;
    }
    
    .gameBox { 
        width: 48%; /* 使用48%而不是50%，给间隙留空间 */
        margin: 0;
        padding: 8px 6px; /* 减少左右内边距 */
        display: flex;
        align-items: center;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 8px;
        border: 1px solid rgba(255, 215, 0, 0.3);
        flex-shrink: 0;
        min-width: 0; /* 允许内容压缩 */
    }
    
    .gameBox img.game {
        width: 35px; /* 统一减小图片尺寸 */
        height: 35px;
        margin-right: 6px;
        flex-shrink: 0;
        border-radius: 6px;
        object-fit: cover;
    }
    
    .text { 
        font-size: 11px; 
        line-height: 1.3;
        flex: 1;
        min-width: 0;
        text-align: left;
    }
    
    .text03 { 
        font-size: 10px; 
        margin-top: 2px;
        display: flex;
        justify-content: space-between;
        gap: 4px;
    }
    
    .text03 .orange { 
        color: #ffa500; 
        font-weight: bold; 
        white-space: nowrap;
        font-size: 9px; /* 金额字体更小 */
    }
    
    .winner-mask { 
        display: none; 
    }

    /* 修复滚动动画 */
    @keyframes scrollUp { 
        0% { transform: translateY(0); } 
        100% { transform: translateY(-50%); } 
    }
}

/* ================= 超小屏幕优化 ================= */
@media (max-width: 480px) {
    .winner-wrapper { 
        height: 180px; 
        margin-top: -5px;
    }
    
    .winner-track {
        width: 98%; /* 小屏幕使用更大百分比 */
        gap: 6px;
        padding: 0 5px;
    }
    
    .winner-row {
        gap: 8px;
    }
    
    .gameBox { 
        width: 48%;
        padding: 6px 4px; /* 进一步减少内边距 */
    }
    
    .gameBox img.game {
        width: 30px;
        height: 30px;
        margin-right: 4px;
    }
    
    .text { 
        font-size: 10px; 
    }
    
    .text03 { 
        font-size: 9px; 
        gap: 3px;
    }
    
    .text03 .orange { 
        font-size: 8px;
    }
}

/* ================= 小屏幕优化 ================= */
@media (max-width: 375px) {
    .winner-track {
        width: 99%;
        padding: 0 3px;
    }
    
    .gameBox { 
        width: 48%;
        padding: 5px 3px;
    }
    
    .gameBox img.game {
        width: 28px;
        height: 28px;
        margin-right: 3px;
    }
    
    .text { 
        font-size: 9px; 
    }
    
    .text03 { 
        font-size: 8px; 
    }
    
    .text03 .orange { 
        font-size: 7px;
    }
}

/* ================= 大手机屏幕优化 ================= */
@media (min-width: 481px) and (max-width: 768px) {
    .winner-track {
        width: 92%;
    }
    
    .gameBox { 
        width: 48%;
        padding: 10px 8px;
    }
    
    .gameBox img.game {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }
    
    .text { 
        font-size: 12px; 
    }
    
    .text03 { 
        font-size: 11px; 
    }
    
    .text03 .orange { 
        font-size: 10px;
    }
}
/* ================= 确保PC端正常显示 ================= */
@media (min-width: 769px) {
    .winner-wrapper {
        height: auto;
        min-height: 80px;
    }
    
    .winner-track {
        animation: scrollLeft 30s linear infinite;
    }
}