﻿/* reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fef9e6;  /* 米白色主背景 */
    color: #2c3e2f;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========= 顶部导航 ========= */
.header {
    background: rgba(255, 252, 240, 0.96);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e6dccf;
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i {
    color: #e67e22;
    font-size: 1.8rem;
}
.main-nav ul {
    display: flex;
    gap: 32px;
    list-style: none;
}
.main-nav a {
    text-decoration: none;
    color: #5a4a3a;
    font-weight: 500;
    transition: 0.2s;
}
.main-nav a:hover, .main-nav a.active {
    color: #e67e22;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.search-box {
    position: relative;
}
.search-box input {
    background: #fff8ed;
    border: 1px solid #e0d4c0;
    padding: 8px 16px 8px 38px;
    border-radius: 40px;
    color: #2c3e2f;
    font-size: 0.85rem;
    width: 200px;
    transition: 0.2s;
}
.search-box input:focus {
    outline: none;
    border-color: #e67e22;
    width: 260px;
}
.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #b89b7a;
}
.user-icon {
    font-size: 1.8rem;
    cursor: pointer;
    color: #5a4a3a;
}
.mobile-menu-btn {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #5a4a3a;
}

/* 移动端侧边栏 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fffaf0;
    z-index: 200;
    transition: 0.3s ease;
    padding: 24px;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
}
.mobile-sidebar.open {
    left: 0;
}
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e6dccf;
    color: #2c3e2f;
}
.mobile-sidebar ul {
    list-style: none;
}
.mobile-sidebar li {
    margin: 20px 0;
}
.mobile-sidebar a {
    text-decoration: none;
    color: #5a4a3a;
    font-size: 1.1rem;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 150;
    display: none;
}
.overlay.active {
    display: block;
}

/* ========= 轮播区 ========= */
.hero-slider {
    margin-bottom: 48px;
}
.swiper {
    width: 100%;
    height: 720px;
    border-radius: 28px;
    overflow: hidden;
}
.slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.slide-content {
    background: rgba(255, 248, 235, 0.85);
    backdrop-filter: blur(4px);
    padding: 32px 40px;
    border-radius: 40px;
    max-width: 80%;
    color: #2c3e2f;
}
.slide-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}
.btn-primary {
    display: inline-block;
    background: #e67e22;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: 0.2s;
}
.btn-primary:hover {
    background: #d35400;
    transform: scale(1.02);
}
.swiper-button-next, .swiper-button-prev {
    color: #e67e22;
}
.swiper-pagination-bullet-active {
    background: #e67e22;
}

/* 分类标签栏 */
.category-bar {
    margin: 32px 0 28px;
}
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.cat-btn {
    background: #f4ecdf;
    border: none;
    padding: 8px 22px;
    border-radius: 40px;
    color: #5a4a3a;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}
.cat-btn.active, .cat-btn:hover {
    background: #e67e22;
    color: white;
}

/* 游戏卡片网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin: 20px 0 30px;
}
.game-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #ede3d4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.1);
    border-color: #e67e22;
}
.game-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f2e6d8;
}
.game-info {
    padding: 18px;
}
.game-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    color: #2c3e2f;
}
.game-category {
    font-size: 0.7rem;
    background: #fbe9d2;
    padding: 4px 8px;
    border-radius: 20px;
    color: #c25b0a;
}
.game-desc {
    font-size: 0.8rem;
    color: #6b5a48;
    margin: 12px 0;
    line-height: 1.4;
}
.game-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tag {
    background: #f0e9df;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #7d6b57;
}

.load-more-wrap {
    text-align: center;
    margin: 40px 0 60px;
}
.load-more {
    background: #e6dccf;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    color: #5a4a3a;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.load-more:hover {
    background: #e67e22;
    color: white;
}

/* ========= 页脚 ========= */
.footer {
    background: #f5ede0;
    padding: 48px 0 24px;
    border-top: 1px solid #e3d6c6;
    margin-top: 30px;
}
.footer-content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.footer-logo {
    flex-shrink: 0;
    min-width: 180px;
}
.footer-logo i {
    font-size: 2rem;
    color: #e67e22;
}
.footer-logo span {
    font-size: 1.3rem;
    font-weight: 700;
    margin-left: 8px;
    color: #2c3e2f;
}
.footer-logo p {
    margin-top: 12px;
    color: #8b775d;
}
.footer-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 48px;
    overflow-x: auto;
    flex-shrink: 0;
}
.link-group {
    min-width: 120px;
}
.link-group h4 {
    margin-bottom: 16px;
    font-weight: 600;
    color: #2c3e2f;
}
.link-group ul {
    list-style: none;
}
.link-group li {
    margin-bottom: 10px;
}
.link-group a {
    text-decoration: none;
    color: #8b775d;
    transition: 0.2s;
}
.link-group a:hover {
    color: #e67e22;
}
.copyright {
    text-align: center;
    color: #b09a7c;
    font-size: 0.8rem;
    padding-top: 20px;
    border-top: 1px solid #e3d6c6;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-nav, .user-icon {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .search-box input {
        width: 150px;
    }
    .search-box input:focus {
        width: 180px;
    }
    .swiper {
        height: 300px;
    }
    .slide-content h2 {
        font-size: 1.4rem;
    }
    .category-tabs {
        justify-content: center;
    }
    .footer-content {
        gap: 24px;
    }
    .footer-links {
        gap: 24px;
    }
}
@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 16px;
    }
}