/* 自定义Tailwind配置 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }

    .spin-effect {
        animation: spin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
}

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

/* 新增顶部白色区域 */
.header-top {
    height: clamp(40px, 8vw, 55px);
    background-color: white;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    padding: 0 clamp(8px, 2vw, 15px);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 顶部返回按钮 */
.header-back-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 3vw, 12px);
    color: #000;
    border-radius: 4px;
    position: absolute;
    left: clamp(8px, 2vw, 15px);
    white-space: nowrap;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: bold;
    background: none;
    border: none;
    height: 100%;
}

.header-back-btn i {
    margin-right: clamp(3px, 1vw, 6px);
    font-weight: bold;
    font-size: clamp(16px, 4vw, 20px);
}

.header-back-btn:hover {
    background-color: #f0f0f0;
}

.header-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    text-align: center;
    width: 100%;
    padding: 0 clamp(70px, 20vw, 150px);
    box-sizing: border-box;
}

/* 主页布局样式 */
.box {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(15px, 3vw, 25px);
    /* 响应式内边距 */
}

.header-NGJTNG {
    background-color: #f8f9fa;
    padding: clamp(20px, 4vw, 35px);
    /* 响应式内边距 */
    border-radius: 8px;
    margin-bottom: clamp(15px, 3vw, 25px);
    /* 响应式间距 */
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* 添加阴影效果 */
}

.header-NGJTNG-1 {
    display: flex;
    flex-direction: column;
    /* 修改为垂直布局 */
    align-items: center;
    margin-bottom: clamp(10px, 2vw, 20px);
    /* 响应式间距 */
}

.header-NGJTNG-1 img {
    width: clamp(60px, 14vw, 90px);
    /* 增大图片尺寸 */
    height: clamp(60px, 14vw, 90px);
    /* 增大图片尺寸 */
    margin-right: 0;
    /* 移除右侧间距 */
    margin-bottom: clamp(10px, 2vw, 15px);
    /* 添加底部间距 */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* 添加图片阴影 */
    object-fit: cover;
    /* 确保图片比例正确 */
    border: 2px solid #fff;
    /* 添加白色边框 */
}

.info {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 居中对齐 */
}

.info h1 {
    margin: 0;
    font-size: clamp(22px, 5vw, 30px);
    /* 增大标题字体 */
    color: #333;
    font-weight: bold;
    /* 增加标题粗度 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    /* 添加文字阴影 */
    text-align: center;
    /* 标题居中 */
}

.sub-text {
    color: #000;
    font-size: clamp(18px, 4vw, 24px);
    /* 增大NGJT.NG文字 */
    font-weight: bold;
    text-align: center;
    margin-top: clamp(8px, 2vw, 15px);
    letter-spacing: 2px;
    /* 增加字母间距 */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* 游戏列表样式 */
.NGJT-NG {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 30vw, 220px), 1fr));
    /* 响应式网格 */
    gap: clamp(15px, 3vw, 25px);
    /* 响应式间距 */
    list-style: none;
    padding: 0;
}

.list {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    /* 添加卡片阴影 */
}

.list:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    /* 悬停时增强阴影 */
}

.list a {
    display: block;
}

.list img {
    width: 100%;
    height: clamp(100px, 20vw, 150px);
    /* 响应式图片高度 */
    object-fit: cover;
    transition: transform 0.5s;
    /* 添加图片过渡效果 */
}

.list:hover img {
    transform: scale(1.03);
    /* 悬停时图片放大 */
}

.game-info {
    padding: 10px;
    text-align: center;
}

.game-name {
    font-size: clamp(14px, 3vw, 16px);
    /* 响应式游戏名称 */
    font-weight: bold;
}

/* 档位按钮样式 */
.gear-btn {
    width: clamp(40px, 10vw, 60px);
    /* 响应式按钮尺寸 */
    height: clamp(40px, 10vw, 60px);
    /* 响应式按钮尺寸 */
    border-radius: 50%;
    background-color: #000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 3vw, 18px);
    /* 响应式文字 */
    cursor: pointer;
    transition: all 0.3s;
}

.gear-btn:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* 返回顶部按钮样式 - 重新设计 */
#back-to-top {
    display: none;
    position: fixed;
    bottom: clamp(20px, 5vw, 30px);
    right: clamp(20px, 5vw, 30px);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

#back-to-top:hover {
    background: #000;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 游戏显示区域样式 */
#game-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
}

#game-header {
    height: clamp(40px, 8vw, 55px);
    /* 响应式头部高度 */
    background-color: white;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 0 clamp(8px, 2vw, 15px);
    /* 响应式内边距 */
    position: relative;
}

/* 返回按钮样式 - 优化对齐 */
#back-button {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 水平居中 */
    padding: clamp(8px, 3vw, 12px);
    color: #000;
    border-radius: 4px;
    z-index: 1002;
    position: absolute;
    left: clamp(8px, 2vw, 15px);
    white-space: nowrap;
    font-size: clamp(14px, 4vw, 18px);
    font-weight: bold;
    background: none;
    border: none;
    height: 100%;
    /* 与头部等高 */
}

#back-button i {
    margin-right: clamp(3px, 1vw, 6px);
    font-weight: bold;
    font-size: clamp(16px, 4vw, 20px);
    /* 增大图标尺寸 */
}

#back-button:hover {
    background-color: #f0f0f0;
}

#game-title {
    font-size: clamp(14px, 4vw, 18px);
    /* 响应式标题 */
    font-weight: bold;
    text-align: center;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    padding: 0 clamp(70px, 20vw, 150px);
    /* 调整内边距以适应更大的按钮 */
    box-sizing: border-box;
    line-height: 1;
    /* 确保文字居中 */
}

#game-iframe {
    width: 100%;
    height: 93%;
    /* 响应式高度 */
    border: none;
    max-width: none;
    margin: 0;
}

/* 加载指示器样式 */
#loading-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1003;
}

#loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #000;
    width: clamp(20px, 5vw, 35px);
    /* 响应式加载图标 */
    height: clamp(20px, 5vw, 35px);
    /* 响应式加载图标 */
    animation: spin 1s linear infinite;
    margin: 0 auto clamp(5px, 2vw, 12px);
    /* 响应式间距 */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 自定义刷新按钮 - 优化对齐 */
#custom-refresh {
    cursor: pointer;
    position: absolute;
    right: clamp(8px, 2vw, 15px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* 水平居中 */
    color: #000;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: bold;
    padding: clamp(8px, 3vw, 12px);
    font-size: clamp(14px, 4vw, 18px);
    height: 100%;
    /* 与头部等高 */
}

#custom-refresh:hover {
    color: #333;
}

#custom-refresh.spin {
    transform: rotate(720deg);
}

#custom-refresh span {
    margin-left: clamp(3px, 1vw, 6px);
}

/* 底部样式 - 居中显示 */
.footer-sj {
    text-align: center;
    padding: clamp(15px, 3vw, 25px) 0;
    /* 响应式内边距 */
}

.footer-sj span {
    font-size: clamp(12px, 2vw, 14px);
    /* 响应式文字 */
}

/* 响应式调整 - 针对大屏幕设备 */
@media (min-width: 768px) {
    .header-NGJTNG-1 {
        flex-direction: row;
        /* 在大屏幕上恢复水平布局 */
        justify-content: center;
        /* 水平居中 */
    }

    .header-NGJTNG-1 img {
        margin-right: clamp(10px, 3vw, 25px);
        /* 恢复右侧间距 */
        margin-bottom: 0;
        /* 移除底部间距 */
    }

    .info {
        align-items: flex-start;
        /* 左对齐 */
    }

    .info h1,
    .sub-text {
        text-align: left;
        /* 文字左对齐 */
    }
}