/* ===========================
   脉动小羊镜像源
   =========================== */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f8f8f8;
  --c-bg-card: #fafafa;
  --c-border: #e8e8e8;
  --c-border-light: #f0f0f0;
  --c-text: #1a1a1a;
  --c-text-secondary: #666666;
  --c-text-muted: #999999;
  --c-accent: #1a1a1a;
  --c-accent-hover: #333333;
  --c-code-bg: #1e1e1e;
  --c-code-text: #d4d4d4;
  --c-green: #2d8a56;
  --c-green-bg: #edf7f1;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "Consolas", "Menlo", monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--c-border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-text);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  padding: 6px 14px;
  font-size: 0.88rem;
  color: var(--c-text-secondary);
  border-radius: 4px;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--c-text);
}

/* --- Header --- */
.header {
  padding: 140px 0 80px;
  text-align: center;
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.header-desc {
  font-size: 1.05rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  background: var(--c-accent);
  color: #fff;
  border: 1px solid var(--c-accent);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}

.btn-ghost:hover {
  background: var(--c-bg-alt);
  border-color: #ccc;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--c-text-secondary);
  margin-bottom: 32px;
}

/* --- Mirror List --- */
.mirror-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.mirror-item {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 24px;
}

.mirror-item-planned {
  opacity: 0.6;
}

.mirror-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mirror-head h3 {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.tag {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.tag-green {
  background: var(--c-green-bg);
  color: var(--c-green);
}

.tag-gray {
  background: #f0f0f0;
  color: #999;
}

.mirror-desc {
  font-size: 0.88rem;
  color: var(--c-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.mirror-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f5f5f5;
  border: 1px solid var(--c-border-light);
  border-radius: 6px;
  font-size: 0.85rem;
  overflow-x: auto;
}

.mirror-url code {
  font-family: var(--font-mono);
  color: var(--c-accent);
  white-space: nowrap;
  flex: 1;
}

/* --- Copy Button --- */
.copy-btn {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  color: var(--c-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: var(--c-bg-alt);
  color: var(--c-text);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--c-border);
}

.tab {
  padding: 8px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--c-text-secondary);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--c-text);
}

.tab.active {
  color: var(--c-text);
  border-bottom-color: var(--c-accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --- Code Box --- */
.code-box {
  background: var(--c-code-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.code-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: #888;
  font-weight: 500;
}

.code-box-head .copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #aaa;
}

.code-box-head .copy-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ddd;
}

.code-box pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

.code-box code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--c-code-text);
}

.code-box .c {
  color: #6a9955;
}

.tip {
  font-size: 0.88rem;
  color: var(--c-text-secondary);
  padding: 12px 16px;
  background: var(--c-green-bg);
  border: 1px solid #d4ece0;
  border-radius: 6px;
}

.tip code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 3px;
}

/* --- About --- */
.about-card {
  max-width: 400px;
  margin: 28px auto 0;
  padding: 40px 32px;
  text-align: center;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.about-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-bio {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.about-links {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
}

.about-links a {
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-links a:hover {
  color: var(--c-accent-hover);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--c-border);
  padding: 32px 0;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer p {
  font-size: 0.82rem;
  color: var(--c-text-muted);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 20px;
  background: var(--c-text);
  color: #fff;
  font-size: 0.85rem;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .mirror-list {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 120px 0 60px;
  }

  .header-title {
    font-size: 1.8rem;
  }

  .section {
    padding: 56px 0;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 1.5rem;
  }

  .header-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .tabs {
    overflow-x: auto;
  }

  .about-card {
    padding: 28px 20px;
  }
}
