/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
}

/* 头部样式 */
#header {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #34495e;
}

#header h1 {
    font-size: 24px;
    font-weight: bold;
}

/* 内容区域 */
#content {
    padding: 20px 20px 80px 20px;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 井字棋游戏板样式 */
#game-board {
    width: 300px;
    height: 300px;
    margin: 0 auto 20px;
    display: block;
    border: 2px solid #2c3e50;
}

.cell {
    width: 98px;
    height: 98px;
    border: 1px solid #2c3e50;
    float: left;
    font-size: 48px;
    text-align: center;
    line-height: 98px;
    cursor: pointer;
    background-color: #fff;
}



#game-status {
    text-align: center;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #2c3e50;
}

button {
    display: block;
    margin: 0 auto;
    padding: 10px 30px;
    font-size: 16px;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
}



button:active {
    background-color: #21618c;
}

/* 我的页面样式 */
#my-page h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.profile-section {
    max-width: 400px;
    margin: 0 auto;
}

.profile-item {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
}

.profile-item .label {
    display: inline-block;
    width: 120px;
    color: #666;
}

.profile-item .value {
    color: #2c3e50;
    font-weight: bold;
}

/* 底部导航 */
#nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

.nav-item {
    width: 33%;
    float: left;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    color: #999;
}

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

.nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-icon img {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
}

/* 激活状态的图标添加白色底色 */
.nav-item.active .nav-icon {
    background-color: #fff;
    display: inline-block;
    padding: 2px;
    margin: 0 auto 5px;
}

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

/* 游戏列表页面样式 */
#game-list-page h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.game-grid {
    padding: 10px;
    overflow: hidden;
}

.game-card {
    display: block;
    width: 120px;
    float: left;
    margin: 10px;
    padding: 15px;
    border: 2px solid #ddd;
    cursor: pointer;
    background-color: #fff;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.game-card.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    display: block;
    text-align: center;
}

.game-icon img {
    width: 80px;
    height: 80px;
}

.placeholder-icon {
    font-size: 48px;
    color: #bbb;
}

.game-name {
    font-size: 14px;
    color: #2c3e50;
    text-align: center;
    font-weight: bold;
}

/* 游戏详情页面样式 */
.game-header {
    margin-bottom: 20px;
    position: relative;
}

.back-btn {
    padding: 8px 15px;
    font-size: 14px;
    background-color: #95a5a6;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-right: 15px;
}

.game-header h2 {
    text-align: center;
    margin: 0;
    color: #2c3e50;
}

/* 登录注册样式 */
.auth-section {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.auth-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    overflow: hidden;
}

.auth-tab {
    width: 49%;
    float: left;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    position: relative;
}

.auth-tab.active {
    color: #3498db;
}

.auth-tab.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #3498db;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

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

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

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

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 10px;
    min-height: 20px;
}

.auth-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.auth-button:active {
    background-color: #21618c;
}

.logout-button {
    background-color: #e74c3c;
    margin-top: 30px;
}

.logout-button:active {
    background-color: #c0392b;
}
