* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

/* 手机版顶部导航 */
.mobile-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4d 100%);
    color: white;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.mobile-auth-buttons {
    display: flex;
    align-items: center;
}

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

.mobile-search-bar {
    /*margin-top: 10px;*/
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    /*padding: 8px 15px;*/
    display: flex;
    align-items: center;
}

.mobile-search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 10px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

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

/* Banner轮播样式 - 手机优化版 */
.banner-section {
    margin: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.banner-container {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

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

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

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

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

.banner-dot {
    width: 6px;
    height: 6px;
    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);
}

/* 主要内容区域 - 手机优化 */
.main-content {
    padding: 10px;
}

/* 热门推荐区域 - 紧凑布局 */
.section {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

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

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

.section-more {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    background-color: #f5f5f5;
    border-radius: 12px;
}

/* 热门推荐 - 紧凑布局：一行五个 */
.game-cards-compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.game-card-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.game-icon-compact {
    width: 59px;
    height: 59px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.game-card-compact:hover .game-icon-compact {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.game-name-compact {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    height: 28px;
    overflow: hidden;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 游戏名称截断 - 最多显示4个汉字 */
.game-name-compact.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    height: auto;
    -webkit-line-clamp: 1;
}

/* 游戏icon背景颜色 - 为不同游戏设置不同颜色 */
.game-icon-1 { background: linear-gradient(135deg, #ff6b6b, #ff8e8e); }
.game-icon-2 { background: linear-gradient(135deg, #4ecdc4, #6ee7e7); }
.game-icon-3 { background: linear-gradient(135deg, #ffd166, #ffe8a3); }
.game-icon-4 { background: linear-gradient(135deg, #06d6a0, #4aecc4); }
.game-icon-5 { background: linear-gradient(135deg, #118ab2, #4ac9f0); }
.game-icon-6 { background: linear-gradient(135deg, #9d4edd, #c77dff); }
.game-icon-7 { background: linear-gradient(135deg, #f3722c, #f8965c); }
.game-icon-8 { background: linear-gradient(135deg, #43aa8b, #6dcfb2); }
.game-icon-9 { background: linear-gradient(135deg, #577590, #7d9bc0); }
.game-icon-10 { background: linear-gradient(135deg, #f94144, #ff6b6b); }
.game-icon-11 { background: linear-gradient(135deg, #f8961e, #ffb347); }
.game-icon-12 { background: linear-gradient(135deg, #90be6d, #b5d99c); }
.game-icon-13 { background: linear-gradient(135deg, #7209b7, #9d4edd); }
.game-icon-14 { background: linear-gradient(135deg, #f72585, #ff6b9d); }
.game-icon-15 { background: linear-gradient(135deg, #3a86ff, #6aa6ff); }
.game-icon-16 { background: linear-gradient(135deg, #fb5607, #ff8c5a); }
.game-icon-17 { background: linear-gradient(135deg, #8338ec, #b57cf4); }
.game-icon-18 { background: linear-gradient(135deg, #ff006e, #ff5fa3); }
.game-icon-19 { background: linear-gradient(135deg, #3a86ff, #7ba9ff); }
.game-icon-20 { background: linear-gradient(135deg, #ff595e, #ff8a8e); }

/* 分类推荐区域 - 新设计：一行两个游戏 */
.category-section {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.category-tags-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.category-tag-compact {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* 分类游戏卡片 - 一行两个 */
.category-game-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-game-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.category-game-icon-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.category-game-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

/* 游戏名称和开始按钮悬浮层 - 透明悬浮在icon上 */
.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3), transparent);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.overlay-game-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.overlay-play-btn {
    background-color: rgba(255, 107, 107, 0.9);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.overlay-play-btn:hover {
    background-color: rgba(255, 82, 82, 0.95);
    transform: scale(1.05);
}

/* 底部导航栏 */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 4px;
    flex: 1;
    transition: color 0.3s;
}

.nav-item.active {
    color: #ff6b6b;
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 3px;
}

.nav-text {
    font-size: 10px;
}

/* 弹窗样式 - 手机优化 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    display: none;
    padding: 15px;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 300px;
    padding: 20px 15px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

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

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

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

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

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

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

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

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

.auth-switch {
    text-align: center;
    margin-top: 12px;
}

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

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

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

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

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

/* 底部备案信息 */
.footer {
    background-color: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    font-size: 11px;
    margin-bottom: 60px;
}

.copyright {
    line-height: 1.5;
}