/* Sleep Quality Scorer Specific Styles */

/* Quality Score Display */
.quality-score {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

.score-header {
    text-align: center;
    margin-bottom: 20px;
}

.score-title {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 8px;
}

.score-subtitle {
    font-size: 14px;
    color: #064e3b;
}

.score-display {
    text-align: center;
    margin: 24px 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 16px;
    position: relative;
    background: conic-gradient(
        var(--score-color, #10b981) 0deg var(--score-angle, 0deg),
        #e2e8f0 var(--score-angle, 0deg) 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
}

.score-value {
    position: relative;
    z-index: 2;
    font-size: 36px;
    font-weight: 700;
    color: var(--score-color, #10b981);
}

.score-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.score-description {
    font-size: 14px;
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Score Breakdown */
.score-breakdown {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.breakdown-item {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.breakdown-item:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.breakdown-item.excellent {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.breakdown-item.good {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.breakdown-item.fair {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.breakdown-item.poor {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.breakdown-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.breakdown-score {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.breakdown-item.excellent .breakdown-score {
    background: #dcfce7;
    color: #059669;
}

.breakdown-item.good .breakdown-score {
    background: #dbeafe;
    color: #1d4ed8;
}

.breakdown-item.fair .breakdown-score {
    background: #fef3c7;
    color: #d97706;
}

.breakdown-item.poor .breakdown-score {
    background: #fee2e2;
    color: #dc2626;
}

.breakdown-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: #64748b;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Improvement Recommendations */
.improvement-recommendations {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #93c5fd;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.recommendation-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.recommendation-item.critical {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.recommendation-item.important {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.recommendation-item.helpful {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.recommendation-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.recommendation-item.critical .recommendation-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.recommendation-item.important .recommendation-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.recommendation-item.helpful .recommendation-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.recommendation-item .recommendation-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.recommendation-content {
    flex: 1;
}

.recommendation-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.recommendation-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Score Ranges Sidebar */
.score-ranges {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.range-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.range-item.excellent {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #10b981;
}

.range-item.good {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #3b82f6;
}

.range-item.fair {
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
    border-color: #f59e0b;
}

.range-item.poor {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #ef4444;
}

.range-score {
    font-size: 14px;
    font-weight: 600;
}

.range-item.excellent .range-score {
    color: #059669;
}

.range-item.good .range-score {
    color: #1d4ed8;
}

.range-item.fair .range-score {
    color: #d97706;
}

.range-item.poor .range-score {
    color: #dc2626;
}

.range-label {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
}

.range-item.excellent .range-label {
    background: #dcfce7;
    color: #059669;
}

.range-item.good .range-label {
    background: #dbeafe;
    color: #1d4ed8;
}

.range-item.fair .range-label {
    background: #fef3c7;
    color: #d97706;
}

.range-item.poor .range-label {
    background: #fee2e2;
    color: #dc2626;
}

/* Disruptor List */
.disruptor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.disruptor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.disruptor-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.disruptor-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.disruptor-impact {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .breakdown-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-circle::before {
        width: 90px;
        height: 90px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .quality-score {
        padding: 20px;
    }
    
    .score-breakdown {
        padding: 20px;
    }
    
    .improvement-recommendations {
        padding: 20px;
    }
    
    .breakdown-item {
        padding: 16px;
    }
    
    .recommendation-item {
        padding: 16px;
    }
    
    .recommendation-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-circle::before {
        width: 75px;
        height: 75px;
    }
    
    .score-value {
        font-size: 24px;
    }
    
    .quality-score {
        padding: 16px;
    }
    
    .score-breakdown {
        padding: 16px;
    }
    
    .improvement-recommendations {
        padding: 16px;
    }
    
    .breakdown-item {
        padding: 12px;
    }
    
    .recommendation-item {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .recommendation-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 0 auto;
    }
    
    .range-item {
        padding: 10px;
    }
    
    .disruptor-item {
        padding: 10px;
    }
}
