:root{
  --bg: #0b1020;
  --card: rgba(255,255,255,0.06);
  --text: #f3f4f6;
  --muted: rgba(255,255,255,0.70);
  --border: rgba(255,255,255,0.10);
  --primary: #7c3aed;
  --primary2: #22c55e;
  --shadow: 0 16px 40px rgba(0,0,0,0.35);
  --radius: 18px;
}

body.light{
  --bg: #f7f7ff;
  --card: rgba(0,0,0,0.04);
  --text: #0b1020;
  --muted: rgba(0,0,0,0.65);
  --border: rgba(0,0,0,0.12);
  --shadow: 0 16px 35px rgba(0,0,0,0.08);
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(124,58,237,0.25), transparent 60%),
              radial-gradient(1200px 600px at 80% 0%, rgba(34,197,94,0.18), transparent 60%),
              var(--bg);
  color: var(--text);
}

.container{
  width:min(1100px, 92vw);
  margin:auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

body.light .site-header{
  background: rgba(247, 247, 255, 0.7);
}

.header-flex{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}

.brand{
  font-weight:800;
  text-decoration:none;
  color:var(--text);
  letter-spacing:0.2px;
  font-size:18px;
}

.nav{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.nav a{
  text-decoration:none;
  color:var(--muted);
  padding:8px 10px;
  border-radius:12px;
  transition: all 0.2s ease;
}

.nav a:hover{
  background: var(--card);
  color: var(--text);
}

.nav a.active{
  background: rgba(124,58,237,0.22);
  color: var(--text);
  border: 1px solid rgba(124,58,237,0.3);
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  outline:none;
}

.btn{
  padding:10px 14px;
  border-radius:14px;
  border:1px solid transparent;
  cursor:pointer;
  transition: all 0.2s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:700;
}

.btn.full{ width:100%; }

.btn-primary{
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color:#fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover{ transform: translateY(-1px); }

.btn-secondary{
  background: rgba(34,197,94,0.18);
  border:1px solid rgba(34,197,94,0.35);
  color: var(--text);
}

.btn-secondary:hover{
  background: rgba(34,197,94,0.26);
}

.btn-ghost{
  background: var(--card);
  border:1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover{
  transform: translateY(-1px);
}

.hero{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap:18px;
  padding: 26px 0;
}

.hero-content h1{
  font-size: clamp(28px, 4vw, 44px);
  line-height:1.15;
  margin:0 0 10px;
}

.muted{ color: var(--muted); }

.hero-buttons{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}

.stats-row{
  display:flex;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

.stat-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:12px 14px;
  min-width: 180px;
}

.stat-number{ font-size:22px; }
.stat-text{ margin-top:6px; color:var(--muted); font-size:14px; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.35s ease;
}

.glass{
  background: linear-gradient(135deg, rgba(124,58,237,0.14), rgba(34,197,94,0.10));
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  margin-top:16px;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
  margin-top:16px;
}

.page{ padding: 22px 0 40px; }
.page-title h1{ margin:0; }
.page-title p{ margin-top:8px; }

.form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.label{
  font-weight:700;
  margin-top:4px;
}

.input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,0.10);
  color: var(--text);
  outline:none;
}

body.light .input{
  background: rgba(255,255,255,0.7);
}

.form-actions{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.actions-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  margin-top:12px;
}

.error{
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.15);
  color: #ffd1d1;
}

.hidden{ display:none !important; }

.report{
  margin-top:18px;
}

.report-header{
  margin-top:16px;
}

.kv{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 0;
  border-bottom:1px dashed var(--border);
}

.kv:last-child{ border-bottom:none; }

.badge{
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,58,237,0.20);
  border:1px solid rgba(124,58,237,0.35);
  font-weight:800;
}

.clickable .badge{
  cursor:pointer;
}

.compatibility{
  font-weight:900;
  font-size:18px;
  margin:0 0 8px;
}

.rich h4{
  margin:10px 0 6px;
}
.rich ul{
  margin:0;
  padding-left:18px;
}
.list{ padding-left:18px; }

.site-footer{
  border-top:1px solid var(--border);
  margin-top: 26px;
  padding:16px 0;
}

.footer-flex{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:50;
}

.modal-card{
  width:min(560px, 94vw);
  background: var(--bg);
  border:1px solid var(--border);
  border-radius: 18px;
  padding:14px;
  box-shadow: var(--shadow);
}

.modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.modal-body{
  margin-top:10px;
  color: var(--muted);
  line-height:1.6;
}

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(6px); }
  to{ opacity:1; transform: translateY(0px); }
}

@media (max-width: 880px){
  .hero{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .form-actions{ flex-direction:column; }
  .actions-row{ grid-template-columns: 1fr; }
}

@media print{
  .site-header, .site-footer, .actions-row, .hero, .nav, #resetBtn{ display:none !important; }
  body{ background: white !important; color:#000 !important; }
  .card{ box-shadow:none !important; }
}
