/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background: linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);
    color: #333;
    min-height: 100vh;
}

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

/* 顶部导航 */
.header {
    background-color: #222;
    padding: 10px 0;
}

.header-container {
    width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: #fff;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-item.active {
    background-color: #cc0015;
}

.nav-item:hover {
    background-color: #cc0015;
}

/* Banner 区域（视频背景，无文字） */
.banner {
    height: 450px;
    position: relative;
    overflow: hidden;
}

.banner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 功能入口区 - 核心修改：让4个卡片间距完全一致 */
.function-area {
    padding: 30px 0;
    background-color: #fff;
}

.function-container {
    width: 1440px;
    margin: 0 auto;
    /* 关键修改1：统一列宽为1fr，取消固定280px，确保4列等宽 */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 关键修改2：统一间距为20px，所有卡片之间距离一致 */
    gap: 20px;
}

/* 未登录用户卡片 - 新增自适应宽高，取消固定300px */
.guest-card {
    /* 关键修改3：取消固定宽高，适配网格列宽 */
    width: 100%;
    height: 300px;
    backdrop-filter: blur(10px);
    box-shadow: rgba(0, 0, 0, 0.15) 0px 15px 30px;
    background: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
}

.guest-card__top {
    height: 200px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgb(185, 28, 28), rgb(220, 38, 38), rgb(239, 68, 68));
    padding: 30px 20px;
    border-bottom-left-radius: 50% 30px;
    border-bottom-right-radius: 50% 30px;
}

/* 参考目标样式，完全重构头像部分 */
.guest-avatar {
    /* 移除原有的宽高/边框，完全复用目标样式属性 */
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    transition: 0.3s;
}

.guest-avatar img {
    width: 95px;
    height: 95px;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 20px;
    border-radius: 50%;
    border-width: 3px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.4);
    padding: 3px;
    background: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    object-fit: cover;
    object-position: center;
}

/* 头像悬浮效果 - 完全匹配目标 */
.guest-avatar img:hover {
    transform: scale(1.05);
    box-shadow: rgba(255, 255, 255, 0.25) 0px 0px 25px;
    border-color: rgba(255, 255, 255, 0.9);
}

.guest-welfare {
    font-size: 15px;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    font-family: "Microsoft Yahei", sans-serif;
}

.guest-card__bottom {
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 25px 20px;
    background: rgb(255, 255, 255);
}

.guest-login-btn {
    width: 82%;
    padding: 12px;
    background: linear-gradient(135deg, rgb(185, 28, 28), rgb(220, 38, 38), rgb(239, 68, 68));
    color: #ffffff;
    border: none;
    border-radius: 26px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(230, 33, 42, 0.35);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.guest-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(230, 33, 42, 0.45);
}

.guest-card:hover {
    transform: translateY(-5px);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 35px;
}

/* 功能卡片（无文字叠加） - 确保高度和登录卡片一致 */
.feature-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    /* 关键修改4：统一高度为300px，和登录卡片一致 */
    height: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all .4s cubic-bezier(.4,0,.2,1);
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.feature-card a {
    display: block;
    width: 100%;
    height: 100%;
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
}

.feature-card:hover img {
    transform: scale(1.08);
}

/* 版本分类标签 */
.version-tags {
    padding: 20px 0;
    background-color: #fff;
}

.tags-container {
    width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.tags-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    background: #fff;
    cursor: pointer;
    transition: all .3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.tag.active {
    background: linear-gradient(45deg,#cc0015,#ff4d4d);
    color: #fff;
    box-shadow: 0 4px 15px rgba(204,0,21,.3);
}

.tag:hover:not(.active) {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
    color: #cc0015;
}

.search-box {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 25px;
    padding: 0;
    margin-top: 10px;
    position: relative;
    width: 280px;
    height: 40px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 0 45px 0 20px;
    font-size: 14px;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 2px solid transparent;
    background: #fff;
    font-size: 14px;
    color: #333;
    transition: all .3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.search-box input::placeholder {
    color: #999;
}

.search-box input:focus {
    box-shadow: 0 0 0 3px rgba(204,0,21,.2),0 4px 15px rgba(204,0,21,.1);
}

.search-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 10px;
    color: #cc0015;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: .6;
    transition: all .3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

/* 游戏列表区（精准匹配目标样式） */
.game-list {
    padding: 30px 0 60px;
}

.section-title {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 40px;
    background: linear-gradient(90deg,#b3122b,#d32034,#ff3f4f,#d32034,#b3122b);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 2s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.section-title::before,
.section-title::after {
    content: "\25c6";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    background-image: linear-gradient(90deg,#b3122b,#d32034,#ff3f4f,#d32034,#b3122b),linear-gradient(to right,transparent,rgba(179,18,43,.3),rgba(255,40,60,.9),rgba(179,18,43,.3),transparent);
    background-clip: text,border-box;
    -webkit-background-clip: text,padding-box;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto,100% 5px;
    background-repeat: no-repeat;
    background-position: 0% center,center center;
}

.section-title::before {
    right: 100%;
    margin-right: 25px;
    text-align: right;
}

.section-title::after {
    left: 100%;
    margin-left: 25px;
    text-align: left;
    background-image: linear-gradient(-90deg,#b3122b,#d32034,#ff3f4f,#d32034,#b3122b),linear-gradient(to right,transparent,rgba(179,18,43,.3),rgba(255,40,60,.9),rgba(179,18,43,.3),transparent);
}

.game-container {
    width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 游戏卡片 - 1:1还原目标样式 */
.game-card {
    box-shadow: rgba(0, 0, 0, 0.06) 0px 8px 20px;
    position: relative;
    min-height: 320px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.05);
    border-image: initial;
}

/* 卡片悬浮效果 */
.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

/* 游戏图片容器 - 精准还原宽高比和定位 */
.game-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    overflow: hidden;
    height: auto !important;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
}

/* 图片悬浮缩放效果 */
.game-card:hover .game-cover img {
    transform: scale(1.08);
}

/* 游戏标签样式优化 */
.label {
    position: absolute;
    top: 4px;
    padding: 2px 10px;
    background: rgba(0,0,0,.85);
    color: #facc15;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    border: 1px solid rgba(250,204,21,.5);
}

.label.new {
    right: 4px;
    top: 0;
    background: rgba(0,168,0,.85);
    color: #fff;
    border-color: rgba(0,168,0,.5);
    animation: pulse-scale 2s infinite;
}

.label.package {
    left: 4px;
}

.label.精品 {
    left: 4px;
    background: rgba(255,152,0,.85);
    color: #fff;
    border-color: rgba(255,152,0,.5);
}

.label.hot {
    right: 4px;
    top: 0;
    background: rgba(204,0,21,.85);
    color: #fff;
    border-color: rgba(204,0,21,.5);
    animation: pulse-scale 2s infinite;
}

@keyframes pulse-scale {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 游戏信息区域 - 1:1还原目标网站样式 */
.game-info {
    padding: 20px;
    background: linear-gradient(180deg,#fff 0%,#f8f9fa 100%);
}

/* 标题容器 - 还原flex布局和间距 */
.game-name-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: space-between;
}

/* 游戏名称样式 */
.game-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    transition: all .3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

/* 热门标题渐变效果 */
.game-name.hot {
    background: linear-gradient(45deg,#ff6b6b,#ff4d4d);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    position: relative;
}

.game-name.hot:after {
    content: "\1f525";
    position: absolute;
    right: -25px;
    top: -2px;
    font-size: 20px;
    animation: flame .6s ease-in-out infinite alternate;
}

@keyframes flame {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* 悬浮时标题变色 */
.game-card:hover .game-name:not(.hot) {
    color: #cc0015;
}

/* 游戏类型标签 */
.game-type {
    font-size: 14px;
    color: #cc0015;
    padding: 2px 8px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0;
}

/* 游戏描述 - 精准还原目标网站样式 */
.game-desc {
    font-size: 12px;
    color: rgb(153, 153, 153);
    margin-bottom: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    min-height: 28px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.02);
    border-image: initial;
    white-space: nowrap;
    overflow: hidden;
}

/* 按钮容器 - 还原目标网站样式 */
.game-btns {
    display: flex;
    align-items: center;
    margin: 15px 0px 0px;
    gap: 10px;
    padding: 0;
}

/* 游戏按钮 - 1:1还原目标网站样式 */
.game-btn {
    height: 34px;
    font-weight: 500;
    font-size: 13px;
    color: rgb(255, 255, 255);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0px 15px;
    border-radius: 8px;
    background: linear-gradient(45deg, rgb(204, 0, 21), rgb(255, 77, 77));
    border-width: 1px;
    border-style: solid;
    border-color: rgb(234, 234, 234);
    border-image: initial;
    transition: 0.25s;
    flex: 1 1 0%;
    overflow: hidden;
}

/* 按钮流光效果 */
.game-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,transparent,rgba(255,255,255,.6),transparent);
    transition: .5s;
}

/* 按钮悬浮效果 */
.game-btn:hover {
    background: linear-gradient(45deg, rgb(204, 0, 21), rgb(255, 77, 77));
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(204,0,21,.15);
    color: rgb(255, 255, 255);
    border-color: transparent;
}

.game-btn:hover::after {
    left: 100%;
}

/* 禁用按钮样式 */
.game-btn.disabled {
    background: linear-gradient(45deg,#999,#ccc) !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-btn.disabled:hover::after {
    left: -100%;
}

/* 底部区域 */
.footer {
    background-color: #222;
    color: #999;
    padding: 20px 0;
}

.footer-container {
    width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.drop-rate img {
    height: 120px;
}

.copyright {
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    flex: 1;
}

.age-tip img {
    height: 100px;
}

/* 响应式适配 */
@media (max-width: 1440px) {
    .header-container,
    .function-container,
    .tags-container,
    .game-container,
    .footer-container {
        width: 95%;
    }
    
    .section-title::before,
    .section-title::after {
        width: 100px;
    }
}

@media (max-width: 1024px) {
    .function-container {
        grid-template-columns: 1fr 1fr;
    }
    .game-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .function-container {
        grid-template-columns: 1fr;
    }
    .game-container {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    .section-title {
        font-size: 28px;
    }
    .section-title::before,
    .section-title::after {
        width: 50px;
    }
}