.seo-input-group { margin-bottom: 15px; }
.seo-input-group label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 14px; }
.seo-input-group input, .seo-input-group textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px; }
.seo-btn { background-color: #0073aa; color: white; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-size: 15px; font-weight: 600; width: 100%; transition: background 0.2s; }
.seo-btn:hover { background-color: #005177; }
#seo-results { margin-top: 20px; padding: 15px; background: #fff; border-left: 4px solid #0073aa; display: none; }
.seo-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
.seo-stat:last-child { border-bottom: none; }
.seo-warn { color: #d63638; font-weight: bold; }
.seo-good { color: #00a32a; font-weight: bold; }
function updateLiveCount(inputId, spanId) {
var val = document.getElementById(inputId).value;
document.getElementById(spanId).innerText = val.length;
}
function updateWordCount() {
var text = document.getElementById('seo-body').value.trim();
var words = text ? text.split(/\s+/).length : 0;
document.getElementById('word-count').innerText = words;
}
function runSEOAnalysis() {
var title = document.getElementById('seo-title').value;
var desc = document.getElementById('seo-desc').value;
var body = document.getElementById('seo-body').value;
var words = body.trim() ? body.trim().split(/\s+/).length : 0;
var resultsDiv = document.getElementById('seo-results');
var feedbackList = document.getElementById('seo-feedback-list');
feedbackList.innerHTML = ";
resultsDiv.style.display = 'block';
// Title Analysis
var titleHtml = '
';
} else {
titleHtml += 'SuboptimalSEO Meta & Content Analyzer
Check your SEO title, description, and content length against industry standards.
Characters: 0 / 60 recommended
Characters: 0 / 160 recommended
Words: 0
Analysis Results
Title Length (' + title.length + ')';
if (title.length >= 40 && title.length <= 60) {
titleHtml += 'Optimal
';
} else if (title.length === 0) {
titleHtml += 'Missing