/* =======================
   用户等级系统样式
   ======================= */

/* 等级显示 */
.user-level-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-level-badge {
    background: rgba(200, 200, 200, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
}

.user-level {
    font-weight: bold;
    color: #ffd700;
}

.user-title {
    font-size: 12px;
    opacity: 0.9;
    font-style: italic;
}

/* 经验?*/
.user-exp-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.user-exp-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(200, 200, 200, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.user-exp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
    position: relative;
}

.user-exp-bar::after {
    content: attr(data-progress);
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 体力显示 */
.user-energy-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 16px;
    color: white;
    font-size: 13px;
}

.user-energy-icon {
    font-size: 16px;
}

.user-energy {
    font-weight: bold;
}

.user-energy-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(200, 200, 200, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-left: 8px;
}

.user-energy-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.user-energy-bar.energy-high {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.user-energy-bar.energy-medium {
    background: linear-gradient(90deg, #feca57 0%, #ff9ff3 100%);
}

.user-energy-bar.energy-low {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a24 100%);
}

/* 统计信息 */
.user-stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.user-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(200, 200, 200, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(200, 200, 200, 0.2);
}

.user-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #4facfe;
}

.user-stat-label {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* 等级提升对话?*/
.level-up-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.level-up-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.4s ease;
}

.level-up-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 1s infinite;
}

.level-up-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #ffd700;
}

.level-up-content p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

.level-up-rewards {
    background: rgba(200, 200, 200, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.level-up-rewards ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.level-up-rewards li {
    padding: 5px 0;
    font-size: 14px;
}

/* 体力不足对话?*/
.energy-insufficient-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.energy-insufficient-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.energy-insufficient-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.energy-insufficient-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.energy-insufficient-options {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 里程碑对话框 */
.milestone-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.milestone-content {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.milestone-icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toast.toast-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.toast.toast-warning {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.toast.toast-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-secondary {
    background: rgba(200, 200, 200, 0.2);
    color: white;
    border: 1px solid rgba(200, 200, 200, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(200, 200, 200, 0.3);
    transform: translateY(-1px);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 响应式设?*/
@media (max-width: 768px) {
    .level-up-content,
    .energy-insufficient-content,
    .milestone-content {
        margin: 20px;
        padding: 20px;
    }
    
    .user-stats-container {
        grid-template-columns: 1fr;
    }
    
    .energy-insufficient-options {
        flex-direction: column;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
