/**
 * 游戏数据管理样式
 */

/* 消息提示样式 */
.game-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 300px;
    max-width: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

.game-message-yellow {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 2px solid #ffd54f;
    color: #5d4037;
}

.game-message-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.game-message-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.game-message-close {
    background: none;
    border: none;
    color: #5d4037;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.game-message-close:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 登录界面样式 - 简化版 */
.game-login-ui {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    animation: slideInLeft 0.5s ease-out;
}

.game-login-ui .login-header {
    position: relative;
}

.game-login-ui #loginDetails {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    padding: 16px;
}

.login-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.login-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #ff6f61;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-nickname {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.user-status {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.logout-btn, .guest-login-btn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.guest-login-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-bottom: 12px;
}

.guest-login-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.logout-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.logout-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.login-prompt {
    text-align: center;
}

.login-prompt p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.login-note {
    font-size: 11px !important;
    color: #999 !important;
    margin-top: 8px !important;
    font-style: italic;
}

/* 游戏数据统计增强样式 */
.stats-enhanced {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.stat-card {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.stat-card:not(:last-child) {
    border-right: 1px solid #e0e0e0;
}

.stat-value-large {
    font-size: 24px;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.stat-label-large {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 排行榜样式 */
.leaderboard-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.leaderboard-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.leaderboard-item:hover {
    background: #f9f9f9;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank-badge {
    width: 30px;
    height: 30px;
    background: #ff6f61;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #ff6f61;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-small {
    flex: 1;
}

.user-nickname-small {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.user-score {
    font-size: 12px;
    color: #666;
}

.view-leaderboard-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.view-leaderboard-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-login-ui {
        top: 10px;
        right: 10px;
        min-width: 220px;
    }
    
    .stats-enhanced {
        flex-direction: column;
    }
    
    .stat-card:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
}