:root {
  --bg1: #07131f;
  --bg2: #13263f;
  --card: #f6f8fb;
  --ink: #12253d;
  --accent: #1d7dd8;
  --accent2: #0e4b87;
  --ok: #157a3f;
  --err: #b42318;
  --line: #d6e0eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, #275f99 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #1c3f69 0%, transparent 35%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shell {
  width: min(980px, 100%);
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 22px 45px rgba(3, 12, 24, 0.28);
  padding: 22px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 760;
}

h2,
h3 {
  margin: 0 0 8px;
}

.subtitle {
  margin: 8px 0 0;
  color: #415c7a;
}

.form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

label {
  font-size: 14px;
  color: #223f5f;
  font-weight: 600;
}

input[type="url"] {
  width: 100%;
  border: 1px solid #b6c8dc;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  color: #0f2641;
  background: #fff;
}

textarea {
  width: 100%;
  border: 1px solid #b6c8dc;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: #0f2641;
  background: #fff;
  resize: vertical;
  min-height: 84px;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

input[type="url"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 125, 216, 0.17);
}

textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 125, 216, 0.17);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.session-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.session-tools button {
  width: auto;
}

.session-text {
  margin: 0;
  font-size: 13px;
  color: #355270;
  white-space: pre-wrap;
}

.guide-link {
  font-size: 13px;
  color: #0e4b87;
  text-decoration: none;
  width: fit-content;
}

.guide-link:hover {
  text-decoration: underline;
}

button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 15px;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn {
  background: #5e7287;
}

button:disabled {
  opacity: 0.62;
  cursor: default;
}

.small-btn {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

.status {
  font-weight: 700;
}

.status-running {
  color: #8a5b00;
}

.status-ok {
  color: var(--ok);
}

.status-fail {
  color: var(--err);
}

.error {
  color: var(--err);
  font-size: 14px;
  white-space: pre-wrap;
}

.files ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.files li {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.file-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #2f5f93;
  border-radius: 8px;
  padding: 2px 8px;
}

a.file-link {
  color: var(--accent2);
  text-decoration: none;
  word-break: break-all;
}

.bundle {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

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

.bundle-actions button {
  width: auto;
}

.bundle-msg {
  margin: 10px 0 0;
  font-size: 14px;
}

.preview {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.preview-note {
  margin: 0 0 8px;
  color: #7d5a00;
  font-size: 13px;
}

.preview pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #f0f4f9;
  border: 1px solid #d9e5f0;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.preview iframe {
  width: 100%;
  height: 540px;
  border: 1px solid #d9e5f0;
  border-radius: 10px;
  background: #fff;
}

.logs {
  margin-top: 14px;
}

.logs pre {
  margin: 10px 0 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #f0f4f9;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body {
    padding: 14px;
  }

  .panel {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .files li {
    grid-template-columns: auto auto 1fr;
    grid-auto-rows: auto;
  }
}
