﻿:root {
    --primary: #ff00ff;
    --primary-dark: #9d00ff;
    --primary-light: #ffb3ff;
    --secondary: #00ffff;
    --accent: #ffff00;
    --text-main: #ffffff;
    --text-secondary: #e0e0ff;
    --bg-light: #0a0416;
    --white: #1a0f33;
    --border: #332255;
    --shadow: 0 0 15px rgba(255, 0, 255, 0.2);
    --glow: 0 0 10px var(--primary), 0 0 20px var(--secondary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Orbitron", "微软雅黑", sans-serif;
}

body {
    background: linear-gradient(45deg, #0a0416, #120425, #0a0416);
    background-size: 400% 400%;
    animation: bgAnim 15s ease infinite;
    color: var(--text-main);
    padding-bottom: 20px;
    overflow-x: hidden;
}

/* 背景动画 */
@keyframes bgAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* 顶部横幅 */
.banner {
    height: 210px;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
    box-shadow: var(--shadow);
    position: relative;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 移除动态效果 */
}

/* 移除横幅动画 */
/*@keyframes bannerZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}*/

/* 分类标签区域 */
.category-scroll {
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 15px;
    scrollbar-width: none; /* 隐藏滚动条 */
}

.category-scroll::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
}

.category-container {
    display: flex;
    gap: 8px;
    min-width: max-content;
    padding-bottom: 5px;
}

.category-item {
    background: var(--white);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 16px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 13px;
    border: 1px solid transparent;
}

.category-item.active {
    color: white;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.category-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #ff6ec7, #7873f5);
    z-index: -1;
    border-radius: 18px;
}

.category-item:hover:not(.active) {
    background: var(--primary-light);
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* 搜索区域 */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
    box-shadow: 0 0 5px var(--primary);
}

.search-container button {
    padding: 12px 20px;
    border: none;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s;
    box-shadow: 0 0 10px var(--primary);
}

.search-container button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--secondary);
}

/* 游戏列表区域 */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.game-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-card::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: 0.5s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255,0,255,0.2);
    border-color: var(--primary);
}

.game-card:hover::before {
    left: 100%;
}

/* 游戏图标样式优化 - 加大圆角 */
.game-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 24px; /* 进一步加大圆角 */
    margin-right: 15px;
    border: 2px solid #ff6ec7;
    outline: 2px solid #7873f5;
    outline-offset: 2px;
    flex-shrink: 0;
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.game-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: 1.5;
    max-height: 42px;
    overflow: hidden;
    position: relative;
}

.game-desc::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 1.5em;
    background: linear-gradient(to left, var(--white), transparent);
    pointer-events: none;
}

.category-tag {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 10px 16px;
    border: none;
    background: linear-gradient(45deg, var(--white), var(--bg-light));
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.page-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 0 10px var(--primary);
}

.page-btn:hover:not(.active) {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

/* 动态背景效果 */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(circle at 10% 20%, rgba(255,0,255,0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 80%, rgba(0,255,255,0.1) 0%, transparent 20%);
    background-size: 150% 150%;
    animation: bgMove 20s linear infinite;
    z-index: -1;
}

@keyframes bgMove {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .banner {
        height: 160px;
    }

    .search-container {
        flex-direction: row;
    }

    .search-container button {
        width: auto;
    }

    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .category-item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .game-card {
        flex-direction: row;
        text-align: left;
    }

    .game-card img {
        margin-right: 10px;
        margin-bottom: 0;
    }
}

/*游戏详情弹窗--start*/
/* 基础弹窗样式 - 移动端全屏覆盖 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #2d0c5e, #120425);
    z-index: 9999;
    padding: 1rem;
    box-sizing: border-box;
}

/* 背景动态效果 - 移动端优化 */
.modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            radial-gradient(circle at 20% 30%, rgba(255, 0, 255, 0.1) 0%, transparent 20%),
            radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.1) 0%, transparent 20%);
    background-size: 150% 150%;
    animation: bgMove 20s linear infinite;
}

/* 弹窗内容容器 - 移动端尺寸优化+亮度增强 */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 85vh;
    max-height: 600px;
    background: rgba(25, 10, 50, 0.85); /* 提高背景亮度 */
    border-radius: 24px;
    padding: 2rem 1.5rem;
    margin: 5vh auto;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.2),
    0 0 60px rgba(0, 255, 255, 0.1);
    animation: borderGlow 5s ease infinite;
    overflow: hidden;
}

/* 动态渐变边框 */
.modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff);
    background-size: 400%;
    animation: gradientAnimate 8s ease infinite;
}

/* 内容滚动区域 - 移动端滑动支持 */
.modal-scroll-container {
    height: calc(100% - 60px);
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 0, 255, 0.5) transparent;
}

/* 自定义滚动条 */
.modal-scroll-container::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 0, 255, 0.5);
    border-radius: 2px;
}

/* 关闭按钮 - 移动端大尺寸点击区域 */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 0, 255, 0.3);
    color: #fff;
    font-size: 24px;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

/* 游戏标题区域 - 移动端排版 */
.game-modal .header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* 游戏图标 - 高亮特效版 */
.game-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    border: 3px solid #fff;
    /* 增强版高亮效果 */
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.7),
    0 0 30px rgba(255, 255, 0, 0.5),
    0 0 45px rgba(255, 255, 0, 0.3);
    animation: avatarPulse 2s infinite alternate;
    transition: transform 0.3s ease;
}

/* 头像脉冲动画 */
@keyframes avatarPulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 255, 0, 0.7),
        0 0 30px rgba(255, 255, 0, 0.5),
        0 0 45px rgba(255, 255, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.9),
        0 0 40px rgba(255, 255, 0, 0.7),
        0 0 60px rgba(255, 255, 0, 0.5);
    }
}

/* 头像悬停/触摸效果 */
.game-icon:hover, .game-icon:active {
    transform: scale(1.1);
    animation: avatarBounce 0.5s ease;
}

@keyframes avatarBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 标题文本组 - 移动端字体优化+亮度增强 */
.title-group {
    flex: 1;
}

.gamemodal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.3rem;
    font-family: "Orbitron", sans-serif;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8); /* 增强文字发光 */
}

.game-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 0, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #ff00ff;
    border: 1px solid rgba(255, 0, 255, 0.3);
}

/* 游戏描述 - 移动端文本优化+亮度增强 */
.game-description {
    color: #f5f5ff; /* 提高文字亮度 */
    line-height: 1.6;
    font-size: 1rem;
    padding: 1rem;
    background: rgba(40, 20, 70, 0.7); /* 提高背景亮度 */
    border-radius: 16px;
    border-left: 3px solid #00ffff;
    margin-bottom: 1.5rem;
    font-family: "Roboto", sans-serif;
}

/* 礼包码区域 - 自适应文字大小+亮度增强 */
.cdkey-container {
    margin: 1.5rem 0;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15), rgba(0, 255, 255, 0.15)); /* 提高亮度 */
    border-radius: 16px;
    padding: 1rem;
    border: 1px dashed rgba(255, 0, 255, 0.3);
}

.cdkey-label {
    display: block;
    font-size: 0.9rem;
    color: #00ffff;
    margin-bottom: 0.8rem;
    font-weight: bold;
}

#modalCdKey {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    color: #a0ffff; /* 提高礼包码亮度 */
    font-family: "Courier New", monospace;
    letter-spacing: 1px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;

    /* 自适应字体大小 - 解决长字符串问题 */
    font-size: clamp(0.8rem, 4vw, 1.2rem);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* 隐藏滚动条但保留滚动功能 */
}

#modalCdKey::-webkit-scrollbar {
    display: none;
}

#modalCdKey:hover {
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* 福利攻略链接 - 移动端大点击区域 */
.welfare-container {
    margin: 1.5rem 0;
    text-align: center;
}

.welfare-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(45deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.2));
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 0, 255, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.welfare-link::before {
    content: "🎁";
}

.welfare-link:hover {
    background: linear-gradient(45deg, rgba(255, 0, 255, 0.3), rgba(0, 255, 255, 0.3));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
}

/* 下载按钮 - 移动端大尺寸设计 */
.download-btn {
    display: block;
    margin: 1.5rem 0 1rem;
    padding: 1.2rem 2rem;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: black;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    font-family: "Orbitron", sans-serif;
}

.download-btn::before {
    content: "🚀 立即下载游戏";
    display: inline-block;
    transition: transform 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
}

.download-btn:active {
    transform: translateY(1px);
}

/* 动画效果定义 */
@keyframes gradientAnimate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 0, 255, 0.2),
        0 0 60px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 0, 255, 0.3),
        0 0 80px rgba(0, 255, 255, 0.2);
    }
}

@keyframes bgMove {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* 移动端触摸反馈动画 */
@keyframes touchFeedback {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.touch-feedback {
    animation: touchFeedback 0.3s ease;
}

/* 响应式调整 - 适配不同手机尺寸 */
@media (max-width: 375px) {
    .modal-content {
        padding: 1.5rem 1rem;
    }

    .gamemodal-title {
        font-size: 1.3rem;
    }

    .game-icon {
        width: 70px;
        height: 70px;
    }

    .download-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-height: 576px) {
    .modal-content {
        height: 90vh;
        max-height: none;
    }
}
/*游戏详情弹窗--end*/