:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #617069;
  --soft: #f5f7f3;
  --paper: #fbfbf8;
  --line: #dbe0d8;
  --line-strong: #c9d1c6;
  --green: #1f7a5a;
  --green-dark: #13543f;
  --blue: #3266a8;
  --amber: #a7601f;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(34, 49, 41, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--soft);
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(246, 248, 243, 0.94)),
    repeating-linear-gradient(
      90deg,
      rgba(23, 32, 27, 0.035) 0,
      rgba(23, 32, 27, 0.035) 1px,
      transparent 1px,
      transparent 64px
    ),
    var(--soft);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #f7fbf5;
  background: var(--green-dark);
  font-size: 24px;
  font-weight: 760;
  line-height: 1;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quick-nav a,
.ghost-button,
.tab,
.copy-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #26352e;
  font-size: 14px;
}

.quick-nav a:hover,
.ghost-button:hover,
.tab:hover,
.copy-action:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: 0 10px 26px rgba(34, 49, 41, 0.1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
  padding: 42px 0 30px;
}

.hero-copy {
  min-width: 0;
  padding: 8px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 760;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-primary-action {
  min-width: 180px;
}

.hero-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 244, 0.92)),
    var(--card);
  box-shadow: var(--shadow);
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-row span {
  color: var(--muted);
  font-size: 13px;
}

.panel-row strong {
  color: var(--green-dark);
  font-size: 20px;
}

.status-list {
  display: grid;
  gap: 9px;
  padding: 16px 0;
}

.status-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b9c0b8;
}

.dot.is-up {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.11);
}

.dot.is-down {
  background: #a0443e;
  box-shadow: 0 0 0 4px rgba(160, 68, 62, 0.11);
}

.status-item b {
  overflow: hidden;
  color: var(--ink);
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-item code {
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

.ghost-button {
  width: 100%;
  margin-top: auto;
  cursor: pointer;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(180px, 360px);
  align-items: center;
  gap: 10px;
  min-width: min(100%, 470px);
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(31, 122, 90, 0.45);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.12);
}

.filter-tabs {
  display: inline-flex;
  gap: 8px;
}

.tab {
  min-width: 70px;
  padding: 0 14px;
  cursor: pointer;
}

.tab.is-active {
  border-color: rgba(31, 122, 90, 0.35);
  color: #fff;
  background: var(--green-dark);
}

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

.app-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(34, 49, 41, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.app-card-featured {
  border-color: rgba(31, 122, 90, 0.3);
  box-shadow: 0 20px 48px rgba(31, 122, 90, 0.14);
}

.app-card-featured .card-head h2 {
  color: var(--green-dark);
}

.app-card-featured .preview-link::after {
  opacity: 1;
  transform: translateY(0);
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(34, 49, 41, 0.13);
}

.preview-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #e8ece6;
}

.preview-link::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  content: "打开";
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  background: rgba(17, 25, 21, 0.72);
  font-size: 13px;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.app-card:hover .preview-link::after {
  opacity: 1;
  transform: translateY(0);
}

.preview-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform 260ms ease;
}

.app-card:hover .preview-link img {
  transform: scale(1.035);
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.path {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.state {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 12px;
  text-align: center;
}

.state.is-up {
  border-color: rgba(31, 122, 90, 0.2);
  color: var(--green-dark);
  background: rgba(31, 122, 90, 0.09);
}

.state.is-down {
  border-color: rgba(160, 68, 62, 0.24);
  color: #8a372f;
  background: rgba(160, 68, 62, 0.08);
}

.state.is-env {
  border-color: rgba(31, 122, 90, 0.22);
  color: var(--green-dark);
  background: rgba(31, 122, 90, 0.1);
}

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

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

.tags span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #33443b;
  background: #f8faf6;
  font-size: 12px;
}

.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 92px;
  border-radius: 8px;
  color: #fff;
  background: var(--green-dark);
  font-weight: 680;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #0f4a37;
  box-shadow: 0 12px 28px rgba(19, 84, 63, 0.2);
}

.copy-action {
  min-width: 94px;
  padding: 0 12px;
  cursor: pointer;
}

.empty-state {
  margin: 28px 0 0;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(17, 25, 21, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 28px, 640px);
  }

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

  .quick-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(36px, 13vw, 58px);
  }

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

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

  .toolbar {
    gap: 12px;
  }

  .search-box {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 22px, 430px);
    padding-top: 16px;
  }

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

  .quick-nav a {
    justify-content: center;
    padding: 0 8px;
    text-align: center;
  }

  .hero-panel,
  .toolbar,
  .card-body {
    padding: 16px;
  }

  .intro {
    font-size: 15px;
  }

  .card-head,
  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-secondary-action,
  .state,
  .primary-action,
  .copy-action {
    width: 100%;
  }
}
