#mflash-ai-seo-optimizer-meta-box {
    padding: 10px 0;
}

.mflash-ai-seo-score-display {
    text-align: center;
    margin-bottom: 15px;
}

.mflash-ai-seo-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.mflash-ai-seo-action-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.mflash-ai-seo-action-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3) !important;
}

.mflash-ai-seo-action-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.mflash-ai-seo-action-btn.loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

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

.mflash-ai-seo-action-btn.loading:after {
    content: 'Processing...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 11px;
    white-space: nowrap;
    margin-top: 12px;
}

.mflash-ai-seo-score-meter {
    margin: 10px 0;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #e0e0e0;
    position: relative;
}

.score-circle[data-score="5"], .score-circle[data-score*="4."] {
    border-color: #28a745;
}

.score-circle[data-score*="3."] {
    border-color: #20c997;
}

.score-circle[data-score*="2."] {
    border-color: #ffc107;
}

.score-circle[data-score*="1."] {
    border-color: #fd7e14;
}

.score-circle[data-score*="0."] {
    border-color: #dc3545;
}

.score-value {
    font-size: 16px;
    font-weight: bold;
}

.score-description {
    font-size: 12px;
    color: #666;
}

.mflash-ai-seo-char-count {
    float: right;
    font-size: 11px;
    color: #666;
}

.mflash-ai-seo-char-count.warning {
    color: #fd7e14;
}

.mflash-ai-seo-char-count.error {
    color: #dc3545;
}

.mflash-ai-seo-input {
    margin-bottom: 5px !important;
}

#mflash-ai-seo-optimization-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mflash-ai-seo-success-notification,
.mflash-ai-seo-error-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.mflash-ai-seo-success-notification {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mflash-ai-seo-error-notification {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-icon,
.error-icon {
    font-size: 16px;
    font-weight: bold;
}

.success-icon {
    color: #28a745;
}

.error-icon {
    color: #dc3545;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mflash-ai-seo-changes-highlight {
    margin-top: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px solid #28a745;
    border-radius: 8px;
    animation: slideInDown 0.5s ease-out;
}

.mflash-ai-seo-changes-highlight h4 {
    margin: 0 0 15px 0;
    color: #155724;
    font-size: 16px;
    font-weight: 600;
}

.mflash-ai-seo-changes-highlight ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.mflash-ai-seo-changes-highlight li {
    margin: 8px 0;
    color: #155724;
    line-height: 1.4;
}

.mflash-ai-seo-changes-highlight li strong {
    color: #0d4017;
}

.content-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
}

.content-notice strong {
    color: #533f03;
}

/* Optimization Results Modal Styles */
.mflash-ai-optimization-modal .mflash-ai-seo-modal-content {
    max-width: 900px;
    width: 90%;
}

.mflash-ai-optimization-modal .mflash-ai-seo-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.optimization-summary {
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.optimization-summary h3 {
    margin: 0 0 20px 0;
    color: #155724;
    font-size: 18px;
    font-weight: 600;
}

.score-improvement {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #28a745;
}

.score-before, .score-after {
    text-align: center;
    flex: 1;
}

.score-value {
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}

.score-before .score-value {
    color: #dc3545;
}

.score-after .score-value {
    color: #28a745;
}

.score-arrow {
    font-size: 30px;
    color: #28a745;
}

.changes-list {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #28a745;
}

.changes-list h4 {
    margin: 0 0 15px 0;
    color: #155724;
    font-size: 16px;
}

.changes-list ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.changes-list li {
    margin: 12px 0;
    padding: 10px 15px;
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    line-height: 1.5;
}

.changes-list li strong {
    color: #0d4017;
}

.content-update-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.modal-actions {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-actions .button {
    margin: 0 5px;
    padding: 10px 20px;
    font-size: 14px;
}

.mflash-ai-seo-analysis-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mflash-ai-seo-analysis-item:last-child {
    border-bottom: none;
}

.mflash-ai-seo-analysis-icon {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.mflash-ai-seo-analysis-icon.good {
    color: #28a745;
}

.mflash-ai-seo-analysis-icon.warning {
    color: #ffc107;
}

.mflash-ai-seo-analysis-icon.error {
    color: #dc3545;
}

.mflash-ai-seo-detailed-analysis {
    margin-top: 10px;
}

.mflash-ai-seo-analysis-item {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
}

.mflash-ai-seo-analysis-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.mflash-ai-seo-analysis-header strong {
    flex-grow: 1;
    margin-left: 5px;
}

.mflash-ai-seo-score-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.mflash-ai-seo-score-badge.good {
    background: #28a745;
}

.mflash-ai-seo-score-badge.warning {
    background: #ffc107;
    color: #333;
}

.mflash-ai-seo-analysis-details {
    font-size: 12px;
    line-height: 1.4;
}

.analysis-item {
    margin: 3px 0;
    padding: 2px 0;
}

.analysis-item.passed {
    color: #155724;
}

.analysis-item.issue {
    color: #721c24;
}

/* Modal Styles */
.mflash-ai-seo-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.mflash-ai-seo-modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mflash-ai-seo-modal-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mflash-ai-seo-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: white;
}

.mflash-ai-seo-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.mflash-ai-seo-modal-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.mflash-ai-seo-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Enhanced Analysis Styles for Modal */
.mflash-ai-seo-modal .mflash-ai-seo-detailed-analysis {
    margin-top: 0;
}

.mflash-ai-seo-modal .mflash-ai-seo-analysis-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    transition: box-shadow 0.2s;
}

.mflash-ai-seo-modal .mflash-ai-seo-analysis-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mflash-ai-seo-modal .mflash-ai-seo-analysis-header {
    margin-bottom: 12px;
}

.mflash-ai-seo-modal .mflash-ai-seo-score-badge {
    font-size: 12px;
    padding: 4px 10px;
}

.mflash-ai-seo-modal .analysis-item {
    margin: 5px 0;
    padding: 4px 0;
    font-size: 13px;
}

.mflash-ai-seo-modal .analysis-item.passed {
    background: #d4edda;
    color: #155724;
    padding: 6px 10px;
    border-radius: 4px;
    margin: 4px 0;
}

.mflash-ai-seo-modal .analysis-item.issue {
    background: #f8d7da;
    color: #721c24;
    padding: 6px 10px;
    border-radius: 4px;
    margin: 4px 0;
}
