:root{
  --bg:#0b1220;
  --panel:#0f1a2d;
  --card:#0f1c33;
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --line:rgba(234,240,255,.12);
  --accent:#5b8cff;
  --accent2:#8a5bff;
  --danger:#ff5b6b;
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  background: #123456;
  color:var(--text);
}

a{color:inherit; text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1100px;margin:0 auto;padding:22px}

.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(11,18,32,.7);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px}
.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:38px;height:38px;display:grid;place-items:center;
  border-radius:12px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  font-weight:800;
}
.brand-text{font-weight:700; letter-spacing:.2px}

.nav{display:flex;align-items:center;gap:10px}
.nav-link{
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
}
.nav-link.active,.nav-link:hover{
  background:rgba(234,240,255,.06);
  color:var(--text);
  text-decoration:none;
}

.lang{position:relative}
.lang-btn{
  cursor:pointer;
  border:1px solid var(--line);
  background:rgba(234,240,255,.03);
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  display:flex;align-items:center;gap:8px;
}
.lang-btn .caret{opacity:.8}
.lang-menu{
  position:absolute;
  right:0;
  top:35px;
  min-width:220px;
  max-height:360px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(15,26,45,.98);
  box-shadow:0 20px 50px rgba(0,0,0,.35);
  padding:8px;
  display:none;
}
.lang:hover .lang-menu{display:block}
.lang-item{
  display:block;
  padding:10px 10px;
  border-radius:10px;
  color:var(--muted);
}
.lang-item:hover{
  background:rgba(234,240,255,.06);
  color:var(--text);
  text-decoration:none;
}

.hero{padding:34px 0 10px}
.hero-card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(15,28,51,.85), rgba(15,26,45,.75));
  padding:22px;
}
.hero-title{margin:0 0 8px;font-size:clamp(24px,3vw,38px);letter-spacing:-.6px}
.hero-subtitle{margin:0 0 18px;max-width:850px}

.label{display:block;margin-bottom:8px;color:var(--muted);font-size:14px}
.row{display:flex;gap:10px;align-items:center}
.input{
  flex:1;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(234,240,255,.04);
  color:var(--text);
  outline:none;
}
.input:focus{border-color:rgba(91,140,255,.55); box-shadow:0 0 0 4px rgba(91,140,255,.12)}
.btn{
  padding:12px 16px;
  border-radius:14px;
  border:1px solid rgba(91,140,255,.35);
  background:linear-gradient(135deg,rgba(91,140,255,.95),rgba(138,91,255,.92));
  color:white;
  font-weight:700;
  cursor:pointer;
  min-width:140px;
}
.btn:hover{filter:brightness(1.05)}
.btn.ghost{
  background:transparent;
  border:1px solid var(--line);
  color:var(--text);
}

.small{font-size:13px}
.muted{color:var(--muted)}
.dot{margin:0 6px;opacity:.6}

.progress-wrap{margin-top:14px}
.progress-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.progress{
  height:10px;
  border-radius:999px;
  background:rgba(234,240,255,.07);
  overflow:hidden;
  border:1px solid var(--line);
}
.progress-bar{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  border-radius:999px;
  transition:width .25s ease;
}
.error{
  margin-top:10px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,91,107,.35);
  background:rgba(255,91,107,.12);
  color:#ffd4d9;
}

.result-card{
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px 18px;
  background:rgba(15,28,51,.7);
}
.result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.stat{
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:rgba(234,240,255,.03);
}
.stat-label{color:var(--muted);font-size:13px;margin-bottom:6px}
.stat-value{font-size:22px;font-weight:800;letter-spacing:-.3px}

.section-head{margin-top:34px}
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:12px;
}
.card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:rgba(15,26,45,.65);
}
.h1{font-size:clamp(26px,3vw,40px);margin:0 0 10px}
.h2{font-size:22px;margin:0}
.h3{font-size:18px;margin:0 0 8px}
.link{display:inline-block;margin-top:8px;color:rgba(234,240,255,.9)}

.page-head{padding:18px 0}

.post{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(15,26,45,.65);
  padding:20px;
}
.prose p{line-height:1.8;color:rgba(234,240,255,.9)}
.spacer{height:14px}
.ad{margin:18px 0;border:1px dashed rgba(234,240,255,.18);border-radius:18px;padding:12px}
.ad:before{content:"Ad";display:inline-block;font-size:12px;color:var(--muted);margin-bottom:6px}

.footer{margin-top:40px;border-top:1px solid var(--line);background:rgba(11,18,32,.55)}
.footer-inner{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 22px}

@media (max-width: 900px){
  .grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
  .row{flex-direction:column;align-items:stretch}
  .btn{min-width:auto;width:100%}
  .lang-menu{left:0;right:auto}
}
