
:root { --primary: #4f46e5; --primary-hover: #4338ca; --bg: #f8fafc; --surface: #ffffff; --text: #0f172a; --text-muted: #64748b; --border: #e2e8f0; --error: #ef4444; --warning: #f59e0b; --success: #10b981; --radius: 12px; --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --font: 'Inter', system-ui, sans-serif; --transition: all 0.3s ease; }
[data-theme="dark"] { --primary: #6366f1; --primary-hover: #818cf8; --bg: #0f172a; --surface: #1e293b; --text: #f8fafc; --text-muted: #94a3b8; --border: #334155; --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5); }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; transition: background 0.3s, color 0.3s; scroll-behavior: smooth; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; transition: var(--transition); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text); letter-spacing: -0.5px; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.btn { background: var(--primary); color: #fff !important; padding: 12px 24px; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; transition: var(--transition); text-align: center; }
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text) !important; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary) !important; background: transparent; }
.mobile-menu { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text); cursor: pointer; }
.theme-toggle { background: var(--bg); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: var(--transition); color: var(--text); }
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

.hero { padding: 100px 0; text-align: center; background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%); }
.hero-badge { display: inline-block; padding: 6px 12px; background: rgba(79, 70, 229, 0.1); color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 24px; }
.hero h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

.section { padding: 100px 0; }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.section-desc { text-align: center; color: var(--text-muted); max-width: 600px; margin: 0 auto 48px; font-size: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 48px; }

.card { background: var(--surface); padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); transition: var(--transition); box-shadow: var(--shadow); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.card-icon { width: 48px; height: 48px; background: rgba(79, 70, 229, 0.1); color: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.checker-layout { display: flex; gap: 32px; margin: 24px 0; align-items: flex-start; }
.editor-main { flex: 1; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.editor-sidebar { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.toolbar { display: flex; gap: 12px; background: var(--bg); padding: 16px; border-bottom: 1px solid var(--border); }
textarea { width: 100%; height: 600px; padding: 32px; border: none; background: var(--surface); color: var(--text); font-family: inherit; font-size: 1.15rem; resize: vertical; outline: none; line-height: 1.8; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-header { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

.score-wrapper { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.score-circle { width: 80px; height: 80px; border-radius: 50%; border: 6px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; color: var(--success); transition: var(--transition); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-box { background: var(--bg); padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border); }
.stat-val { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.stat-lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-top: 4px; }

.issue-list { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding-right: 8px; }
.issue { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--error); padding: 16px; border-radius: 8px; transition: var(--transition); }
.issue:hover { border-color: var(--primary); }
.issue.warning { border-left-color: var(--warning); }
.issue.style { border-left-color: var(--primary); }
.issue-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.issue-type { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.issue-msg { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.issue-action { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.issue-orig { text-decoration: line-through; color: var(--error); font-size: 0.9rem; }
.issue-sugg { color: var(--success); font-weight: 600; cursor: pointer; padding: 4px 12px; background: rgba(16,185,129,0.1); border-radius: 6px; font-size: 0.9rem; transition: var(--transition); border: 1px solid rgba(16,185,129,0.2); }
.issue-sugg:hover { background: var(--success); color: #fff; }
.no-issues { text-align: center; padding: 32px; color: var(--text-muted); }
.no-issues-icon { font-size: 3rem; margin-bottom: 16px; color: var(--success); }

.prose { max-width: 800px; margin: 0 auto; }
.prose h1 { font-size: 3rem; font-weight: 800; margin-bottom: 24px; line-height: 1.2; letter-spacing: -1px; }
.prose h2 { font-size: 2rem; font-weight: 700; margin: 48px 0 20px; }
.prose h3 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; }
.prose p { margin-bottom: 20px; font-size: 1.1rem; color: var(--text); }
.prose ul, .prose ol { margin-bottom: 24px; padding-left: 24px; font-size: 1.1rem; }
.prose li { margin-bottom: 8px; }
.blog-meta { display: flex; gap: 16px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .card-content { flex: 1; }
.article-card .read-more { margin-top: auto; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.article-card .read-more:hover { gap: 8px; }

.faq-list { display: flex; flex-direction: column; gap: 16px; max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q { font-weight: 600; font-size: 1.1rem; padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); background: var(--surface); }
.faq-q:hover { color: var(--primary); }
.faq-icon { transition: transform 0.3s; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: all 0.3s ease; color: var(--text-muted); line-height: 1.6; }
.faq-item.active .faq-a { padding: 0 24px 24px; max-height: 500px; }

footer { background: var(--surface); padding: 80px 0 32px; border-top: 1px solid var(--border); margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-brand p { color: var(--text-muted); margin: 16px 0 24px; font-size: 0.95rem; }
.social-links { display: flex; gap: 16px; }
.social-links a { width: 36px; height: 36px; background: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: var(--transition); border: 1px solid var(--border); }
.social-links a:hover { color: var(--primary); border-color: var(--primary); }
.footer-heading { font-weight: 700; margin-bottom: 20px; font-size: 1.1rem; color: var(--text); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--text-muted); font-size: 0.95rem; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-bottom { text-align: center; color: var(--text-muted); padding-top: 32px; border-top: 1px solid var(--border); font-size: 0.9rem; }

.badge { display: inline-block; padding: 4px 8px; background: rgba(16,185,129,0.1); color: var(--success); border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }

@media (max-width: 1024px) {
  .checker-layout { flex-direction: column; }
  .editor-sidebar { width: 100%; position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; width: 100%; background: var(--surface); flex-direction: column; padding: 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-links.show { display: flex; }
  .mobile-menu { display: block; }
  .hero h1 { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Accessibility & Focus Indicators */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input:focus, textarea:focus, button:focus {
  outline: none;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
