* { box-sizing: border-box; }
img {
    border: none !important;
    outline: none !important;
}
body {
    margin: 0;
    background: linear-gradient(135deg, #6bc3c7 0%, #574bc9 25%, #07ab60 50%, #534076 75%, #1a2e29 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: visible; /* 允许右侧溢出，显示手部动画 */
    padding-top: 80px; /* 为固定标题栏留出空间 */
}


body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.header-bar {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center; /* PC 端文字居中 */
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s ease-out;
}

.header-bar.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* 左侧 Logo（PC 端显示在左边） */
.header-logo {
    height: 48px;
    width: auto;
    display: block;
    position: absolute;
    left: 24px;
}

/* 顶部横幅标题（PC 端显示在中间） */
.header-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    text-align: center;
}

.announcement {
    text-align: center;
    color: #ffffff;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.6;
    padding: 16px 16px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.announcement.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.notice {
    text-align: center;
    color: #ffffff;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.6;
    padding: 20px 16px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.notice.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    padding: 30px;
    justify-items: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.nav-item {
    display: block;
    width: 100%;
    max-width: 240px;
    text-decoration: none;
    background: linear-gradient(145deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 24px 12px 20px 12px;
    text-align: center;
    box-shadow:
            0 20px 40px rgba(0,0,0,0.4),
            inset 0 1px 0 rgba(255,255,255,0.2),
            inset 0 -1px 0 rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: visible;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-item.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 移除悬停和点击效果 */

.nav-item img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 24px;
    margin: 0 auto 10px auto;
    /* 移除过渡效果 */
    display: block;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
    mix-blend-mode: multiply;
    opacity: 0.95;
}

/* 游戏标题样式 */
.game-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin: 0 auto 10px auto;
    padding: 0 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.2px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hot和New标签样式 - 使用单独的图片图标，放在游戏容器左上角，不覆盖图片 */
.game-badge {
    position: absolute;
    /* 定位在容器左上角，使用负值让图标更靠上，超出容器边界 */
    top: -8px;
    left: 12px;
    width: 70px;
    height: 70px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 10;
    pointer-events: none;
    animation: badgePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.game-badge-hot {
    background-image: url('../img/hot.png');
    left: 12px;
}

.game-badge-new {
    background-image: url('../img/new.png');
}

/* 当New和Hot同时存在时，New图标放在Hot的右侧 */
.game-badge-new.game-badge-with-hot {
    left: 82px;
}

/* 手部点击动画 - 放在按钮上面 */
.tap-hand {
    position: absolute;
    bottom: -50%; /* 向下移更多，超出按钮 */
    left: 95%; /* 向右移更多 */
    transform: translateX(-50%) scale(0.67); /* 水平居中并缩小到 67% */
    margin-bottom: 5px; /* 与按钮的间距 */
    width: 104px; /* 保持原始尺寸 */
    height: 100px;
    background-image: url('../img/hand.webp');
    background-repeat: no-repeat;
    background-size: auto; /* 使用原始 sprite sheet 尺寸 */
    filter: drop-shadow(0 0 10px rgba(0,255,255,0.6));
    pointer-events: none;
    z-index: 100;
    opacity: 1;
}

/* 确保所有可能的父容器都允许溢出 */
html, body {
    overflow-x: visible !important;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* 移除图片悬停效果 */

/* 图片轮播区域样式 */
.image-slider {
    margin: 30px auto;
    max-width: 900px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.image-slider.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.image-slider .slider-container {
    position: relative;
    width: 100%;
    height: 320px !important;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease-out;
    height: 100%;
    touch-action: pan-y;
    user-select: none;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 30px;
    color: white;
}

.slider-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slider-description {
    font-size: 16px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

.slider-dot.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.7);
}


/* 触摸拖拽样式 */
.slider-track.dragging {
    transition: none;
    cursor: grabbing;
}

.slider-container.dragging {
    cursor: grabbing;
}

/* 社交媒体链接样式 */
.social-links {
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 40px;
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.social-links.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.social-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.social-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.social-subtitle {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.social-description {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    line-height: 1.4;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.social-text {
    text-align: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 65px;
    height: 65px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.social-link i {
    font-size: 28px;
}

/* 指引图区域样式 */
.guide-section {
    margin-top: 40px;
    padding: 40px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.guide-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.guide-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.guide-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.guide-image {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.guide-image img {
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.guide-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
}

.guide-description {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    font-weight: 500;
    margin-top: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    line-height: 1.6;
}

/* 社交媒体平台特定颜色 */
.social-link[title*="Whatsapp"]:hover {
    background: rgba(37, 211, 102, 0.3);
    border-color: rgba(37, 211, 102, 0.6);
}

.social-link[title*="Telegram"]:hover {
    background: rgba(0, 136, 204, 0.3);
    border-color: rgba(0, 136, 204, 0.6);
}

.social-link[title*="Facebook"]:hover {
    background: rgba(24, 119, 242, 0.3);
    border-color: rgba(24, 119, 242, 0.6);
}

.btn {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 50px;
    margin-bottom: 12px;
    cursor: pointer;
    overflow: visible;
    border-radius: 999px;
    animation: btnBreathe 1.5s ease-in-out infinite;
}

/* 按钮背景（从sprite sheet裁剪） */
.btn-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/play-now.webp');
    background-repeat: no-repeat;
    /* 保持原始sprite sheet尺寸，按按钮比例缩放 */
    /* 原始按钮417×98，sprite sheet 860×99 */
    /* 按钮160×50，宽度比例：160/417≈0.384，高度比例：50/98≈0.510 */
    /* sprite sheet按比例缩放：860×0.384≈330px, 99×0.510≈50px */
    background-size: 330px 50px;
    background-position: 0px 0px;
    border-radius: 999px;
    overflow: hidden;
}

/* Play Now 文字标签（从sprite sheet裁剪） */
.btn-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    /* 原始238px缩小，比例约0.384 */
    width: 91px;
    height: 28px;
    background-image: url('../img/play-now.webp');
    background-repeat: no-repeat;
    /* sprite sheet同比缩小 */
    background-size: 330px 50px;
    /* 位置同比缩小：原始-423×0.384≈-162px，原始-39×0.510≈-20px */
    background-position: -162px -20px;
    pointer-events: none;
}

/* 呼吸动画关键帧 */
@keyframes btnBreathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

/* 按钮点击反馈 */
.btn:active {
    animation: none;
    transform: scale(0.96);
}

/* 为不同按钮添加不同的动画延迟 */
.nav-item:nth-child(1) .btn { animation-delay: 0s; }
.nav-item:nth-child(2) .btn { animation-delay: 0.15s; }
.nav-item:nth-child(3) .btn { animation-delay: 0.3s; }
.nav-item:nth-child(4) .btn { animation-delay: 0.45s; }
.nav-item:nth-child(5) .btn { animation-delay: 0.6s; }
.nav-item:nth-child(6) .btn { animation-delay: 0.75s; }
.nav-item:nth-child(7) .btn { animation-delay: 0.9s; }
.nav-item:nth-child(8) .btn { animation-delay: 1.05s; }
.nav-item:nth-child(9) .btn { animation-delay: 1.2s; }
.nav-item:nth-child(10) .btn { animation-delay: 1.35s; }
.nav-item:nth-child(11) .btn { animation-delay: 1.5s; }
.nav-item:nth-child(12) .btn { animation-delay: 1.65s; }

.note {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
}

.note span {
    color: #ff6b6b;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        padding: 20px;
        max-width: 100%;
    }

    .nav-item {
        max-width: 200px;
        padding: 20px 10px 16px 10px;
    }

    .nav-item img {
        width: 150px;
        height: 150px;
    }

    .btn {
        width: 160px;
        height: 44px;
    }

    /* 原始417×98缩小到160×44，宽度比例0.384，高度比例0.449 */
    .btn-bg {
        background-size: 330px 44px;
        background-position: 0px 0px;
    }

    .btn-label {
        width: 91px;
        height: 25px;
        background-size: 330px 44px;
        background-position: -162px -18px;
    }

    .announcement {
        padding: 20px 16px 0;
    }

    .notice {
        padding: 25px 16px 0;
    }

    /* 移动端调整加载文字位置，防止覆盖图标 */
    .game-loading-text-label {
        bottom: 25%;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .announcement {
        font-size: 16px;
        padding: 18px 12px 0;
    }

    .notice {
        font-size: 16px;
        padding: 20px 12px 0;
    }

    .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    /* 移动端顶部横幅：只显示居中的 Logo，不显示文字 */
    .header-bar {
        justify-content: center;
    }
    .header-title {
        display: none;
    }
    .header-logo {
        position: static;
        margin: 0 auto;
        height: 40px;
    }
    .nav-item {
        max-width: none;
        padding: 16px 8px 12px 8px;
    }

    .nav-item img {
        width: 120px;
        height: 120px;
    }

    .game-badge {
        top: -6px;
        left: 10px;
        width: 60px;
        height: 60px;
    }

    /* 移动端：当两个图标同时存在时，New图标位置调整 */
    .game-badge-new.game-badge-with-hot {
        left: 70px;
    }

    .btn {
        width: 140px;
        height: 39px;
    }

    .tap-hand {
        bottom: -50%; /* 向下移更多，超出按钮 */
        left: 95%; /* 向右移更多 */
        transform: translateX(-50%) scale(0.58); /* 水平居中并缩小到 58% */
        margin-bottom: 4px; /* 与按钮的间距 */
        width: 104px; /* 保持原始尺寸 */
        height: 100px;
    }

    /* 原始417×98缩小到140×39，宽度比例0.336，高度比例0.398 */
    .btn-bg {
        background-size: 289px 39px;
        background-position: 0px 0px;
    }

    .btn-label {
        width: 80px;
        height: 22px;
        background-size: 289px 39px;
        background-position: -142px -16px;
    }

    .note {
        font-size: 12px;
    }

    .game-title {
        font-size: 10px;
        margin-bottom: 8px;
    }

    /* 轮播中等屏幕样式 */
    .image-slider .slider-container {
        height: 220px !important;
    }

    .slider-overlay {
        padding: 11px;
    }

    .slider-title {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .slider-description {
        font-size: 11px;
        line-height: 1.2;
    }

    .slider-dots {
        bottom: 7px;
        gap: 5px;
    }

    .slider-dot {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 360px) {
    .announcement {
        padding: 15px 12px 0;
    }

    .notice {
        padding: 15px 12px 0;
    }

    .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .nav-item {
        padding: 12px 6px 10px 6px;
    }

    .nav-item img {
        width: 100px;
        height: 100px;
    }

    .game-badge {
        top: -4px;
        left: 8px;
        width: 50px;
        height: 50px;
    }

    /* 小屏幕：当两个图标同时存在时，New图标位置调整 */
    .game-badge-new.game-badge-with-hot {
        left: 58px;
    }

    .btn {
        width: 120px;
        height: 33px;
    }

    .tap-hand {
        bottom: -70%; /* 向下移更多，超出按钮 */
        left: 95%; /* 向右移更多 */
        transform: translateX(-50%) scale(0.48); /* 水平居中并缩小到 48% */
        margin-bottom: 3px; /* 与按钮的间距 */
        width: 104px; /* 保持原始尺寸 */
        height: 100px;
    }

    /* 原始417×98缩小到120×33，宽度比例0.288，高度比例0.337 */
    .btn-bg {
        background-size: 248px 33px;
        background-position: 0px 0px;
    }

    .btn-label {
        width: 69px;
        height: 19px;
        background-size: 248px 33px;
        background-position: -122px -13px;
    }

    .note {
        font-size: 11px;
    }

    .game-title {
        font-size: 9px;
        margin-bottom: 6px;
    }

    /* 轮播移动端样式 */
    .image-slider .slider-container {
        height: 150px !important;
    }

    .slider-overlay {
        padding: 10px;
    }

    .slider-title {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .slider-description {
        font-size: 10px;
        line-height: 1.1;
    }

    .slider-dots {
        bottom: 6px;
        gap: 4px;
    }

    .slider-dot {
        width: 6px;
        height: 6px;
    }

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

    .social-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .social-subtitle {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .social-description {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .social-icons {
        gap: 15px;
        margin-bottom: 15px;
    }

    .social-link {
        width: 55px;
        height: 55px;
        padding: 12px;
    }

    .social-link i {
        font-size: 22px;
    }

    /* 指引图移动端样式 */
    .guide-section {
        margin-top: 30px;
        padding: 30px 0;
    }

    .guide-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .guide-image {
        margin: 20px 0;
    }

    .guide-image img {
        /* 自适应尺寸，无高度限制 */
    }

    .guide-description {
        font-size: 14px;
        margin-top: 15px;
    }

    /* 图片轮播响应式 */
    .image-slider {
        margin: 20px auto;
    }

    .image-slider .slider-container {
        height: 170px !important;
    }

    .slider-overlay {
        padding: 12px;
    }

    .slider-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .slider-description {
        font-size: 11px;
        line-height: 1.2;
    }


    .slider-dots {
        bottom: 8px;
        gap: 6px;
    }

    .slider-dot {
        width: 7px;
        height: 7px;
    }
}

/* 高级动画效果 */
/* 移除浮动动画效果 */

/* 玻璃态效果增强 */
.nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    pointer-events: none;
    border-radius: 24px;
}

/* 页面加载动画和游戏加载动画现在使用 slot-loader.js */

/* 游戏加载时底部 Loading 文本样式（显示在老虎机动画下方） */
.game-loading-text-label {
    position: absolute;
    bottom: 38%;
    left: 50%;
    transform: translateX(-50%);
    color: #afb4db;
    font-size: 18px;
    font-family: "Open Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    z-index: 20;
    pointer-events: none;
}


/* 点击游戏卡片时的加载状态 */
.nav-item.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.nav-item.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}