:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #101827;
  --muted: #607086;
  --line: #d7dee8;
  --blue: #2563eb;
  --green: #159667;
  --gold: #b98b48;
  --slate: #172033;
  --soft: #f6f8fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  color: #f8fafc;
  background: #121a2a;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #20c997);
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #9aa8bb;
  font-size: 12px;
}

.nav {
  margin: 34px 0;
  display: grid;
  gap: 8px;
}

.nav a {
  color: #aab7ca;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
}

.nav a.active,
.nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.status-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.status-card span,
.status-card p {
  color: #9aa8bb;
}

.status-card strong {
  display: block;
  margin: 8px 0;
  color: #86efac;
}

.main {
  padding: 30px;
  display: grid;
  gap: 20px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 960px;
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) 1.3fr;
  gap: 22px;
  align-items: end;
}

.key-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) 1.3fr;
  gap: 18px;
  align-items: center;
}

.key-stack {
  display: grid;
  gap: 8px;
}

.key-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

.key-status {
  margin: 0;
  font-size: 13px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #344256;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

input[type="file"] {
  padding: 9px;
}

textarea {
  min-height: 260px;
  padding: 12px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
  resize: vertical;
}

button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.primary {
  color: #fff;
  background: var(--blue);
}

.secondary {
  color: #fff;
  background: var(--slate);
}

.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}

.section-head,
.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-item {
  width: 100%;
  height: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  text-align: left;
}

.project-item.active {
  border-color: var(--blue);
  background: #eff6ff;
}

.project-item strong,
.project-item span {
  display: block;
}

.project-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  min-height: 520px;
  display: grid;
  place-content: center;
  text-align: center;
}

.hidden {
  display: none !important;
}

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

.tabs {
  margin: 18px 0;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.tab {
  height: 42px;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: var(--blue);
  background: #eff6ff;
}

.asset-row {
  display: grid;
  grid-template-columns: 48% 1fr;
  gap: 18px;
}

iframe {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.rooms {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.room-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.room-card strong,
.room-card span {
  display: block;
}

.room-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.render-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.render-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.render-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e5e7eb;
}

.render-card strong,
.render-card span {
  display: block;
  padding: 0 12px;
}

.render-card strong {
  padding-top: 12px;
}

.render-card span {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.render-card .bad {
  color: #b42318;
}

.warnings {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.warning {
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  background: #fff7ed;
}

video {
  width: min(420px, 100%);
  max-height: 740px;
  border-radius: 8px;
  background: #000;
}

.hint {
  margin-top: 12px;
}

.vr-view {
  display: grid;
  grid-template-columns: minmax(260px, 440px) 1fr;
  gap: 22px;
  align-items: center;
}

.vr-sphere {
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, transparent 16%),
    conic-gradient(from 45deg, #e7dccd, #b7c8d8, #eadfcf, #c0a98a, #e7dccd);
  box-shadow: inset -35px -45px 70px rgba(15, 23, 42, 0.25), 0 20px 70px rgba(15, 23, 42, 0.18);
}

.logs {
  display: grid;
  gap: 8px;
}

.log-line {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  color: #334155;
  font-size: 13px;
}

.pipeline .steps,
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.steps div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.steps b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.steps span {
  display: block;
  margin: 12px 0 6px;
  font-weight: 800;
}

.steps p {
  margin-bottom: 0;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: #101827;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.share-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.share-hero,
.share-section {
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .shell,
  .layout,
  .upload-panel,
  .key-panel,
  .asset-row,
  .vr-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .upload-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 16px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .key-row {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head,
  .detail-head {
    display: block;
  }

  h1 {
    font-size: 28px;
  }
}
