/* Readability Score Checker - Main Styles */
.rsc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.rsc-header {
    text-align: center;
    margin-bottom: 40px;
}

.rsc-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.rsc-header p {
    color: #7f8c8d;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Input Section */
.rsc-input-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

.rsc-textarea-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.rsc-text-input {
    width: 100%;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.rsc-text-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.rsc-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #7f8c8d;
    border: 1px solid #e1e8ed;
}

/* Button Group */
.rsc-button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rsc-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.rsc-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.rsc-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.rsc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.rsc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.rsc-btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Error Message */
.rsc-error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

/* Results Section */
.rsc-results-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

/* Loading Animation */
.rsc-loading {
    text-align: center;
    padding: 40px;
}

.rsc-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: rsc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes rsc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Score Cards */
.rsc-score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.rsc-score-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e1e8ed;
    transition: transform 0.3s ease;
}

.rsc-score-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.rsc-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rsc-score-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.rsc-score-value {
    font-size: 32px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 6px;
    background: #fff;
    border: 2px solid #e1e8ed;
}

.rsc-score-value.easy {
    color: #27ae60;
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.rsc-score-value.medium {
    color: #f39c12;
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.rsc-score-value.hard {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.rsc-score-explanation {
    color: #7f8c8d;
    line-height: 1.6;
    margin-top: 10px;
    font-size: 15px;
}

/* Difficulty Badge */
.rsc-difficulty-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rsc-difficulty-badge.easy {
    background: #d5f4e6;
    color: #27ae60;
}

.rsc-difficulty-badge.medium {
    background: #fef5e7;
    color: #f39c12;
}

.rsc-difficulty-badge.hard {
    background: #fdeaea;
    color: #e74c3c;
}

/* Metrics Grid */
.rsc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.rsc-metric-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e1e8ed;
}

.rsc-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 8px;
}

.rsc-metric-label {
    color: #7f8c8d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Action Buttons */
.rsc-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 30px;
    border-top: 1px solid #e1e8ed;
}

.rsc-btn-success {
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
}

.rsc-btn-success:hover {
    background: linear-gradient(135deg, #219653, #1e8749);
    transform: translateY(-2px);
}

.rsc-btn-info {
    background: #3498db;
    color: white;
}

.rsc-btn-info:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rsc-container {
        padding: 20px 15px;
    }
    
    .rsc-header h2 {
        font-size: 26px;
    }
    
    .rsc-header p {
        font-size: 16px;
    }
    
    .rsc-input-section {
        padding: 20px;
    }
    
    .rsc-button-group {
        flex-direction: column;
    }
    
    .rsc-btn {
        width: 100%;
    }
    
    .rsc-score-grid {
        grid-template-columns: 1fr;
    }
    
    .rsc-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rsc-action-buttons {
        flex-direction: column;
    }
    
    .rsc-action-buttons .rsc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rsc-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .rsc-score-value {
        font-size: 28px;
    }
}

/* Print Styles */
@media print {
    .rsc-button-group,
    .rsc-action-buttons,
    .rsc-textarea-wrapper {
        display: none;
    }
    
    .rsc-results-section {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

/* Accessibility */
.rsc-btn:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

.rsc-text-input:focus {
    outline: 3px solid rgba(52, 152, 219, 0.3);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .rsc-score-card {
        border: 2px solid #000;
    }
    
    .rsc-btn {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .rsc-btn,
    .rsc-score-card,
    .rsc-spinner {
        transition: none;
        animation: none;
    }
}