/* 레벨 배지 및 시스템 스타일 */
/* 당근영어 앱 - 레벨 시스템 */

/* 레벨 배지 컨테이너 */
.level-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-badge:hover {
    transform: scale(1.05);
}

.level-badge-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 12px 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
}

/* 레벨 아이콘 */
.level-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.level-emoji {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 레벨 정보 */
.level-info {
    flex: 1;
    min-width: 0;
}

.level-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    min-width: 30px;
    text-align: right;
}

.next-level {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.max-level {
    font-size: 11px;
    color: #ff6b35;
    font-weight: 600;
}

/* 레벨 업 오버레이 */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.level-up-overlay.show {
    opacity: 1;
}

.level-up-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.level-up-overlay.show .level-up-content {
    transform: scale(1);
}

.level-up-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.level-up-icon .level-emoji {
    font-size: 40px;
}

.level-up-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.level-up-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.level-up-reward {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.reward-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.reward-icon {
    font-size: 20px;
}

.level-up-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-up-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 레벨 상세 정보 모달 */
.level-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.level-details-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.level-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.level-details-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* 현재 레벨 정보 */
.current-level-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.level-badge-large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.level-emoji-large {
    font-size: 40px;
}

.current-level-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.current-level-info p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* 레벨 진행률 상세 */
.level-progress-details {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.progress-bar-large {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill-large {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* 레벨 목록 */
.level-list h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.level-item.unlocked {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.level-item.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.02);
}

.level-item.locked {
    background: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
}

.level-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-emoji-small {
    font-size: 20px;
}

.level-item-info {
    flex: 1;
    min-width: 0;
}

.level-item-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-item-exp {
    font-size: 12px;
    opacity: 0.7;
}

.current-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .level-badge {
        top: 15px;
        right: 15px;
    }
    
    .level-badge-container {
        min-width: 160px;
        padding: 10px 12px;
    }
    
    .level-icon {
        width: 40px;
        height: 40px;
    }
    
    .level-emoji {
        font-size: 20px;
    }
    
    .level-name {
        font-size: 12px;
    }
    
    .progress-text {
        font-size: 10px;
    }
    
    .next-level {
        font-size: 10px;
    }
    
    .level-up-content {
        padding: 30px 20px;
    }
    
    .level-up-title {
        font-size: 24px;
    }
    
    .level-up-subtitle {
        font-size: 16px;
    }
    
    .level-details-content {
        padding: 20px;
        margin: 20px;
    }
    
    .level-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .level-badge-container {
        min-width: 140px;
        padding: 8px 10px;
    }
    
    .level-icon {
        width: 35px;
        height: 35px;
    }
    
    .level-emoji {
        font-size: 18px;
    }
    
    .level-name {
        font-size: 11px;
    }
    
    .progress-text {
        font-size: 9px;
    }
    
    .next-level {
        font-size: 9px;
    }
} 