:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-soft: #f8faff;
  --text: #2b2f3a;
  --muted: #8d97aa;
  --line: #e7ebf3;
  --blue: #4a8ef1;
  --blue-deep: #3a73db;
  --blue-soft: #edf4ff;
  --orange: #f3a947;
  --green: #53b980;
  --shadow: 0 18px 42px rgba(92, 117, 168, 0.12);
  --shadow-soft: 0 10px 26px rgba(99, 120, 166, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(74, 142, 241, 0.08), transparent 28rem),
    linear-gradient(180deg, #f8f9fd 0%, #f3f5fb 100%);
}

button,
input,
code,
pre {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  gap: 28px;
  flex-direction: column;
  padding: 28px 18px;
  border-right: 1px solid rgba(231, 235, 243, 0.9);
  background: rgba(245, 247, 252, 0.92);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #69a8ff, var(--blue-deep));
  box-shadow: 0 12px 20px rgba(74, 142, 241, 0.22);
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
}

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

.menu-item {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  color: #5e6a7f;
  font-size: 15px;
  text-align: left;
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.menu-item:hover {
  background: #eef4ff;
  color: var(--blue);
  transform: translateX(2px);
}

.menu-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, #64a1ff, var(--blue));
  box-shadow: 0 14px 24px rgba(74, 142, 241, 0.22);
}

.main-layout {
  min-width: 0;
  padding: 24px 30px 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.searchbar input::placeholder {
  color: #b3bbca;
}

.search-icon {
  color: #adb7ca;
  font-size: 18px;
}

.content {
  padding-top: 26px;
}

.headline {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 3.8vw, 40px);
  line-height: 1.2;
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.lead,
.section-head p,
.metric-card span,
.banner-copy p,
.release-card li,
.mini-card p,
.gallery-card p,
.result-meta {
  color: var(--muted);
  line-height: 1.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 2.1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.metric-card,
.banner-card,
.release-card,
.tool-panel,
.mini-card,
.gallery-card {
  border: 1px solid rgba(231, 235, 243, 0.9);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 30px 24px;
}

.metric-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 22px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 800;
  background: var(--blue-soft);
}

.metric-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 36px;
  line-height: 1;
}

.banner-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  padding: 28px 32px;
  color: #fff;
  background: linear-gradient(135deg, #6a8df0 0%, #83c2ff 100%);
}

.banner-copy {
  max-width: 440px;
}

.banner-copy .eyebrow,
.banner-copy p,
.banner-copy h2 {
  color: #fff;
}

.banner-copy p {
  margin-bottom: 0;
}

.banner-graphic {
  position: relative;
  width: 220px;
  min-height: 190px;
}

.orb {
  position: absolute;
  border-radius: 50%;
}

.orb-a {
  right: 18px;
  top: 12px;
  width: 128px;
  height: 128px;
  background: radial-gradient(circle at 30% 30%, #ffd4c3, #ea7bb0 62%, rgba(255, 255, 255, 0));
}

.orb-b {
  right: 88px;
  bottom: 10px;
  width: 94px;
  height: 94px;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.14);
}

.panel-chip {
  position: absolute;
  left: 10px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.release-card {
  padding: 26px 24px;
}

.release-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.release-card li + li {
  margin-top: 10px;
}

.tools-section,
.gallery-section {
  margin-top: 30px;
}

.section-head {
  margin-bottom: 16px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 320px;
  gap: 20px;
  align-items: start;
}

.tool-panel {
  padding: 24px;
}

.tool-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  background: var(--blue-soft);
}

.tool-form {
  display: grid;
  gap: 16px;
}

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

.field span {
  color: #66748b;
  font-size: 14px;
  font-weight: 600;
}

.field input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: rgba(74, 142, 241, 0.65);
  box-shadow: 0 0 0 4px rgba(74, 142, 241, 0.12);
}

.actions {
  display: flex;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

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

.button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, #69a8ff, var(--blue));
  box-shadow: 0 14px 24px rgba(74, 142, 241, 0.24);
}

.button.ghost {
  color: #5f6d86;
  background: #f3f7ff;
}

.result-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: var(--panel-soft);
}

.result-meta {
  display: grid;
  gap: 10px;
}

#requestUrl {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  overflow-wrap: anywhere;
  color: #51627d;
  background: #fff;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-badge.idle {
  color: #64748a;
  background: #edf1f7;
}

.status-badge.loading {
  color: #a76c12;
  background: #fff0d2;
}

.status-badge.success {
  color: #247a4a;
  background: #ddf5e8;
}

.status-badge.error {
  color: #b33c45;
  background: #ffe5e7;
}

.response-output {
  min-height: 220px;
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 14px;
  overflow: auto;
  color: #eff4ff;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.65;
  background: #253149;
}

.tool-aside {
  display: grid;
  gap: 18px;
}

.mini-card {
  padding: 20px;
}

.mini-card p:last-child {
  margin-bottom: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  min-height: 180px;
  padding: 22px;
}

.gallery-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.gallery-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 18px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  background: var(--blue-soft);
}

.is-coming .gallery-icon {
  color: #8fa0b8;
  background: #f2f5fb;
}

.footer {
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.is-visible {
  animation: riseIn 600ms ease both;
}

.is-hidden-by-search {
  display: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(231, 235, 243, 0.9);
  }

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

  .menu-item {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .main-layout {
    padding: 18px 16px 24px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .searchbar {
    max-width: none;
  }

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

  .banner-card {
    flex-direction: column;
  }

  .banner-graphic {
    width: 100%;
    min-height: 130px;
  }

  .actions {
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
