/* ============================================
   体育竞猜系统 - 前端样式（移动端H5优化）
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 100%;
    min-height: 100vh;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 首页样式 */
.home-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.username {
    font-size: 16px;
    font-weight: 500;
}

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-login {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.2);
}

.home-content {
    padding: 20px;
}

.home-content h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card-small {
    background: white;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.menu-item {
    background: white;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.menu-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-item.highlight .menu-title {
    color: white;
}

.menu-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.menu-title {
    font-size: 14px;
    font-weight: 500;
}

/* 即将开始的比赛 */
.upcoming-section {
    margin-top: 30px;
}

.upcoming-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #667eea;
}

.match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.match-league {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.team-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.vs {
    font-size: 12px;
    color: #999;
    padding: 0 10px;
}

.match-time {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

.btn-bet {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-bet:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* 登录提示 */
.login-prompt {
    margin-top: 30px;
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.login-prompt p {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.login-prompt .btn {
    display: inline-block;
    padding: 12px 30px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 25px 20px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 5px;
    }
    
    .vs {
        padding: 5px 0;
    }
    
    .btn-bet {
        position: static;
        transform: none;
        margin-top: 10px;
        display: block;
        text-align: center;
    }
    
    .btn-bet:hover {
        transform: scale(1.05);
    }
}
