/* Readability Scorer — Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #F97316; --primary-light: #FB923C;
  --accent: #8B5CF6; --accent-glow: rgba(139,92,246,0.15);
  --success: #10B981; --danger: #EF4444; --warning: #F59E0B;
  --bg: #140A00; --bg-card: rgba(255,255,255,0.04);
  --bg-glass: rgba(255,255,255,0.06); --border: rgba(255,255,255,0.08);
  --text: #E8E8E8; --text-dim: #9CA3AF; --text-muted: #6B7280;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.3); --transition: 250ms ease;
}
html { font-size: 16px; } body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(20,10,0,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header__inner { max-width: 900px; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.header__brand { display: flex; align-items: center; gap: 0.6rem; }
.header__icon { font-size: 1.3rem; } .header__title { font-size: 1.15rem; font-weight: 700; }
.header__actions { display: flex; gap: 0.5rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: none; cursor: pointer; font-family: var(--font); font-size: 0.85rem; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--ghost { background: var(--bg-glass); color: var(--text-dim); padding: 0.5rem 0.85rem; border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn--accent { background: var(--primary); color: #fff; padding: 0.55rem 1.1rem; font-weight: 600; }
.btn--accent:hover { filter: brightness(1.15); transform: translateY(-1px); }

.main { max-width: 900px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.textarea { width: 100%; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: var(--font); font-size: 0.9rem; resize: vertical; transition: border-color var(--transition); }
.textarea:focus { outline: none; border-color: var(--primary); }
.textarea::placeholder { color: var(--text-muted); }
.input-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.input-bar__stats { font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono); }

#results[hidden] { display: none; }

.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
@media (max-width: 700px) { .scores { grid-template-columns: repeat(2, 1fr); } }
.score-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; transition: all var(--transition); animation: fadeIn 300ms ease backwards; }
.score-card:hover { border-color: rgba(255,255,255,0.16); }
.score-card__label { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.score-card__value { font-size: 2rem; font-weight: 700; font-family: var(--mono); }
.score-card__desc { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }
.score--easy { color: var(--success); } .score--medium { color: var(--warning); } .score--hard { color: var(--danger); }

.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding: 0.75rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.stat { font-size: 0.82rem; color: var(--text-dim); } .stat strong { color: var(--text); font-family: var(--mono); }

.section-title { font-size: 0.9rem; font-weight: 600; margin: 1.25rem 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.badge { font-size: 0.7rem; font-weight: 600; background: var(--accent-glow); color: var(--accent); padding: 0.15rem 0.5rem; border-radius: 999px; }

.complex-list { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.complex-word { font-size: 0.78rem; padding: 0.2rem 0.5rem; border-radius: 6px; background: rgba(249,115,22,0.12); color: var(--primary-light); border: 1px solid rgba(249,115,22,0.2); cursor: default; }

.suggestions { display: flex; flex-direction: column; gap: 0.35rem; }
.suggestion { font-size: 0.82rem; color: var(--text-dim); padding: 0.4rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.suggestion strong { color: var(--primary-light); }

.highlighted-text { padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.88rem; line-height: 1.8; white-space: pre-wrap; }
.highlighted-text mark { background: rgba(249,115,22,0.2); color: var(--primary-light); border-radius: 3px; padding: 0 2px; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow); z-index: 500; animation: toastIn 300ms ease; }
.toast[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .main { padding: 1rem; } }
