/* 도전과제 시스템 스타일 */
/* 당근영어 앱 - 일일 도전과제 시스템 */

/* 도전과제 버튼 */
.challenge-button {
    position: absolute;
    top: 20px;
    left: 80px;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.challenge-button:hover {
    transform: scale(1.05);
}

.challenge-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.challenge-icon i {
    color: white;
    font-size: 20px;
}

.challenge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid white;
}

.challenge-text {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* 도전과제 모달 */
.challenge-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;
}

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

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

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

.challenge-date {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* 도전과제 진행률 요약 */
.challenge-progress {
    margin-bottom: 25px;
}

.progress-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.progress-summary .progress-text {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.progress-summary .progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-summary .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-summary .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;
}

/* 도전과제 목록 */
.challenge-list {
    margin-bottom: 25px;
}

.challenge-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.challenge-item.completed {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.challenge-item.completed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    opacity: 1;
}

.challenge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.challenge-item .challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
}

.challenge-title h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.challenge-title p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.challenge-complete {
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* 도전과제 진행률 */
.challenge-item .challenge-progress {
    margin-bottom: 15px;
}

.challenge-item .progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.challenge-item .progress-text {
    font-weight: 600;
    color: #007bff;
}

.challenge-item .progress-percentage {
    font-weight: 600;
    color: #28a745;
}

.challenge-item .progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.challenge-item .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #6610f2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.challenge-item.completed .progress-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

/* 도전과제 보상 */
.challenge-reward {
    background: rgba(40, 167, 69, 0.1);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.challenge-reward .reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.challenge-reward .reward-item:last-child {
    margin-bottom: 0;
}

.challenge-reward .reward-icon {
    font-size: 16px;
}

.challenge-reward .reward-text {
    color: #28a745;
}

.challenge-reward-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.challenge-reward-preview-text {
    font-weight: 600;
    color: #333;
}

.challenge-reward-preview-items {
    display: flex;
    gap: 10px;
}

.challenge-reward-preview-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-weight: 600;
}

/* 도전과제 푸터 */
.challenge-footer {
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.challenge-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.challenge-info p {
    margin: 0 0 8px 0;
}

.challenge-info p:last-child {
    margin-bottom: 0;
}

/* 도전과제 완료 알림 */
.challenge-complete-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    animation: slideInRight 0.5s ease;
}

.challenge-complete-content {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 280px;
}

.challenge-complete-icon {
    font-size: 30px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.challenge-complete-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
}

.challenge-complete-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
}

.challenge-rewards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.challenge-rewards .reward-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* 일일 갱신 알림 */
.daily-reset-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    animation: slideInDown 0.5s ease;
}

.daily-reset-content {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 300px;
}

.reset-icon {
    font-size: 30px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.reset-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 700;
}

.reset-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .challenge-button {
        top: 15px;
        left: 70px;
    }
    
    .challenge-icon {
        width: 45px;
        height: 45px;
    }
    
    .challenge-icon i {
        font-size: 18px;
    }
    
    .challenge-count {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
    
    .challenge-text {
        font-size: 10px;
    }
    
    .challenge-content {
        padding: 20px;
        margin: 20px;
    }
    
    .challenge-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .challenge-date {
        position: static;
        transform: none;
        align-self: center;
    }
    
    .challenge-item {
        padding: 15px;
    }
    
    .challenge-item .challenge-header {
        flex-direction: column;
        gap: 10px;
        text-align: left;
    }
    
    .challenge-complete {
        align-self: flex-start;
    }
    
    .challenge-reward-preview {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .challenge-reward-preview-items {
        flex-wrap: wrap;
    }
    
    .challenge-complete-notification {
        top: 80px;
        right: 15px;
    }
    
    .challenge-complete-content {
        min-width: 250px;
        padding: 15px;
    }
    
    .daily-reset-notification {
        top: 15px;
    }
    
    .daily-reset-content {
        min-width: 280px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .challenge-button {
        left: 65px;
    }
    
    .challenge-icon {
        width: 40px;
        height: 40px;
    }
    
    .challenge-icon i {
        font-size: 16px;
    }
    
    .challenge-count {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    .challenge-text {
        font-size: 9px;
    }
    
    .challenge-content {
        padding: 15px;
        margin: 15px;
    }
    
    .challenge-header h2 {
        font-size: 20px;
    }
    
    .challenge-date {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .challenge-item {
        padding: 12px;
    }
    
    .challenge-title h4 {
        font-size: 14px;
    }
    
    .challenge-title p {
        font-size: 12px;
    }
    
    .challenge-complete {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .challenge-reward {
        padding: 12px;
    }
    
    .challenge-reward .reward-item {
        font-size: 12px;
    }
    
    .challenge-reward-preview {
        font-size: 11px;
    }
    
    .challenge-reward-preview-item {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .challenge-complete-content {
        min-width: 220px;
        padding: 12px;
    }
    
    .challenge-complete-text h4 {
        font-size: 14px;
    }
    
    .challenge-complete-text p {
        font-size: 12px;
    }
    
    .challenge-rewards .reward-item {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .daily-reset-content {
        min-width: 260px;
        padding: 12px;
    }
    
    .reset-text h4 {
        font-size: 14px;
    }
    
    .reset-text p {
        font-size: 12px;
    }
} 