:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1c2130;
  --muted: #6b7280;
  --line: #e5e7ef;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: -1;
}

.bg-glow-one {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -120px;
  background: #c7d2fe;
}

.bg-glow-two {
  width: 360px;
  height: 360px;
  right: -140px;
  top: 180px;
  background: #bbf7d0;
}

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

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

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}

.brand h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card,
.workspace {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  padding: 28px;
}

.card-index {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 10px;
  border-radius: 999px;
}

.card h2,
.workspace h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.field-label {
  display: block;
  margin: 22px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}

.input-row {
  display: flex;
  gap: 10px;
}

.code-input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  outline: none;
  background: #fbfbfe;
}

.code-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.code-input-wide {
  width: 100%;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  width: 100%;
  margin-top: 18px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.32);
}

.btn-secondary {
  width: 100%;
  margin-top: 18px;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.btn-subtle {
  padding: 0 16px;
  flex: 0 0 auto;
  color: #4b5563;
  background: #f3f4f6;
}

.btn-danger {
  color: white;
  background: var(--danger);
  padding: 10px 14px;
  font-size: 14px;
}

.hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status-line {
  min-height: 22px;
  margin: 16px 4px 0;
  font-size: 14px;
  color: var(--muted);
}

.status-line.error {
  color: var(--danger);
  font-weight: 600;
}

.workspace {
  padding: 24px;
}

.room-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.room-main,
.room-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  color: #4b5563;
}

.pill-room {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.pill-room strong {
  font-size: 17px;
  letter-spacing: 3px;
}

.icon-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-waiting {
  background: var(--warning);
}

.dot-online {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.dot-offline {
  background: var(--danger);
}

.status-box {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
}

.status-box.error {
  background: #fef2f2;
  color: var(--danger);
}

.status-box.success {
  background: #f0fdf4;
  color: var(--success);
}

.drop-zone {
  margin-top: 8px;
  padding: 34px 20px;
  border: 2px dashed #c7cbd8;
  border-radius: 16px;
  text-align: center;
  background: #fbfbfe;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.drop-zone h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.drop-zone input[type="file"] {
  display: none;
}

.file-label {
  display: inline-block;
  width: auto;
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 30px 0 12px;
}

.empty-state {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
}

.transfer-list {
  display: grid;
  gap: 12px;
}

.transfer-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

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

.file-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.transfer-meta {
  min-width: 0;
  flex: 1;
}

.transfer-name {
  font-weight: 700;
  word-break: break-all;
}

.transfer-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.transfer-action {
  flex: 0 0 auto;
}

.mini-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
}

.mini-btn.primary {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.mini-btn.danger {
  color: var(--danger);
}

.progress-track {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: #eef0f5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  transition: width 0.12s linear;
}

.progress-fill.done {
  background: var(--success);
}

.progress-fill.failed {
  background: var(--danger);
}

.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 32px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-dot {
  opacity: 0.6;
}

@media (max-width: 760px) {
  .hero {
    padding-top: 32px;
  }

  .setup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .workspace {
    min-width: 0;
  }

  .room-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .card {
    padding: 22px;
  }

  .workspace {
    padding: 18px;
  }
}
