:root{
  --bg:#0b1220;
  --panel:#0f1b33;
  --muted:#93a4c7;
  --text:#e7eeff;
  --border:rgba(255,255,255,.08);
  --accent:#4aa3ff;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:linear-gradient(180deg, #081023, #060a14);
  color:var(--text);
}

.topbar{
  display:flex;
  gap:16px;
  justify-content:space-between;
  align-items:center;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(15,27,51,.65);
  backdrop-filter: blur(8px);
  position:sticky;
  top:0;
  z-index:10;
}

.brand{display:flex; gap:12px; align-items:center;}
.logo{
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
}
h1{margin:0;font-size:18px}
.brand p{margin:2px 0 0; color:var(--muted); font-size:12px}

.controls{display:flex; gap:10px; align-items:center}
input, select{
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  outline:none;
}
input{min-width:260px}
input::placeholder{color:rgba(231,238,255,.55)}

.layout{
  display:grid;
  grid-template-columns: 380px 1fr;
  gap:14px;
  padding:14px;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr; }
  input{min-width:0; width:100%;}
  .controls{width:100%}
  .topbar{flex-direction:column; align-items:stretch;}
}

.list, .viewer{
  background:rgba(15,27,51,.55);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
}

.list h2, .viewer h2{margin:0 0 10px; font-size:16px}
.cards{display:flex; flex-direction:column; gap:10px}

.card{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  border-radius:16px;
  padding:12px;
  cursor:pointer;
  transition: transform .08s ease, border-color .12s ease;
}
.card:hover{transform: translateY(-1px); border-color: rgba(74,163,255,.35);}
.card .title{font-weight:700; margin:0 0 6px}
.card .desc{margin:0 0 10px; color:var(--muted); font-size:13px; line-height:1.35}
.meta{display:flex; gap:8px; flex-wrap:wrap}
.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:rgba(231,238,255,.9);
  background:rgba(255,255,255,.04);
}

.viewerHead{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}
.viewerHead p{margin:6px 0 0; color:var(--muted); font-size:13px}

.btn{
  display:inline-block;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(74,163,255,.35);
  background: rgba(74,163,255,.12);
  color: var(--text);
  text-decoration:none;
  white-space:nowrap;
}

.frameWrap{
  height: calc(100vh - 220px);
  min-height: 520px;
  border-radius:16px;
  border:1px solid var(--border);
  overflow:hidden;
  background:rgba(0,0,0,.18);
}
iframe{
  width:100%;
  height:100%;
  border:0;
}

.empty{color:var(--muted); padding:10px 4px}
.hidden{display:none}

.hint{
  margin-top:10px;
  color:rgba(231,238,255,.75);
  font-size:12px;
}
code{color:rgba(231,238,255,.95)}
