:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: rgba(255, 255, 255, .055);
  --panel-soft: rgba(255, 255, 255, .035);
  --border: rgba(255, 255, 255, .13);
  --border-strong: rgba(255, 255, 255, .22);
  --text: #f4f5f7;
  --muted: #a9adb7;
  --muted-2: #7d8491;
  --accent: #7c9cff;
  --accent-bg: rgba(124, 156, 255, .18);
  --accent-border: rgba(124, 156, 255, .55);
  --accent-hover: #95adff;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, .12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(88, 101, 242, .08), transparent 36rem),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 48px;
}

.hero,
.section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .035));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

.hero {
  padding: 30px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: #cbd4ff;
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
}

h1 {
  margin: 14px 0 12px;
  font-size: clamp(42px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.published {
  min-height: 22px;
  color: #cbd1dd;
  font-size: 15px;
}

.repo-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 26px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0, 0, 0, .1);
}

.url-field,
.search {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  font: inherit;
}

.url-field {
  padding: 0 14px;
}

.search {
  max-width: 320px;
  margin: 10px 0 14px;
  padding: 0 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.button:hover {
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .075);
  text-decoration: none;
}

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

.button.primary {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.section {
  margin-top: 24px;
  padding: 22px;
}

h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.list {
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0;
  color: #cbd1dd;
  font-size: 14px;
  line-height: 1.65;
}

.card-url {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 13px;
  word-break: break-all;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-note {
  margin-top: 18px;
  color: #cbd1dd;
  text-align: center;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: none;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #20232b;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
  font-size: 14px;
}

.toast.show { display: block; }
[hidden] { display: none !important; }

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1080px);
    padding-top: 10px;
  }

  .hero,
  .section {
    padding: 18px;
    border-radius: 18px;
  }

  .repo-actions,
  .card {
    grid-template-columns: 1fr;
  }

  .button,
  .search {
    width: 100%;
    max-width: none;
  }

  .card-actions {
    justify-content: flex-start;
  }
}
