/* Modern Scoring System Design */

/* Score Box */
.seo-score-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.seo-score-box h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #2c3e50;
}

.score-text {
    font-weight: 600;
    color: #3498db;
}

.score-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.score-total {
    font-size: 16px;
    color: #95a5a6;
    font-weight: 400;
}

/* Updated Scoring System Styles - Google Docs Implementation */
.score-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.score-max {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.score-percentage {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

.score-grade {
    font-size: 28px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    min-width: 60px;
    text-align: center;
}

.score-grade.grade-aplus, .score-grade.grade-a {
    background: linear-gradient(135deg, #00a32a, #007cba);
    color: white;
}

.score-grade.grade-aminus, .score-grade.grade-bplus, .score-grade.grade-b, .score-grade.grade-bminus {
    background: linear-gradient(135deg, #dba617, #b8860b);
    color: white;
}

.score-grade.grade-cplus, .score-grade.grade-c, .score-grade.grade-cminus {
    background: linear-gradient(135deg, #f56500, #d63031);
    color: white;
}

.score-grade.grade-d, .score-grade.grade-f {
    background: linear-gradient(135deg, #d63638, #a4161a);
    color: white;
}

/* Default grade styling */
.score-grade {
    background: #6c757d;
    color: white;
    transition: all 0.3s ease;
}

.score-description {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

/* Enhanced Scoring Categories */
.scoring-category h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scoring-category h4::after {
    content: attr(data-score);
    font-size: 12px;
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: normal;
}

/* Criterion Score Status Colors */
.criterion-score[data-status="excellent"] {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb;
}

.criterion-score[data-status="good"] {
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7;
}

.criterion-score[data-status="poor"] {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb;
}

/* Debug Controls */
.scoring-debug {
    border: 2px dashed #ccc;
}

.scoring-debug h5 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Progress Bar Enhancements */
.progress-bar-container {
    position: relative;
    background: #e9ecef;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s ease, background-color 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.2) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.2) 75%, 
        transparent 75%, 
        transparent);
    background-size: 20px 20px;
    animation: progress-shine 2s linear infinite;
}

@keyframes progress-shine {
    0% { background-position: -20px 0; }
    100% { background-position: 20px 0; }
}

/* Scoring Categories */
.scoring-category {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scoring-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.scoring-category h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f5;
}

/* Scoring Criteria List */
.scoring-criteria {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scoring-criteria li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
}

.scoring-criteria li:last-child {
    border-bottom: none;
}

.criterion-label {
    color: #495057;
    font-size: 14px;
    flex: 1;
}

.criterion-score {
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: 60px;
    text-align: center;
}

/* Score States */
.criterion-score[data-score="4"] { background-color: #e3fcef; color: #00a32a; }
.criterion-score[data-score="3"] { background-color: #e3f2fd; color: #2271b1; }
.criterion-score[data-score="2"] { background-color: #fff3e0; color: #f57c00; }
.criterion-score[data-score="1"] { background-color: #ffebee; color: #d32f2f; }

/* N/A State */
.criterion-score:contains("N/A") {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Total Score Container */
.total-score-container {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    color: white;
}

.total-score-container h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#total-score-value {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
    display: block;
}

/* Score Text Colors */
.score-text:contains("Perfect") { color: #00a32a; }
.score-text:contains("Excellent") { color: #2271b1; }
.score-text:contains("Good") { color: #f57c00; }
.score-text:contains("Fair") { color: #d32f2f; }
.score-text:contains("Poor") { color: #6c757d; }

/* Responsive Design */
@media screen and (max-width: 782px) {
    .seo-score-box {
        padding: 15px;
    }
    
    .seo-score-box h3 {
        font-size: 20px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .scoring-category {
        padding: 15px;
    }
    
    .criterion-label {
        font-size: 13px;
    }
    
    .criterion-score {
        font-size: 13px;
        min-width: 50px;
    }
}

/* Animation for Score Updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-update {
    animation: scoreUpdate 0.3s ease;
}

/* Progress Bar for Visual Feedback */
.progress-bar-container {
    height: 4px;
    background-color: #f1f3f5;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    transition: width 0.3s ease;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.tooltip i {
    color: #95a5a6;
    font-size: 14px;
    cursor: help;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Loading State */
.loading {
    position: relative;
    opacity: 0.7;
}

.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 #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 