/* Daily Learning Challenges - Frontend Styles */

/* Reset and Base Styles */
.dlc-challenge-container,
.dlc-challenges-list {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Challenge Container */
.dlc-challenge-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Challenge Header */
.dlc-challenge-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dlc-challenge-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.dlc-challenge-date {
    color: #666;
    font-weight: 500;
}

.dlc-challenge-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dlc-type-mcq {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dlc-type-scenario {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.dlc-challenge-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

/* Challenge Content */
.dlc-challenge-content {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.dlc-challenge-content p {
    margin-bottom: 15px;
}

.dlc-challenge-content h1,
.dlc-challenge-content h2,
.dlc-challenge-content h3,
.dlc-challenge-content h4 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* MCQ Section */
.dlc-mcq-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.dlc-mcq-options {
    margin-bottom: 25px;
}

.dlc-mcq-option {
    margin-bottom: 12px;
}

.dlc-option-radio {
    display: none;
}

.dlc-option-label {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dlc-option-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.dlc-option-radio:checked + .dlc-option-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dlc-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #e9ecef;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

.dlc-option-radio:checked + .dlc-option-label .dlc-option-letter {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.dlc-option-text {
    flex: 1;
}

/* Submit Button */
.dlc-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dlc-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dlc-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Results Section */
.dlc-results-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
}

.dlc-user-answer {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.dlc-answer-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dlc-answer-label {
    font-weight: 600;
    color: #666;
}

.dlc-answer-text {
    font-weight: 500;
    color: #2c3e50;
}

.dlc-all-answers {
    display: grid;
    gap: 10px;
}

.dlc-answer-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    position: relative;
}

.dlc-answer-option.dlc-correct {
    border-color: #28a745;
    background: #f8fff9;
}

.dlc-answer-option.dlc-user-correct {
    border-color: #28a745;
    background: #d4edda;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.dlc-answer-option.dlc-user-incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.dlc-answer-option.dlc-user-selection {
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.dlc-response-count {
    margin-left: auto;
    margin-right: 10px;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.dlc-answer-option.dlc-correct .dlc-response-count {
    background: #28a745;
}

.dlc-correct-badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.dlc-user-badge {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

/* Scenario Section */
.dlc-scenario-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.dlc-comment-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
}

.dlc-comment-form {
    margin-bottom: 30px;
}

.dlc-comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.dlc-comment-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dlc-comments-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.dlc-comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.dlc-comment {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.dlc-comment:last-child {
    border-bottom: none;
}

.dlc-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dlc-comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.dlc-comment-date {
    font-size: 12px;
    color: #666;
}

.dlc-comment-content {
    color: #555;
    line-height: 1.5;
}

.dlc-comments-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Challenges List */
.dlc-challenges-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dlc-challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dlc-challenge-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dlc-challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dlc-card-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.dlc-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.dlc-card-date {
    color: #666;
}

.dlc-card-type {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dlc-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

.dlc-card-content {
    padding: 15px 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.dlc-card-actions {
    padding: 15px 20px 20px;
}

.dlc-view-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dlc-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.dlc-load-more {
    text-align: center;
    margin-top: 30px;
}

.dlc-load-more-btn {
    display: inline-block;
    background: #f8f9fa;
    color: #667eea;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
}

.dlc-load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.dlc-no-challenges {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dlc-no-challenges h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dlc-challenge-container {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .dlc-challenge-title {
        font-size: 24px;
    }
    
    .dlc-challenge-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dlc-mcq-section,
    .dlc-scenario-section {
        padding: 20px;
    }
    
    .dlc-option-label {
        padding: 12px 15px;
    }
    
    .dlc-option-letter {
        width: 25px;
        height: 25px;
        font-size: 12px;
        margin-right: 12px;
    }
    
    .dlc-challenges-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dlc-challenge-card {
        margin: 0 10px;
    }
    
    .dlc-comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .dlc-challenge-container {
        padding: 10px;
        margin: 5px;
    }
    
    .dlc-challenge-title {
        font-size: 20px;
    }
    
    .dlc-mcq-section,
    .dlc-scenario-section {
        padding: 15px;
    }
    
    .dlc-submit-btn {
        width: 100%;
        padding: 15px;
    }
    
    .dlc-option-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dlc-option-letter {
        margin-right: 0;
    }
}

/* Loading States */
.dlc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dlc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: dlc-spin 1s linear infinite;
}

@keyframes dlc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.dlc-error {
    color: #dc3545;
    background: #fff8f8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin: 15px 0;
} 