:root{
  --glass: rgba(10,12,15,0.45);
  --glass-2: rgba(6,8,10,0.6);
  --accent: #7efcff;
  --muted: rgba(255,255,255,0.7);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color:white;
  background: #000;
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Background image/video container */
#bg{
  position:fixed;
  inset:0;
  background-size:cover;
  background-position:center;
  filter:brightness(0.55) saturate(1.05);
  transition:background-image .6s ease;
  z-index:0;
}

/* subtle animated stars overlay */
#bg::after{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 3px 3px;
  opacity:0.03;
  pointer-events:none;
}

/* Main UI overlay */
#ui{
  position:relative;
  z-index:2;
  height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:18px;
  gap:12px;
}

/* Header */
#header{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
  align-items:flex-start;
}
.mono{font-family:var(--mono)}
.small{font-size:12px;color:var(--muted)}

/* Panel */
#panel{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px) saturate(1.05);
  padding:12px;
  border-radius:12px;
  width:100%;
  max-height:58vh;
  overflow:auto;
  box-shadow: 0 6px 24px rgba(2,6,23,0.6);
}

#panel-head{
  font-weight:600;
  margin-bottom:8px;
  font-size:14px;
}

/* List */
#list{
  display:flex;
  gap:8px;
  flex-direction:column;
}
.item{
  display:flex;
  justify-content:space-between;
  background:var(--glass-2);
  padding:10px;
  border-radius:10px;
  align-items:center;
  gap:10px;
  min-height:56px;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s;
  border:1px solid rgba(255,255,255,0.03);
}
.item:active{transform:translateY(1px)}
.item:hover{box-shadow:0 6px 18px rgba(0,0,0,0.5)}
.item .meta{display:flex;flex-direction:column;gap:4px}
.name{font-weight:600}
.sub{font-size:12px;color:var(--muted)}

/* Refresh button */
.round-btn{
  width:48px;height:48px;border-radius:999px;border:none;
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color:var(--accent);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

/* Position refresh at bottom-right */
#refresh{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:3;
}

/* Detail bottom sheet */
#detail{
  position:fixed;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  background:linear-gradient(0deg, rgba(0,0,0,0.4), transparent);
  padding:18px;
  z-index:4;
  pointer-events:none;
  transition:opacity .2s ease;
  opacity:0;
}
#detail[aria-hidden="false"]{opacity:1; pointer-events:auto}
#detail-card{
  width:100%;
  max-width:680px;
  background:linear-gradient(180deg, rgba(6,8,10,0.9), rgba(18,20,24,0.96));
  border-radius:14px;
  padding:14px;
  box-shadow:0 24px 60px rgba(0,0,0,0.6);
  position:relative;
  transform:translateY(12px);
}
#close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;height:40px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:transparent;color:var(--muted);border:none;
}
#detail-content{padding-top:12px;font-size:14px;color:var(--muted)}
.kv{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed rgba(255,255,255,0.02)}
.kv b{color:var(--accent)}
/* Responsive tweaks */
@media (min-width:720px){
  #ui{padding:28px}
  #panel{max-height:66vh}
}