/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Microsoft YaHei", sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 高级顶部导航栏 */
.top-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    border-radius: 0 0 15px 15px;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-logo {
    height: 85px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.store-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* 搜索栏样式 */
.search-container {
    flex: 1;
    max-width: 600px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-icon {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-right: 10px;
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    padding: 6px 0;
    color: #fff;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* 统一蓝紫渐变按钮样式 */
.search-btn, .play-btn, .detail-play-btn, .category-item.active, .category-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-btn:hover, .play-btn:hover, .detail-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(102, 126, 234, 0.4);
}

.search-btn:active, .play-btn:active, .detail-play-btn:active {
    transform: translateY(1px);
}

/* 立即游玩按钮链接样式 */
.detail-play-btn a {
    text-decoration: none;
    color: white;
    display: block;
    width: 100%;
    height: 100%;
}

.detail-play-btn a:hover {
    text-decoration: none;
    color: white;
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link.active, .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.nav-link i {
    font-size: 16px;
}

/* 分类栏样式 */
.category-bar {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background-color: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-item i {
    font-size: 14px;
}

/* 游戏列表样式 */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 24px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 3px;
}

.section-title i {
    color: #667eea;
}

/* 游戏网格布局 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* 彩虹色阴影卡片 - 四周显示 */
.game-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 彩虹色四周边框 */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb, #ffecd2, #fcb69f) border-box;
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rainbow-border 3s ease infinite;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}
/* 彩虹边框动画 */
@keyframes rainbow-border {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.game-card:hover::before {
    animation-duration: 1.5s;
}

/* 详情页卡片彩虹边框 - 同样添加动画 */
.game-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb, #ffecd2, #fcb69f) border-box;
    background-size: 400% 400%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rainbow-border 3s ease infinite;
}

.game-detail-card:hover::before {
    animation-duration: 1.5s;
}
/* 游戏封面容器 */
.game-cover-container {
    position: relative;
    padding-bottom: 177.78%;
    height: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.game-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-cover {
    transform: scale(1.08);
}

/* 评分徽章 - 改为蓝紫渐变 */
.game-score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

/* 游戏信息 */
.game-info {
    padding: 16px;
    flex: 1;
    background: white;
}

.game-title {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.game-card:hover .game-title {
    color: #667eea;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

/* 标签样式 - 改为蓝紫渐变 */
.tag-item {
    font-size: 11px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

.game-meta {
    font-size: 12px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-meta i {
    color: #667eea;
}

/* 游戏操作按钮 */
.game-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 16px 16px;
    transform: translateY(100%);
    transition: all 0.4s ease;
    margin-top: auto;
    z-index: 3;
}

.game-card:hover .game-actions {
    transform: translateY(0);
}

.play-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 无游戏提示 */
.no-games {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: #718096;
}

.no-games i {
    margin-bottom: 16px;
    color: #cbd5e0;
}

.no-games p {
    font-size: 18px;
}

/* 详情页样式 */
.detail-container {
    padding: 30px 0;
}

.game-detail-card {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* 详情页卡片彩虹边框 */
.game-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb, #ffecd2, #fcb69f) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-cover {
    position: relative;
    width: 100%;
    max-width: 220px;
}

.detail-cover::before {
    content: "";
    display: block;
    padding-bottom: 177.78%;
}

.detail-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 详情页评分 - 改为蓝紫渐变 */
.detail-score {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.detail-basic-info {
    flex: 1;
    min-width: 300px;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4a5568;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-meta i {
    color: #667eea;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

/* 详情页标签 - 改为蓝紫渐变 */
.detail-tag {
    font-size: 13px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
}

.detail-play-btn {
    padding: 12px 30px;
    font-size: 16px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.detail-play-btn:hover {
    transform: translateY(-3px);
}

.detail-desc {
    padding: 30px;
}

.desc-title {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desc-title i {
    color: #667eea;
}

.desc-content {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.8;
    white-space: pre-line;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #e2e8f0;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-radius: 15px 15px 0 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 36px;
    width: auto;
    border-radius: 6px;
}

.footer-company-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #9b59b6;
}

.copyright {
    font-size: 13px;
    color: #a0aec0;
    margin-top: 10px;
}

/* 游戏卡片链接样式 */
.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
    cursor: pointer;
}

.game-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 992px) {
    .top-nav .container {
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        width: 100%;
        max-width: none;
    }

    .detail-header {
        padding: 20px;
        gap: 20px;
    }

    .detail-cover {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .company-logo {
        height: 75px;
    }

    .store-name {
        font-size: 20px;
    }

    .search-box {
        padding: 8px 16px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .game-info {
        padding: 12px;
    }

    .game-title {
        font-size: 14px;
    }

    .detail-title {
        font-size: 24px;
    }

    .detail-header {
        flex-direction: column;
    }

    .detail-cover {
        max-width: 100%;
        max-width: 160px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .nav-links {
        gap: 10px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .category-item {
        padding: 8px 16px;
        font-size: 13px;
    }

    .section-title {
        font-size: 20px;
    }
}

/* 搜索结果高亮 */
.game-card.highlight {
    border: 2px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}