/*
Theme Name: CNRCR Retro Child
Theme URI: https://www.cnrcr.cn
Description: 老收录机收藏站复古子主题（基于 Astra 免费版）
Author: cnrcr
Template: astra
Version: 1.0.0
Text Domain: cnrcr-child
*/

/* ========== 复古基调（70-80 年代磁带机风） ========== */
:root {
  --rc-paper: #f6f0e4;
  --rc-cream: #fff8ec;
  --rc-ink: #33261a;
  --rc-accent: #c96f2e;
  --rc-accent-dark: #a85620;
  --rc-teal: #2e6f68;
  --rc-line: #3e2c1e;
}

body {
  background: var(--rc-paper);
  color: var(--rc-ink);
}

/* 标题衬线化 + 复古字距 */
.rc-serif, h1.rc-serif, h2.rc-serif, h3.rc-serif,
.rc-hero h1, .rc-hero .rc-sub, .rc-section-title {
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

/* ========== 复古按钮（粗边 + 硬阴影） ========== */
.rc-btn {
  display: inline-block;
  padding: 10px 26px;
  border: 2px solid var(--rc-line);
  border-radius: 6px;
  background: var(--rc-accent);
  color: #fff8ec !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--rc-line);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rc-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--rc-line); }
.rc-btn.rc-btn-ghost { background: var(--rc-cream); color: var(--rc-ink) !important; }
.rc-btn.rc-btn-teal { background: var(--rc-teal); }

/* ========== Hero ========== */
.rc-hero {
  background:
    repeating-linear-gradient(0deg, rgba(62,44,30,.03) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #efe4cd 0%, var(--rc-paper) 100%);
  border-bottom: 3px solid var(--rc-line);
  padding: 64px 20px 56px;
  text-align: center;
}
.rc-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: .12em;
  margin: 0 0 12px;
  color: var(--rc-ink);
}
.rc-hero .rc-sub {
  font-size: clamp(15px, 2.2vw, 19px);
  color: #7a6a55;
  margin: 0 0 26px;
  letter-spacing: .18em;
}
.rc-hero .rc-tape { margin: 0 auto 22px; display: block; }
.rc-hero .rc-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ========== 通用区块 ========== */
.rc-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.rc-section { padding: 44px 0 10px; }
.rc-section-title {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .1em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}
.rc-section-title::after {
  content: '';
  width: 46px; height: 4px;
  background: var(--rc-accent);
  border-radius: 2px;
  display: inline-block;
}
.rc-section-desc { color: #7a6a55; margin: 0 0 22px; font-size: 14.5px; }

/* ========== 统计条 ========== */
.rc-stats {
  display: flex;
  gap: 0;
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  background: var(--rc-cream);
  box-shadow: 4px 4px 0 rgba(62,44,30,.25);
  overflow: hidden;
  margin: 30px 0 8px;
}
.rc-stats > div {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  border-right: 2px dashed rgba(62,44,30,.35);
}
.rc-stats > div:last-child { border-right: none; }
.rc-stats b { display: block; font-size: 26px; color: var(--rc-accent-dark); font-family: 'Noto Serif SC', serif; }
.rc-stats span { font-size: 13px; color: #7a6a55; letter-spacing: .15em; }

/* ========== 机型卡片网格 ========== */
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin: 8px 0 30px;
}
.rc-card {
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  background: var(--rc-cream);
  box-shadow: 4px 4px 0 rgba(62,44,30,.22);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
  display: block;
  color: var(--rc-ink) !important;
  text-decoration: none;
}
.rc-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 rgba(62,44,30,.3); }
.rc-card .rc-ph {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8dcc3 0%, #f1e7d2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--rc-line);
  color: #b3a288;
  font-size: 13px;
  letter-spacing: .2em;
  overflow: hidden;
}
.rc-card .rc-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-card .rc-body { padding: 13px 15px 15px; }
.rc-card .rc-brand {
  display: inline-block;
  font-size: 11.5px;
  color: var(--rc-cream);
  background: var(--rc-teal);
  border-radius: 3px;
  padding: 2px 9px;
  letter-spacing: .12em;
  margin-bottom: 7px;
}
.rc-card h3 { margin: 0 0 5px; font-size: 17.5px; font-family: 'Noto Serif SC', serif; letter-spacing: .04em; }
.rc-card .rc-meta { font-size: 12.5px; color: #8a7a62; letter-spacing: .06em; }

.rc-empty {
  border: 2px dashed rgba(62,44,30,.4);
  border-radius: 10px;
  padding: 34px 20px;
  text-align: center;
  color: #8a7a62;
  background: rgba(255,248,236,.6);
  grid-column: 1 / -1;
}

/* ========== 知识专栏列表 ========== */
.rc-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.rc-post {
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  background: var(--rc-cream);
  box-shadow: 4px 4px 0 rgba(62,44,30,.22);
  padding: 18px 20px;
}
.rc-post .rc-cat {
  font-size: 11.5px; color: var(--rc-cream); background: var(--rc-accent);
  border-radius: 3px; padding: 2px 9px; letter-spacing: .1em;
}
.rc-post h3 { margin: 10px 0 8px; font-size: 17px; font-family: 'Noto Serif SC', serif; }
.rc-post h3 a { color: var(--rc-ink) !important; text-decoration: none; }
.rc-post h3 a:hover { color: var(--rc-accent-dark) !important; }
.rc-post p { margin: 0; font-size: 13.5px; color: #7a6a55; }

/* ========== 机型详情页 ========== */
.rc-single {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: start;
  margin-bottom: 26px;
}
.rc-single .rc-img {
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  background: var(--rc-cream);
  box-shadow: 4px 4px 0 rgba(62,44,30,.22);
  overflow: hidden;
}
.rc-single .rc-img img { width: 100%; display: block; }
.rc-single .rc-img .rc-nopic {
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: #b3a288; font-size: 13px; letter-spacing: .2em;
}
.rc-info {
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  background: var(--rc-cream);
  box-shadow: 4px 4px 0 rgba(62,44,30,.22);
  padding: 20px 22px;
}
.rc-info table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rc-info th {
  text-align: left; color: #8a7a62; font-weight: 400;
  padding: 9px 12px 9px 0; border-bottom: 1px dashed rgba(62,44,30,.3);
  white-space: nowrap; letter-spacing: .1em;
}
.rc-info td { padding: 9px 0; border-bottom: 1px dashed rgba(62,44,30,.3); }

.rc-prose {
  background: var(--rc-cream);
  border: 2px solid var(--rc-line);
  border-radius: 10px;
  box-shadow: 4px 4px 0 rgba(62,44,30,.22);
  padding: 26px 30px;
  line-height: 1.9;
}

/* 隐藏 Astra 侧栏（图鉴相关页全宽） */
.post-type-archive-machine #secondary,
.single-machine #secondary { display: none; }
.post-type-archive-machine #primary,
.single-machine #primary { width: 100%; max-width: 100%; flex: 1 1 100%; }

/* ========== 响应式 ========== */
@media (max-width: 760px) {
  .rc-single { grid-template-columns: 1fr; }
  .rc-stats { flex-wrap: wrap; }
  .rc-stats > div { min-width: 45%; border-right: none; border-bottom: 2px dashed rgba(62,44,30,.35); }
  .rc-hero { padding: 44px 16px 40px; }
}
