:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1a2b;
  --panel-soft: #112238;
  --line: rgba(148, 184, 223, 0.16);
  --text: #f5f9ff;
  --muted: #8da3bd;
  --blue: #39a5ff;
  --cyan: #43dfd0;
  --green: #42d392;
  --red: #ff6b78;
  --yellow: #ffc857;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(57, 165, 255, 0.20), transparent 32%),
    radial-gradient(circle at 92% 6%, rgba(67, 223, 208, 0.12), transparent 25%),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.78);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; color: #04101d; font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 8px 28px rgba(57, 165, 255, 0.25);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }

.token-field {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px;
}
.token-field input {
  width: 210px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); background: rgba(255,255,255,.04); outline: none;
}
.token-field input:focus { border-color: var(--blue); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 70px; }

.hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 30px;
}
.eyebrow, .section-label {
  margin: 0 0 8px; color: var(--cyan); font-size: 11px;
  font-weight: 800; letter-spacing: .16em;
}
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.04em; }
.hero p:not(.eyebrow) { max-width: 720px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

.health {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.03); font-size: 12px;
}
.health span, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.health.online span { background: var(--green); box-shadow: 0 0 12px rgba(66,211,146,.65); }
.health.offline span { background: var(--red); }

.upload-card, .panel, .summary-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,34,56,.94), rgba(10,24,41,.96));
  box-shadow: 0 20px 70px rgba(0,0,0,.18);
}
.upload-card { padding: 18px; border-radius: 22px; }
.drop-zone {
  min-height: 260px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px dashed rgba(67,223,208,.42); border-radius: 16px;
  background: linear-gradient(145deg, rgba(57,165,255,.08), rgba(67,223,208,.04));
  cursor: pointer; transition: .18s ease; outline: none;
}
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragging {
  border-color: var(--cyan); background: rgba(67,223,208,.09); transform: translateY(-1px);
}
.upload-icon {
  width: 58px; height: 58px; display: grid; place-items: center;
  margin-bottom: 15px; border-radius: 17px; font-size: 29px; font-weight: 300;
  color: #04101d; background: linear-gradient(135deg, var(--cyan), var(--blue));
}
.drop-zone h2 { margin: 0; font-size: 22px; }
.drop-zone p { margin: 7px 0 14px; color: var(--muted); font-size: 13px; }
.format-tags { display: flex; gap: 7px; }
.format-tags span {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px;
  color: #b8c9db; background: rgba(255,255,255,.04); font-size: 10px; font-weight: 800;
}

.file-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 18px 4px 4px;
}
.file-panel strong, .file-panel small { display: block; }
.file-panel strong { margin: 5px 0; }
.file-panel small { color: var(--muted); }

button {
  border: 0; border-radius: 10px; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, border-color .15s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .38; }
.primary {
  min-width: 150px; height: 46px; padding: 0 20px;
  color: #03101d; background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
}
.secondary {
  height: 34px; padding: 0 14px; border: 1px solid var(--line);
  color: var(--text); background: rgba(255,255,255,.04);
}

.publish-status {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.14);
}
.publish-status .status-dot { margin-top: 5px; flex: 0 0 auto; }
.publish-status strong, .publish-status p { margin: 0; }
.publish-status p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.publish-status.uploading .status-dot { background: var(--blue); animation: pulse 1s infinite alternate; }
.publish-status.success .status-dot { background: var(--green); }
.publish-status.error .status-dot { background: var(--red); }
@keyframes pulse { to { box-shadow: 0 0 0 6px rgba(57,165,255,.16); } }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.summary-card { min-width: 0; padding: 20px; border-radius: 15px; }
.summary-card span, .summary-card small { color: var(--muted); }
.summary-card span { display: block; font-size: 12px; }
.summary-card strong { display: block; margin: 10px 0 5px; font-size: 25px; }
.summary-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 14px; }
.panel { min-width: 0; overflow: hidden; border-radius: 16px; }
.panel-head {
  min-height: 77px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head .section-label { margin-bottom: 5px; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
td:first-child { color: var(--cyan); font-weight: 800; }
.empty { height: 112px; color: var(--muted) !important; text-align: center; font-weight: 400 !important; }

.release-list { display: grid; gap: 9px; padding: 14px; }
.release-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px; align-items: center; padding: 13px;
  border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025);
}
.release-item strong, .release-item small { display: block; }
.release-item small { margin-top: 4px; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-badge { color: var(--green); font-size: 11px; font-weight: 800; }
.rollback {
  padding: 7px 10px; border: 1px solid var(--line);
  color: var(--text); background: rgba(255,255,255,.04); font-size: 11px;
}
.empty-card { padding: 40px 15px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  .topbar { height: auto; align-items: flex-start; padding: 16px 20px; }
  .token-field { align-items: flex-start; flex-direction: column; gap: 5px; }
  .token-field input { width: 160px; }
  main { width: min(100% - 24px, 680px); padding-top: 34px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .summary-grid, .content-grid { grid-template-columns: 1fr; }
  .file-panel { align-items: stretch; flex-direction: column; }
  .primary { width: 100%; }
}
