:root{
  --bg0:#07070a;
  --bg1:#0b0b12;
  --card: rgba(18,18,26,.72);
  --stroke: rgba(255,200,80,.18);
  --text:#f1f1f6;
  --muted: rgba(241,241,246,.68);
  --gold:#ffcc66;
  --gold2:#ffb347;
  --danger:#ff4d4d;
  --ok:#4dffb5;
  --shadow: 0 20px 60px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 600px at 20% 10%, rgba(255,204,102,.08), transparent 55%),
              radial-gradient(900px 500px at 80% 20%, rgba(255,179,71,.06), transparent 60%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none; z-index:-1}
.sun{
  position:absolute;
  width:680px; height:680px;
  left:-220px; top:-260px;
  background: radial-gradient(circle at 40% 40%, rgba(255,204,102,.22), rgba(255,204,102,.08) 40%, transparent 70%);
  filter: blur(0px);
  animation: pulse 4.5s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{transform:scale(1); opacity:.9}
  50%{transform:scale(1.06); opacity:1}
}

.smoke{
  position:absolute;
  width:540px; height:260px;
  border-radius:999px;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,.08), transparent 55%),
              radial-gradient(circle at 70% 50%, rgba(255,204,102,.09), transparent 60%);
  filter: blur(20px);
  opacity:.55;
}
.s1{left:5%; top:18%; animation: drift 10s ease-in-out infinite}
.s2{left:35%; top:8%; width:620px; opacity:.35; animation: drift 12s ease-in-out infinite reverse}
.s3{left:55%; top:22%; width:520px; opacity:.28; animation: drift 14s ease-in-out infinite}
@keyframes drift{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(50px,-18px,0) scale(1.03)}
}

.grain{
  position:absolute; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.22;
}

.top{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 24px;
  max-width:1200px; margin:0 auto;
}
.brand .logo{
  letter-spacing:.22em;
  font-weight:900;
  font-size:22px;
  background: linear-gradient(90deg, #fff, var(--gold));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow: 0 0 18px rgba(255,204,102,.16);
}
.brand .tag{margin-top:6px; font-size:12px; color:var(--muted)}
.pill{
  font-size:12px;
  padding:8px 12px;
  border:1px solid var(--stroke);
  border-radius:999px;
  background: rgba(0,0,0,.25);
  box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset;
}

.wrap{max-width:1200px; margin:0 auto; padding:0 24px 40px}
.card{
  background: var(--card);
  border:1px solid rgba(255,204,102,.14);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:18px;
  backdrop-filter: blur(14px);
}
.card h1{margin:0 0 10px; font-size:18px}
.card h2{margin:0 0 12px; font-size:15px}
.muted{color:var(--muted)}
.gold{color:var(--gold)}
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  margin-top:16px;
}
@media (max-width: 960px){
  .grid{grid-template-columns:1fr}
  .top{flex-direction:column; align-items:flex-start; gap:12px}
}

.uploader{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  border:1px dashed rgba(255,204,102,.28);
  border-radius:16px;
  padding:14px;
  margin-top:14px;
  background: rgba(0,0,0,.18);
}
.uploader.drag{
  border-color: rgba(255,204,102,.55);
  box-shadow: 0 0 0 3px rgba(255,204,102,.08);
}
.u-title{font-weight:700}
.u-sub{font-size:12px; margin-top:6px}
.u-right{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}

.btn{
  cursor:pointer;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  color:var(--text);
  font-weight:700;
  font-size:13px;
  transition: transform .08s ease, border-color .2s ease, background .2s ease, opacity .2s ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(255,204,102,.28)}
.btn:disabled{opacity:.5; cursor:not-allowed; transform:none}
.btn.gold{
  border-color: rgba(255,204,102,.35);
  background: linear-gradient(180deg, rgba(255,204,102,.26), rgba(0,0,0,.18));
}
.btn.danger{
  border-color: rgba(255,77,77,.35);
}
.stats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
  margin-top:12px;
}
.stat{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
}
.stat .k{font-size:12px}
.stat .v{font-size:14px; font-weight:800; margin-top:4px}

.progress{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
  margin-top:12px;
}
.bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(255,204,102,.25), rgba(255,204,102,.75));
  box-shadow: 0 0 18px rgba(255,204,102,.22);
  transition: width .18s ease;
}

.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}

.list{
  max-height:420px;
  overflow:auto;
  padding-right:6px;
}
.row{
  display:grid;
  grid-template-columns: 44px 1fr 90px;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  margin-bottom:10px;
}
.badge{
  font-size:12px;
  font-weight:900;
  text-align:center;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  color:rgba(241,241,246,.85);
}
.badge.ok{border-color: rgba(77,255,181,.35); color: rgba(77,255,181,.92)}
.badge.err{border-color: rgba(255,77,77,.35); color: rgba(255,77,77,.92)}
.badge.wait{border-color: rgba(255,204,102,.25); color: rgba(255,204,102,.9)}
.idx{
  font-weight:900;
  color: rgba(255,204,102,.9);
  text-align:center;
}
.url{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.smallbtn{
  justify-self:end;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
}
.smallbtn:disabled{opacity:.5; cursor:not-allowed}

.out{
  width:100%;
  min-height:420px;
  border-radius:16px;
  border:1px solid rgba(255,204,102,.14);
  background: rgba(0,0,0,.22);
  color: rgba(241,241,246,.92);
  padding:12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12.5px;
  line-height:1.55;
  resize:vertical;
}
.hint{margin-top:10px; font-size:12px}
.foot{max-width:1200px; margin:0 auto; padding:10px 24px 24px; font-size:12px}
