:root {
  --bg-top: #f4f0ee;
  --bg-bottom: #efe8e2;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(255, 255, 255, 0.74);
  --text-strong: #202127;
  --text-body: #5c606c;
  --text-soft: #83889a;
  --accent: #57c870;
  --accent-deep: #3fa85a;
  --accent-soft: rgba(87, 200, 112, 0.15);
  --panel-border: rgba(130, 140, 167, 0.18);
  --input-bg: rgba(255, 255, 255, 0.92);
  --code-bg: #191c22;
  --code-text: #edf1ff;
  --shadow-lg: 0 28px 80px rgba(112, 94, 76, 0.17);
  --shadow-md: 0 18px 44px rgba(84, 94, 120, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 34%),
    radial-gradient(circle at top right, rgba(180, 214, 255, 0.2), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(10px);
}

body::before {
  top: 56px;
  right: 8vw;
  width: 280px;
  height: 280px;
  background: rgba(255, 206, 178, 0.3);
}

body::after {
  bottom: 40px;
  left: 8vw;
  width: 240px;
  height: 240px;
  background: rgba(151, 219, 174, 0.18);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 48px 20px;
}

.card {
  padding: 42px;
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.subtitle {
  width: min(100%, 620px);
  margin: 18px auto 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-body);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(134, 148, 175, 0.18);
  color: var(--text-body);
  font-size: 0.92rem;
}

.dropzone,
.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-md);
}

.dropzone {
  padding: 34px 28px;
  margin-bottom: 18px;
  border: 2px solid rgba(87, 200, 112, 0.85);
  background:
    linear-gradient(180deg, rgba(248, 255, 249, 0.86), rgba(255, 255, 255, 0.88)),
    rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 22px;
  place-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragging {
  transform: translateY(-2px);
  box-shadow: 0 26px 44px rgba(87, 200, 112, 0.14);
  outline: none;
}

.dropzone.is-dragging {
  border-color: var(--accent-deep);
  background:
    linear-gradient(180deg, rgba(235, 255, 238, 0.96), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.82);
}

.drop-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.drop-icon svg {
  width: 100%;
  height: 100%;
}

.drop-content h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.drop-help {
  margin: 12px auto 0;
  max-width: 560px;
  color: var(--text-body);
  line-height: 1.7;
}

.drop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.panel {
  padding: 22px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.status-idle {
  background: rgba(142, 148, 165, 0.14);
  color: var(--text-body);
}

.status-ready {
  background: var(--accent-soft);
  color: #25703b;
}

.status-error {
  background: rgba(232, 108, 94, 0.12);
  color: #b13e33;
}

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

.field + .field {
  margin-top: 16px;
}

.field span {
  font-weight: 700;
  font-size: 0.96rem;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(134, 148, 175, 0.26);
  background: var(--input-bg);
  font: inherit;
  font-size: 1rem;
  color: var(--text-strong);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(87, 200, 112, 0.85);
  box-shadow: 0 0 0 4px rgba(87, 200, 112, 0.12);
}

.field small,
.command-tip {
  color: var(--text-soft);
  line-height: 1.6;
}

.detected-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(87, 200, 112, 0.08);
}

.detected-label {
  color: #4a8d5c;
  font-weight: 600;
}

#detectedName {
  font-size: 1.06rem;
}

.command-output {
  margin: 0;
  padding: 20px;
  border-radius: 20px;
  background: var(--code-bg);
  color: var(--code-text);
  overflow-x: auto;
  font-family: "SF Mono", "JetBrains Mono", "Menlo", monospace;
  font-size: 0.98rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

.button {
  appearance: none;
  border: none;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.button:focus-visible {
  outline: 2px solid rgba(87, 200, 112, 0.42);
  outline-offset: 2px;
}

.button-primary {
  background: linear-gradient(135deg, #4cc466, #339e50);
  color: white;
  box-shadow: 0 14px 24px rgba(67, 164, 92, 0.24);
}

.button-secondary {
  background: rgba(33, 38, 50, 0.92);
  color: white;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.84);
  color: var(--text-body);
  border: 1px solid rgba(134, 148, 175, 0.18);
}

@media (max-width: 760px) {
  .shell {
    padding: 18px;
  }

  .card {
    padding: 22px;
    border-radius: 28px;
  }

  .dropzone {
    padding: 26px 18px;
  }

  .panel,
  .panel-header,
  .detected-box {
    gap: 12px;
  }

  .panel-header,
  .detected-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .button,
  .panel-header .button {
    width: 100%;
  }

  .drop-actions {
    width: 100%;
  }

  .drop-actions .button {
    width: 100%;
  }
}