/* 云端部署器 · 样式 —— 由 数码解码 独立开发并维护 · 请勿移除作者与版权声明 */
/* 视觉基因与星云解码（Nebula-Decode）面板保持一致：深空黑底 + 青绿/靛蓝流光 */
:root {
  color-scheme: dark;
  --bg: #05080f;
  --panel: rgba(17, 24, 39, 0.62);
  --panel-strong: rgba(12, 18, 30, 0.86);
  --text: #e6edf3;
  --muted: #8b9bb0;
  --dim: #6b7a8f;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-strong: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.1);
  --brand: #fbbf77;
  --danger: #fb7185;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(45, 212, 191, 0.13), transparent 60%),
    radial-gradient(900px 480px at 88% 112%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(700px 360px at 92% 6%, rgba(45, 212, 191, 0.06), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(94, 234, 212, 0.26);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 234, 212, 0.32);
}

::-webkit-scrollbar-track {
  background: transparent;
}

button,
input,
select {
  font: inherit;
}

input,
select,
button {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  padding: 24px 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px 14px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: 2px;
  font-weight: 800;
  background: linear-gradient(92deg, #eafffb 0%, #5eead4 46%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.summary {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- 卡片 ---------- */
.status-card,
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow);
}

.status-card {
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.6), rgba(129, 140, 248, 0.5), transparent);
}

.status-card strong {
  font-size: 15px;
  letter-spacing: 0.5px;
}

.status-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.12), 0 0 14px rgba(94, 234, 212, 0.7);
  vertical-align: middle;
}

.panel {
  margin-top: 20px;
  border-radius: 24px;
  padding: 24px;
}

.page-hidden {
  display: none !important;
}

.login-panel {
  max-width: 760px;
}

/* ---------- 折叠面板 ---------- */
summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
  list-style: none;
  display: flex;
  align-items: center;
  transition: color 0.18s ease;
}

summary:hover {
  color: var(--accent-strong);
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  color: #05202a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  line-height: 1;
}

details[open] summary::before {
  content: "−";
}

.advanced-panel .panel-head {
  margin-top: 20px;
}

/* ---------- 区块头 ---------- */
.panel-head {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.panel-head.compact {
  margin-bottom: 12px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 栅格与表单 ---------- */
.grid {
  display: grid;
  gap: 16px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-two {
  grid-column: span 2;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #aab8c8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.form-note {
  align-self: end;
  min-height: 46px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.06);
  font-size: 13px;
  line-height: 1.55;
}

.form-note.error-note {
  border-color: rgba(251, 113, 133, 0.28);
  color: var(--danger);
  background: rgba(251, 113, 133, 0.08);
}

input,
select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(5, 8, 15, 0.6);
  outline: none;
}

select option {
  background: #0b111c;
  color: var(--text);
}

input::placeholder {
  color: var(--dim);
}

input:focus,
select:focus {
  border-color: rgba(94, 234, 212, 0.6);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12), 0 0 22px rgba(45, 212, 191, 0.14);
  background: rgba(5, 8, 15, 0.85);
}

input:disabled {
  color: var(--dim);
  background: rgba(5, 8, 15, 0.35);
  cursor: not-allowed;
}

input[type="file"] {
  height: auto;
  padding: 10px 14px;
  line-height: 1.5;
  color: var(--muted);
  font-size: 13px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: 9px;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(94, 234, 212, 0.16);
  border-color: rgba(94, 234, 212, 0.5);
}

.toggle {
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 10px;
  padding-top: 23px;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
  cursor: pointer;
}

.toggle span {
  margin: 0;
}

/* ---------- 按钮 ---------- */
button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary {
  min-height: 52px;
  padding: 0 30px;
  color: #05202a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 40px rgba(45, 212, 191, 0.24);
  font-weight: 800;
  letter-spacing: 1.2px;
}

.primary:hover:not(:disabled) {
  box-shadow: 0 20px 48px rgba(45, 212, 191, 0.36), 0 0 30px rgba(129, 140, 248, 0.28);
}

.secondary {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.26);
  background: rgba(94, 234, 212, 0.07);
  font-weight: 700;
}

.secondary:hover:not(:disabled) {
  background: rgba(94, 234, 212, 0.14);
  border-color: rgba(94, 234, 212, 0.48);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.18);
}

.small {
  min-height: 34px;
  padding: 0 15px;
}

.action-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 22px 0 0;
}

.quick-action {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 22px;
}

/* ---------- 结果条 ---------- */
.result {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  color: var(--muted);
  background: var(--panel-strong);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.result.success {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.24);
  background: rgba(94, 234, 212, 0.07);
}

.result.error {
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.26);
  background: rgba(251, 113, 133, 0.08);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 16px;
  background: rgba(94, 234, 212, 0.05);
}

.result-link-wrap {
  flex: 1 1 100%;
  min-width: 0;
}

.result-link {
  display: inline-block;
  max-width: 100%;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
  border-bottom: 1px dashed rgba(94, 234, 212, 0.5);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.result-link:hover {
  color: #aef7e8;
  border-bottom-color: var(--accent);
}

/* ---------- 部署历史 ---------- */
.history-panel {
  padding-bottom: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 8, 15, 0.45);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.history-row:hover {
  border-color: rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.05);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.history-info strong {
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
}

.history-meta {
  color: var(--dim);
  font-size: 12px;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.history-open {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  text-decoration: none;
  min-height: 34px;
  padding: 0 15px;
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.26);
  background: rgba(94, 234, 212, 0.07);
  font-weight: 700;
  font-size: 14px;
}

.history-open:hover {
  background: rgba(94, 234, 212, 0.14);
  border-color: rgba(94, 234, 212, 0.48);
}

/* ---------- 日志 ---------- */
.logs-panel {
  padding-bottom: 14px;
}

pre {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 16px;
  padding: 16px 18px;
  color: #b8f5e6;
  background: rgba(2, 6, 12, 0.9);
  font: 12.5px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Code", monospace;
  white-space: pre-wrap;
  box-shadow: inset 0 0 44px rgba(45, 212, 191, 0.06);
}

pre::selection {
  background: rgba(94, 234, 212, 0.28);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero,
  .two,
  .three {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .panel-head,
  .action-row,
  .quick-action {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .button-group {
    justify-content: stretch;
  }

  .primary,
  .secondary,
  .button-group button {
    width: 100%;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .status-card,
  .panel {
    background: rgba(11, 17, 28, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
