*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #dbeafe, #e2e8f0);
  color:#0f172a;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background-image: var(--bg-url, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.04);
  filter: brightness(.92) saturate(1.05);
  opacity:0;
  transition: opacity 1s ease;
}
body.bg-ready::before{
  opacity:1;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px 800px at 0% 0%, rgba(56,189,248,.14), transparent 58%),
    radial-gradient(1200px 900px at 100% 100%, rgba(59,130,246,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(248,250,252,.68));
}
#app{
  min-height:100svh;
}
.shell{
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:18px;
}
.card{
  width:min(100%, 560px);
  border:1px solid rgba(255,255,255,.85);
  box-shadow: 0 24px 60px rgba(15,23,42,.20);
  background: rgba(255,255,255,.66);
  backdrop-filter: blur(22px) saturate(140%);
}
.file-item{
  transition: none;
  backdrop-filter: blur(12px);
}
.file-item:hover{
  transform: none;
  border-color: inherit;
  box-shadow: none;
}
.download-btn{
  transition: filter .2s ease, transform .2s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:84px;
}
.download-btn:hover{
  filter: brightness(1.04);
}
.download-btn:active{
  transform: translateY(1px);
}
.download-btn.is-disabled,
.download-btn.is-disabled:hover,
.download-btn.is-disabled:active{
  transition:none;
  filter:none;
  transform:none;
  cursor:not-allowed;
}
.download-btn.done-success,
.download-btn.done-fail{
  padding-left:14px;
  padding-right:14px;
}
.download-btn.done-success{
  background:rgba(22,163,74,.92)!important;
  border-color:rgba(21,128,61,.9)!important;
  color:#fff!important;
}
.download-btn.done-fail{
  background:rgba(220,38,38,.92)!important;
  border-color:rgba(185,28,28,.9)!important;
  color:#fff!important;
}
.result-icon{
  width:20px;
  height:20px;
  display:block;
}
.result-icon .icon-path{
  fill:none;
  stroke:currentColor;
  stroke-width:2.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:30;
  stroke-dashoffset:30;
  animation: draw-check .5s linear forwards;
}
.result-icon .icon-path-b{
  animation-delay:.15s;
}
@keyframes draw-check{
  from{stroke-dashoffset:30}
  to{stroke-dashoffset:0}
}
.history-modal{
  position:fixed;
  inset:0;
  z-index:40;
  display:none;
}
.history-modal.open{
  display:block;
}
.history-mask{
  position:absolute;
  inset:0;
  background: rgba(15,23,42,.3);
  backdrop-filter: blur(2px);
}
.history-panel{
  position:relative;
  width:min(92vw, 620px);
  margin: 8vh auto 0;
  border:1px solid rgba(255,255,255,.88);
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(22px) saturate(145%);
  box-shadow: 0 24px 56px rgba(15,23,42,.22);
  padding:16px;
}
.search-input{
  width:100%;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.5);
  background: rgba(255,255,255,.85);
  padding:0 12px;
  color:#0f172a;
  font: inherit;
}
.search-input:focus{
  outline:none;
  border-color: rgba(2,132,199,.68);
  box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}
.history-list{
  max-height:52vh;
  overflow:auto;
  display:grid;
  gap:10px;
}
.close-btn{
  width:32px;
  height:32px;
  border-radius:9px;
  border:1px solid rgba(148,163,184,.5);
  background: rgba(255,255,255,.75);
  color:#0f172a;
  cursor:pointer;
  font-size:20px;
  line-height:1;
}
.history-btn{
  transition: background-color .2s ease, border-color .2s ease;
}
.history-btn:hover{
  background: rgba(241,245,249,.92);
  border-color: rgba(203,213,225,1);
}
