* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* 顶部导航样式 */
.header {
    background-color: #1a1a2e;
    color: white;
    padding: 0 15px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    /*background-color: #ff6b6b;*/
    border-radius: 6px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff6b6b;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 15px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 10px;
    width: 200px;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.auth-buttons {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.auth-buttons button {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: 10px;
    font-size: 14px;
}

.auth-buttons button:hover {
    background-color: #ff5252;
}

/* Banner轮播样式 */
.banner-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.banner-dots {
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 20px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.banner-dot.active {
    background-color: #ff6b6b;
    transform: scale(1.2);
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: background-color 0.3s, transform 0.3s;
    opacity: 0;
}

.banner-container:hover .banner-nav {
    opacity: 1;
}

.banner-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

/* 热门推荐区域 */
.section {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a2e;
}

.section-more {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.section-more:hover {
    color: #ff6b6b;
}

/* 游戏卡片样式 */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.game-card {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.game-img {
    height: 150px;
    background-color: #e0e0e0;
    position: relative;
}

.game-img::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 14px;
}

.game-info {
    padding: 15px;
}

.game-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.game-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.game-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.play-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
}

.play-btn:hover {
    background-color: #ff5252;
}



/* 游戏卡片样式 - 热门推荐每行5个 (220px * 5 ≈ 1100, 配合gap和容器自适应) */
.game-recs {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 强制每行5列 */
    gap: 16px; /* 稍微缩小间距以容纳5个 */
}

/* 分类推荐仍沿用自动填充，但保持风格一致，最多5个 */
.section:not(.hot-section) .game-recs {
    grid-template-columns: repeat(5, 1fr);
}

.game-rec {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.game-rec:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* 图片容器：包含背景色和文字标签 */
.game-rec-img {
    height: 150px;
    background-color: #2d5a8c; /* 占位色 */
    position: relative;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(145deg, #3a6ea5, #1e3e64); /* 渐变占位图 */
}

/* 底部阴影遮罩为一个整体 - 统一显示游戏名和手机扫码，无图标 */
.game-rec-img .game-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.scan-text {
    color: white;
}

.qr-code {
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.qr-code::before {
    content: "手机扫码";
    margin-right: 5px;
}


/* ---------- 游戏推荐二维码悬停样式 ---------- */
.qrCode {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

/* 二维码弹出层默认隐藏 */
.qr-popups {
    display: none;
    position: absolute;
    bottom: 30px;           /* 在文字上方弹出 */
    left: 17%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    white-space: nowrap;
    text-align: center;
}

/* 鼠标悬停时显示二维码弹窗 */
.qrCode:hover .qr-popups {
    display: block;
}

.qr-popups canvas, .qr-popups img {
    display: block;
    margin: 0 auto;
    width: 100px;
    height: 100px;
}

/* ---------- 二维码悬停样式 ---------- */
.qr-code {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

/* 二维码弹出层默认隐藏 */
.qr-popup {
    display: none;
    position: absolute;
    bottom: 30px;           /* 在文字上方弹出 */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    white-space: nowrap;
    text-align: center;
}

/* 鼠标悬停时显示二维码弹窗 */
.qr-code:hover .qr-popup {
    display: block;
}

.qr-popup canvas, .qr-popup img {
    display: block;
    margin: 0 auto;
    width: 120px;
    height: 120px;
}

.qr-popup .qr-game-name {
    font-size: 12px;
    color: #333;
    margin-top: 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 小箭头 */
.qr-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

/* 分类标签样式 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-tag {
    background-color: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: background-color 0.3s;
}

.category-tag:hover {
    background-color: #e0e0e0;
}

/* 资讯区域样式 */
.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #999;
    font-size: 14px;
    min-width: 100px;
}

.news-title {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.news-title:hover {
    color: #ff6b6b;
}

/* 热门游戏区域 */
.featured-game {
    display: flex;
    background: linear-gradient(to right, #1a1a2e, #2d2d4d);
    border-radius: 8px;
    overflow: hidden;
    color: white;
    margin-bottom: 20px;
}

.featured-game-info {
    padding: 30px;
    flex: 1;
}

.featured-game-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.featured-game-desc {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.featured-game-img {
    width: 300px;
    background-color: #e0e0e0;
    position: relative;
}

.featured-game-img::after {
    content: "小小首富";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 16px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    padding: 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1a1a2e;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #ff6b6b;
    outline: none;
}

.submit-btn {
    width: 100%;
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #ff5252;
}

.auth-switch {
    text-align: right;
    margin-top: 15px;
}

.auth-switch-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 14px;
}

.auth-switch-btn:hover {
    text-decoration: underline;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    color: #666;
    font-size: 16px;
}

.auth-tab.active {
    color: #ff6b6b;
    border-bottom: 2px solid #ff6b6b;
}

/* 底部样式 */
.footer {
    background-color: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.copyright {
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin: 15px 0;
    }

    .search-bar {
        width: 100%;
        margin: 10px 0;
    }

    .search-bar input {
        width: 100%;
    }

    .auth-buttons {
        align-self: flex-end;
        margin-top: -40px;
    }

    .banner-container {
        height: 250px;
    }

    .banner-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
        opacity: 0.7;
    }

    .game-cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .featured-game {
        flex-direction: column;
    }

    .featured-game-img {
        width: 100%;
        height: 200px;
    }
}