:root{
  --bg:#0b1220;
  --card:#0f1b33;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --primary:#3b82f6;
  --primary2:#2563eb;
  --success:#22c55e;
  --danger:#ef4444;
  --warn:#f59e0b;
  --gray:#64748b;
  --border:rgba(255,255,255,.08);
  --shadow: 0 18px 55px rgba(0,0,0,.35);
  --radius:16px;
  --radius2:12px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 800px at 15% 10%, rgba(59,130,246,.20), transparent 55%),
              radial-gradient(900px 700px at 85% 0%, rgba(34,197,94,.15), transparent 50%),
              var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
a{color:inherit}

.container{max-width:1100px;margin:0 auto;padding:28px 18px}
@media (max-width: 520px){
  .container{padding:18px 12px}
}


.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.55);
  border-bottom: 1px solid var(--border);
}
.topbar__inner{max-width:1100px;margin:0 auto; padding:14px 18px; display:flex; align-items:center; justify-content:space-between; gap:16px}
.brand{display:flex; gap:12px; align-items:center}
.brand__logo{
  width:40px;height:40px;border-radius:12px;
  background: linear-gradient(135deg, rgba(59,130,246,.9), rgba(34,197,94,.8));
  display:flex; align-items:center; justify-content:center; font-weight:800;
  box-shadow: var(--shadow);
}
.brand__title{font-weight:800; letter-spacing:.2px}
.brand__subtitle{color:var(--muted); font-size:12px; margin-top:2px}
.topbar__actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap}

.grid{display:grid; gap:16px}
.grid--2{grid-template-columns:1fr 1fr}
@media (max-width: 860px){.grid--2{grid-template-columns:1fr}}

.card{
  background: rgba(15,27,51,.92);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
@media (max-width: 520px){
  .card{padding:14px}
  .card__title{font-size:17px}
}
.card__title{font-size:18px; font-weight:800; margin:0 0 10px}
.muted{color:var(--muted)}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:11px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition:.15s ease;
  font-weight:700;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.09)}
.btn:active{transform: translateY(0)}
.btn--primary{background: linear-gradient(135deg, var(--primary), var(--primary2)); border-color: rgba(59,130,246,.35)}
.btn--success{background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(16,185,129,.85)); border-color: rgba(34,197,94,.35)}
.btn--danger{background: linear-gradient(135deg, rgba(239,68,68,.95), rgba(220,38,38,.85)); border-color: rgba(239,68,68,.35)}
.btn--ghost{background: transparent}
.btn--sm{padding:8px 10px; border-radius:10px; font-size:13px}
.btn[disabled]{opacity:.55; cursor:not-allowed; transform:none}

.input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
}
textarea{min-height:160px; resize:vertical}
label{display:block; font-weight:800; margin:12px 0 8px}

.alert{
  border:1px solid var(--border);
  border-radius: 14px;
  padding:12px 12px;
  background: rgba(255,255,255,.06);
}
.alert--danger{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10)}
.alert--success{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10)}
.alert--warn{border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.10)}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  border:1px solid var(--border);
  font-weight:800; font-size:13px;
}

.test-top{
  position:sticky; top:70px; z-index:40;
  margin-top:14px;
  background: rgba(11,18,32,.35);
  border:1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  padding:12px 12px;
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
@media (max-width: 520px){
  .test-top{top:62px}
  .pill{font-size:12px}
}

.test-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  margin-top:16px;
  align-items:start;
}
.timer{font-weight:900}
.timer--danger{color: var(--danger)}

.navgrid{
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap:8px;
}
@media (max-width: 980px){.navgrid{grid-template-columns: repeat(8, 1fr)}}
@media (max-width: 680px){.navgrid{grid-template-columns: repeat(5, 1fr)}}
.qbtn{
  padding:10px 0; border-radius: 12px; text-align:center;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-weight:900;
  cursor:pointer;
  user-select:none;
  appearance:none;
  -webkit-appearance:none;
  outline:none;
  color: var(--text);
}
.qbtn:hover{background: rgba(255,255,255,.08)}
.qbtn:active{transform: translateY(0)}
.qbtn--answered{background: rgba(34,197,94,.20); border-color: rgba(34,197,94,.45)}
.qbtn--unanswered{background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.18)}
.qbtn.qbtn--active{background: rgba(59,130,246,.25); border-color: rgba(59,130,246,.55)}

.option{
  display:flex; gap:10px; align-items:flex-start;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  cursor:pointer;
  transition:.12s ease;
}
.option:hover{background: rgba(255,255,255,.08)}
.option input{margin-top:3px}

.review-item{border:1px solid var(--border); border-radius: var(--radius2); padding:14px; background: rgba(255,255,255,.04)}
.review-item--ok{border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.10)}
.review-item--bad{border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08)}

.table{width:100%; border-collapse: collapse; overflow:hidden; border-radius: 14px; border:1px solid var(--border)}
.table th,.table td{padding:12px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.table th{font-size:13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em}
.table tr:hover td{background: rgba(255,255,255,.04)}

.table-wrap{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.table-wrap .table{border:0; border-radius:0}
@media (max-width: 520px){
  .table th,.table td{padding:10px 8px}
  .table th{font-size:12px}
}

.modal{
  position:fixed; inset:0; display:none; place-items:center; z-index:100;
  background: rgba(0,0,0,.55);
}
.modal.is-open{display:grid}
.modal__panel{width:min(520px, 92vw)}

/* Chart canvas: mobil uchun balandlikni ushlab turish */
#chart{width:100%; height:360px}
@media (max-width: 520px){
  #chart{height:300px}
}

