/* ============================================
   UCard Guide - card.css
   适用于 layouts/cards/list.html
   和 layouts/cards/single.html
   ============================================ */

/* ===== 通用重置 ===== */
* { box-sizing: border-box; }

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}
.breadcrumb a {
  color: #888;
  text-decoration: none;
}
.breadcrumb a:hover { color: #f7931a; }

/* ===== 标签 ===== */
.tag {
  background: #f0f7ff;
  color: #0066cc;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* ===== 申请按钮 ===== */
.btn-apply {
  display: block;
  background: #f7931a;
  color: white !important;
  text-align: center;
  padding: 0.8rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: bold;
  margin-bottom: 0.8rem;
  transition: background 0.2s;
}
.btn-apply:hover { background: #e8820a; }

/* ===== 推荐码 ===== */
.referral-code {
  text-align: center;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.referral-bonus {
  background: #fffbf0;
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 0.82rem;
  color: #555;
  text-align: center;
}

/* ============================================
   卡片主页 list.html
   ============================================ */

.card-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* Hero 两栏 */
.card-hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.card-hero-left h1 {
  margin: 0 0 0.8rem 0;
  font-size: 1.8rem;
}

.card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.card-score {
  margin-bottom: 1rem;
  line-height: 1;
}
.score-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #f7931a;
}
.score-label {
  font-size: 0.9rem;
  color: #888;
  margin-left: 0.3rem;
}

.card-summary {
  color: #444;
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

/* 申请框 */
.apply-box {
  border: 2px solid #f7931a;
  border-radius: 12px;
  padding: 1.2rem;
  position: sticky;
  top: 80px;
}

.apply-stats { margin-bottom: 1.2rem; }

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.88rem;
}
.stat:last-child { border-bottom: none; }
.stat-label { color: #666; }
.stat-value { font-weight: bold; }

/* 内部导航 */
.inner-nav {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
}
.inner-nav h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}
.inner-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}
.inner-nav-item {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.9rem;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.inner-nav-item:hover {
  border-color: #f7931a;
  box-shadow: 0 2px 8px rgba(247,147,26,0.15);
}
.inner-nav-icon { font-size: 1.4rem; margin-bottom: 0.3rem; }
.inner-nav-title {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #222;
}
.inner-nav-desc { font-size: 0.78rem; color: #888; }

/* 正文内容 */
.card-content {
  line-height: 1.9;
  color: #333;
  font-size: 1rem;
}

.card-content h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  color: #111;
}

.card-content h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  color: #222;
}

.card-content p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.card-content ul,
.card-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.card-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.card-content strong {
  color: #111;
}

.card-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.card-content th {
  background: #1a1a2e;
  color: white;
  padding: 0.7rem 1rem;
  text-align: left;
}
.card-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}
.card-content tr:nth-child(even) td { background: #fafafa; }

/* ============================================
   子页面 single.html — 两栏布局
   ============================================ */

.single-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.single-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  align-items: start;
  margin-top: 1rem;
}

.single-main h1 {
  margin: 0 0 1.5rem 0;
  font-size: 1.6rem;
}

.single-content {
  line-height: 1.9;
  font-size: 1rem;
  color: #333;
}

.single-content h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.single-content h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.single-content p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.single-content ul,
.single-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.single-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

/* 底部翻页 */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  gap: 1rem;
}
.page-nav-item {
  background: #f5f5f5;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none !important;
  color: #333;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.page-nav-item:hover { background: #f7931a; color: white !important; }

/* ===== 侧边栏 ===== */
.single-sidebar { position: sticky; top: 80px; }

.sidebar-box {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  background: white;
}
.sidebar-box h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-score {
  color: #f7931a;
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.sidebar-stats { margin-bottom: 1rem; }
.sidebar-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
}
.sidebar-stat:last-child { border-bottom: none; }
.sidebar-stat span { color: #666; }

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-links li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f5f5f5;
}
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
  text-decoration: none !important;
  color: #444;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.sidebar-links a:hover,
.sidebar-links a.active { color: #f7931a; }
.sidebar-links a.active { font-weight: bold; }

/* ============================================
   深色模式
   ============================================ */
@media (prefers-color-scheme: dark) {

  /* 面包屑 */
  .breadcrumb,
  .breadcrumb a { color: #aaa; }

  /* 标签 */
  .tag {
    background: #1a2a3a;
    color: #7ab8f5;
  }

  /* 评分 */
  .score-label { color: #aaa; }

  /* 简介 */
  .card-summary { color: #ccc; }

  /* 申请框 */
  .apply-box { background: #1e1e1e; }
  .stat { border-bottom-color: #333; }
  .stat-label { color: #aaa; }
  .stat-value { color: #fff; }

  /* 推荐码/奖励 */
  .referral-code { color: #ccc; }
  .referral-bonus {
    background: #2a2200;
    color: #e8c97a;
  }

  /* 内部导航 */
  .inner-nav { background: #1e1e1e; }
  .inner-nav h3 { color: #fff; }
  .inner-nav-item {
    background: #2a2a2a;
    border-color: #444;
  }
  .inner-nav-item:hover { border-color: #f7931a; }
  .inner-nav-title { color: #fff !important; }
  .inner-nav-desc { color: #aaa !important; }

  /* 正文 */
  .card-content,
  .single-content { color: #ddd; }

  .card-content h2,
  .card-content h3,
  .single-content h2,
  .single-content h3,
  .single-main h1,
  .card-hero-left h1 { color: #fff; }

  .card-content strong,
  .single-content strong { color: #fff; }

  .card-content td { border-bottom-color: #333; }
  .card-content th { background: #0f1923; }
  .card-content tr:nth-child(even) td { background: #1a1a1a; }

  .card-content p,
  .single-content p { color: #ddd; }

  /* 翻页导航 */
  .page-nav { border-top-color: #333; }
  .page-nav-item {
    background: #2a2a2a;
    color: #e8e8e8;
  }

  /* 侧边栏 */
  .sidebar-box {
    background: #1e1e1e;
    border-color: #444;
  }
  .sidebar-box h4 {
    color: #fff;
    border-bottom-color: #333;
  }
  .sidebar-stat span { color: #aaa; }
  .sidebar-stat strong { color: #fff; }
  .sidebar-stat { border-bottom-color: #333; }
  .sidebar-links li { border-bottom-color: #333; }
  .sidebar-links a { color: #ccc; }
  .sidebar-links a:hover,
  .sidebar-links a.active { color: #f7931a; }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .card-hero { grid-template-columns: 1fr; }
  .apply-box { position: static; }
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { position: static; }
  .inner-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .page-nav { flex-direction: column; }
}

@media (max-width: 400px) {
  .inner-nav-grid { grid-template-columns: 1fr; }
}
