*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --card: #1a1d27;
  --border: #2a2d3a;
  --accent: #6366f1;
  --accent2: #818cf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* NAV */
nav { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2rem; border-bottom: 1px solid var(--border); }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--accent2); letter-spacing: -0.5px; text-decoration: none; }
.logo span { color: var(--text); }
.nav-lang { display: flex; gap: 0.5rem; }
.nav-lang a { text-decoration: none; padding: 0.1rem; border-radius: 50%; opacity: 0.45; transition: opacity 0.15s, transform 0.15s; display: inline-block; line-height: 0; }
.nav-lang a:hover { opacity: 0.85; transform: scale(1.12); }
.nav-lang a.active { opacity: 1; transform: scale(1.12); }
.nav-lang img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }

/* HERO */
.hero { text-align: center; padding: 5rem 1.5rem 3rem; }
.badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); color: var(--accent2); font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: 99px; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 1rem; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.6; }
.stats { display: flex; gap: 2.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent2); }
.stat span { font-size: 0.8rem; color: var(--muted); }

/* TOOL */
.tool { max-width: 760px; margin: 0 auto; padding: 0 1.5rem 4rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--muted); margin-bottom: 0.5rem; }
textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.9rem; padding: 1rem; resize: vertical; min-height: 220px; transition: border-color 0.2s; outline: none; }
textarea:focus { border-color: var(--accent); }
textarea::placeholder { color: #4a5068; }
.row { display: flex; gap: 1rem; margin-top: 1rem; }
input[type=text] { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.9rem; padding: 0.75rem 1rem; outline: none; transition: border-color 0.2s; }
input[type=text]:focus { border-color: var(--accent); }
input[type=text]::placeholder { color: #4a5068; }
select { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.9rem; padding: 0.75rem 1rem; outline: none; transition: border-color 0.2s; cursor: pointer; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: white; font-family: inherit; font-size: 0.95rem; font-weight: 700; padding: 0.85rem 2rem; border-radius: 10px; border: none; cursor: pointer; transition: opacity 0.2s, transform 0.1s; margin-top: 1.25rem; width: 100%; justify-content: center; }
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { font-size: 0.78rem; color: #4a5068; margin-top: 0.75rem; text-align: center; }

/* RESULTS */
#results { margin-top: 2rem; display: none; }
.score-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.score-circle { width: 90px; height: 90px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; border: 4px solid; }
.score-circle .num { font-size: 1.8rem; line-height: 1; }
.score-circle .lbl { font-size: 0.65rem; color: var(--muted); font-weight: 600; letter-spacing: 0.5px; }
.score-info h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.3rem; }
.score-info p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
@media (max-width: 500px) { .bars { grid-template-columns: 1fr; } }
.bar-item label { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 0.3rem; display: flex; justify-content: space-between; }
.bar-track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; transition: width 1s ease; }
.issues { margin-bottom: 1.5rem; }
.issues h3 { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem; }
.issue-item { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text); }
.issue-item::before { content: "⚠️"; flex-shrink: 0; }
.preview-box { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.25); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.preview-box .tag { font-size: 0.7rem; font-weight: 700; color: var(--accent2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.4rem; }
.preview-box p { font-size: 0.875rem; color: var(--text); line-height: 1.5; }
.rewrites { margin-bottom: 1.5rem; }
.rewrites h3 { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem; }
.rewrite-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; font-size: 0.875rem; line-height: 1.5; }
.rewrite-item .rewrite-before { color: var(--muted); margin-bottom: 0.5rem; }
.rewrite-item .rewrite-before span { color: var(--red); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 0.25rem; }
.rewrite-item .rewrite-after { color: var(--text); }
.rewrite-item .rewrite-after span { color: var(--green); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 0.25rem; }
.upsell { background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(129,140,248,0.08)); border: 1px solid rgba(99,102,241,0.3); border-radius: 12px; padding: 1.5rem; text-align: center; }
.upsell h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.upsell p { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.25rem; line-height: 1.5; }
.upsell ul { text-align: left; display: inline-block; margin-bottom: 1.25rem; }
.upsell ul li { font-size: 0.85rem; color: var(--text); margin-bottom: 0.35rem; list-style: none; padding-left: 0; }
.upsell ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.btn-cta { background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 1rem; }
.price { font-size: 1.5rem; font-weight: 800; color: var(--accent2); margin-bottom: 0.25rem; }
.price span { font-size: 0.85rem; font-weight: 400; color: var(--muted); }

/* HOW IT WORKS */
.how { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.how h2 { text-align: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 2rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.step .icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.step h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.825rem; color: var(--muted); line-height: 1.5; }

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border); color: #4a5068; font-size: 0.8rem; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab { background: none; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-family: inherit; font-size: 0.85rem; font-weight: 600; padding: 0.5rem 1rem; cursor: pointer; transition: all 0.2s; }
.tab.active { background: var(--accent); border-color: var(--accent); color: white; }
.tab:hover:not(.active) { border-color: var(--accent); color: var(--text); }

.upload-area { border: 2px dashed var(--border); border-radius: 12px; padding: 2.5rem; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--accent); background: rgba(99,102,241,0.05); }
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-label { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.upload-hint { font-size: 0.8rem; color: var(--muted); }
.file-status { margin-top: 0.75rem; padding: 0.75rem 1rem; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); border-radius: 8px; font-size: 0.875rem; color: var(--green); }

.color-green { color: var(--green); border-color: var(--green); }
.color-yellow { color: var(--yellow); border-color: var(--yellow); }
.color-red { color: var(--red); border-color: var(--red); }
