/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* 首页样式 */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 游戏卡片 */
.game-selection {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.game-card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
}

.game-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #ff3838;
}

/* 页脚 */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .game-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .game-card {
        padding: 25px;
    }
    
    .game-icon {
        font-size: 3rem;
    }
    
    .game-card h2 {
        font-size: 1.5rem;
    }
    
    .page-container {
        padding: 20px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* 游戏页面通用样式 */
.page-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 0 auto;
}

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

.page-title {
    font-size: 2rem;
    color: #667eea;
}

.back-btn {
    background: #f1f2f6;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #dfe4ea;
}

/* 输入框样式 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe4ea;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 卡片样式 */
.card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #667eea;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}
