:root{
  --bg: #0f1115;
  --card: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.14);
  --text: #e8ecf1;
  --muted: #aab3c2;
  --primary: #6aa7ff;
  --primary-2: #5a8ef0;
  --success: #35d49a;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font: 16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, #20304a, transparent 60%) no-repeat fixed,
    radial-gradient(1000px 600px at 110% 10%, #1d374e, transparent 60%) no-repeat fixed,
    var(--bg);
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, scroll;
  background-size: cover, cover, auto;
}

.app{
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.header{
  text-align:center;
  margin: 24px 0 16px;
}
.header h1{
  margin:0 0 8px;
  font-weight:800;
  letter-spacing:0.5px;
}
.sub{color:var(--muted);margin:0}

.card{
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.glass{
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.dropzone{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 220px;
  padding: 28px;
  border: 2px dashed rgba(255,255,255,0.18);
  border-radius: calc(var(--radius) + 4px);
  transition: all .2s ease;
  outline:none;
  cursor:pointer;
}
.dropzone:hover, .dropzone:focus{
  border-color: var(--primary);
  background: rgba(106,167,255,0.08);
}
.dropzone.dragover{
  border-color: var(--success);
  background: rgba(53,212,154,0.08);
}
.dz-inner{text-align:center}
.dz-icon{font-size:40px;margin-bottom:8px;opacity:.9}
.dz-text span{color:var(--muted);margin:0 8px}

.btn{
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(90,142,240,.35);
}
.btn:active{transform:translateY(1px)}
.btn.ghost{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow:none;
}

main{
  display:grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media(min-width: 900px){
  main{grid-template-columns: 3fr 2fr}
}

.file-info, .result, .tips{padding: 18px 20px}
.file-info.hidden, .result.hidden, .preview.hidden{display:none}

.file-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  color:#eaf2ff;
}
.file-row .name{
  max-width: 60%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-weight:600;
}
.file-row .size{color:var(--muted)}

.progress{
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.bar{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, var(--success), #8ceabb);
  transition: width .2s ease;
}

.status{margin-top:8px;color:var(--muted)}

.result-row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items:center;
}
.result-row label{
  grid-column: 1 / -1;
  color:#cfe0ff;
  margin-bottom:6px;
}
.link-wrap{
  display: contents;
}
.link{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  background: rgba(255,255,255,0.06);
  color: #e8ecf1;
  border:1px solid rgba(255,255,255,0.15);
}
.preview{
  margin-top:14px;
  border-radius:12px;
  overflow:hidden;
  background: rgba(0,0,0,0.25);
  border:1px solid rgba(255,255,255,0.08);
  padding: 10px;
}
.preview img, .preview video{
  margin: 0 auto;
  max-width:100%;
  height:auto;
  display:block;
  border-radius:10px;
  outline:1px solid rgba(255,255,255,0.08);
}

.tips h3{margin:6px 0 8px}
.tips ul{margin:0;color:#cfd7e6}

.footer{
  text-align:center;
  color:var(--muted);
  margin-top: 24px;
  font-size: 13px;
}