:root {
  --bg: #0c0b0a;
  --surface: #161412;
  --panel: #1c1916;
  --ink: #f3eee4;
  --muted: rgba(243, 238, 228, 0.58);
  --line: rgba(212, 175, 55, 0.18);
  --gold: #d4af37;
  --gold-deep: #b8922a;
  --gold-soft: rgba(212, 175, 55, 0.16);
  --input: #0f0e0c;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
.btn-primary {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
}

.install-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(212, 175, 55, 0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(184, 146, 42, 0.08), transparent 55%),
    linear-gradient(180deg, #12100e 0%, #0a0908 100%);
}

.install-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, #1a1714 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px 36px 32px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  animation: rise 0.55s ease both;
}

.install-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto 26px;
}

.brand-logo {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.65);
  background: #fff;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.08), 0 12px 32px rgba(0, 0, 0, 0.35);
}

.brand-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-mark {
  margin: 18px 0 8px;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--gold);
}

.install-brand h1 {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 30px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #fff;
}

.brand-sub {
  margin: 10px 0 0;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.step-bar {
  list-style: none;
  margin: 0 0 22px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
}

.step-bar li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
}

.step-bar li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--font-display);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f0e0c;
  color: var(--muted);
}

.step-bar li.is-done,
.step-bar li.is-current {
  color: #fff;
  background: rgba(212, 175, 55, 0.1);
}

.step-bar li.is-current span,
.step-bar li.is-done span {
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, #2a2418, var(--gold-deep));
  color: #fff;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(138, 31, 31, 0.2);
  color: #ffb4b4;
  border: 1px solid rgba(255, 120, 120, 0.25);
  font-size: 13px;
  text-align: center;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 18px;
  margin-bottom: 14px;
}

.card-head {
  margin-bottom: 14px;
  text-align: center;
}

.card-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: #fff;
}

.card-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.env-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.env-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
}

.env-list li span {
  color: var(--muted);
  flex-shrink: 0;
}

.env-list li strong {
  font-weight: 500;
  text-align: right;
  color: var(--ink);
}

.env-list li.ok strong {
  color: #7dcea0;
}

.env-list li.bad strong {
  color: #ff8f8f;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.grid label.full {
  grid-column: 1 / -1;
}

.grid span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.grid input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 14px;
  font: inherit;
  outline: none;
  color: var(--ink);
  background: var(--input);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.grid input::placeholder {
  color: rgba(243, 238, 228, 0.35);
}

.grid input:focus {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.btn-primary {
  appearance: none;
  border: 0;
  width: min(280px, 100%);
  height: 50px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #14110c;
  cursor: pointer;
  background: linear-gradient(135deg, #f0d78c, var(--gold) 45%, #9a7420);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover:not([disabled]) {
  filter: brightness(1.06);
}

.btn-primary:active:not([disabled]) {
  transform: translateY(1px);
}

.btn-primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .install-stage {
    padding: 20px 14px 28px;
    align-items: flex-start;
  }

  .install-shell {
    padding: 28px 18px 22px;
    border-radius: 22px;
  }

  .step-bar {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .env-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .env-list li strong {
    text-align: left;
  }
}
