/* ==========================================================================
   旧巷 (jiux.homes) - 方案二十四：复古终端/命令行 Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  --bg-color: #0d1117;
  --panel-bg: #161b22;
  --panel-border: #30363d;
  --text-main: #c9d1d9;
  --text-muted: #8b949e;
  --green-primary: #00ff88;
  --green-glow: rgba(0, 255, 136, 0.25);
  --cyan-accent: #00e5ff;
  --yellow-accent: #ffb800;
  --red-accent: #ff5555;
  --font-mono: 'Fira Code', 'Consolas', 'Courier New', monospace;
  --font-sans: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --max-content-width: 760px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #172221 0%, #0d1117 70%);
  background-attachment: fixed;
}

/* 终端顶端状态栏 Header */
.terminal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--green-primary);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--green-primary);
  object-fit: contain;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--green-primary);
  text-shadow: 0 0 8px var(--green-glow);
}

.status-badge {
  font-size: 0.82rem;
  color: var(--green-primary);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--green-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-primary);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 单列居中排版容器 (680px - 800px 最佳阅读流) */
.main-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem 1.25rem;
  flex: 1;
}

/* 终端命令行窗口框 */
.terminal-window {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 136, 0.05);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.terminal-titlebar {
  background-color: #21262d;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.window-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.8rem;
}

/* Prompt 命令行 */
.prompt-line {
  color: var(--green-primary);
  margin-bottom: 1.2rem;
  word-break: break-all;
}

.prompt-user { color: #58a6ff; }
.prompt-host { color: var(--green-primary); }
.prompt-path { color: var(--yellow-accent); }

/* Hero 区域 */
.hero-section {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2rem;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-title .highlight {
  color: var(--green-primary);
  text-shadow: 0 0 12px var(--green-glow);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 2rem;
  border-left: 3px solid var(--green-primary);
  padding-left: 1rem;
  background: rgba(0, 255, 136, 0.03);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* 核心 3 个并排/响应式按钮组 */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  flex: 1 1 auto;
  text-align: center;
  min-width: 180px;
}

.btn-primary {
  background: var(--green-primary);
  color: #0d1117;
  border-color: var(--green-primary);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
  background: #00cc6a;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--green-primary);
  border-color: var(--green-primary);
}

.btn-secondary:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}

/* 移动端 3 按钮优雅折行逻辑 */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    width: 100%;
    min-width: 100%;
  }
}

/* Ping 模拟组件 */
.ping-monitor {
  background: #0d1117;
  border: 1px solid var(--panel-border);
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.ping-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px dashed #21262d;
}

.ping-item:last-child {
  border-bottom: none;
}

.ping-latency {
  color: var(--green-primary);
  font-weight: 600;
}

/* 内容板块 */
.content-section {
  margin-top: 3rem;
}

.section-title {
  font-size: 1.4rem;
  color: #ffffff;
  border-bottom: 2px solid var(--panel-border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '>';
  color: var(--green-primary);
  font-weight: 700;
}

/* 故事流文本与叙事 */
.narrative-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.narrative-card p {
  margin-bottom: 1rem;
  color: var(--text-main);
}

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

.keyword-tag {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin: 0.2rem;
}

/* 价格区域 - Vertical Stack 垂直列表 */
.pricing-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.pricing-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.pricing-card.featured {
  border-color: var(--green-primary);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.15);
}

.badge-recommend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--green-primary);
  color: #0d1117;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.plan-name {
  font-size: 1.2rem;
  color: #ffffff;
  font-weight: 700;
}

.plan-price {
  font-size: 1.6rem;
  color: var(--green-primary);
  font-weight: 700;
}

.plan-price span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin-bottom: 1.2rem;
}

.plan-features li {
  padding: 0.3rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li::before {
  content: '✓';
  color: var(--green-primary);
}

/* 文章列表区 */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.article-card:hover {
  border-color: var(--cyan-accent);
  transform: translateX(4px);
}

.article-title {
  color: var(--cyan-accent);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.article-snippet {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* FAQ 手风琴式 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 1.2rem;
}

.faq-question {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-question::before {
  content: '[?]';
  color: var(--yellow-accent);
}

.faq-answer {
  color: var(--text-main);
  font-size: 0.92rem;
  padding-left: 1.8rem;
}

/* 用户评价 */
.reviews-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 1.2rem;
  border-radius: 6px;
  border-left: 3px solid var(--green-primary);
}

.review-user {
  font-weight: 600;
  color: var(--green-primary);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.review-text {
  color: var(--text-main);
  font-size: 0.9rem;
  font-style: italic;
}

/* 核心任务 2：页脚 PBN 权重链接管道 */
.site-footer {
  background: #090d13;
  border-top: 1px solid var(--panel-border);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.friend-links-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--panel-border);
  width: 100%;
}

.friend-link-title {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.friend-link-a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.82rem;
}

.friend-link-a:hover {
  color: var(--green-primary);
  text-decoration: underline;
}

.copyright {
  font-size: 0.8rem;
}
