/*
Theme Name: Radiant Skincare Hub
Theme URI: https://radiantskincarehub.skin
Description: Evidence-based skincare analysis. We decode cosmetic ingredient lists, routine compatibility, and dermatological products for glowing skin.
Style ID: d2fcd2
Version: 1.0.0
Text Domain: radiant-skincare-hub
*/

/* ============ 配色系统（浅色） ============ */
:root {
  --bg: #f6f8f8;
  --bg-alt: #ebefee;
  --bg-deep: #e0e5e4;
  --text: #1d2623;
  --text-muted: #6b7b76;
  --accent: #28af88;
  --border: #dde4e2;
  /* 视觉密度：标准 */
  --spacing: 18px;
  --spacing-lg: 44px;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 1px 0 rgba(29, 38, 35, 0.04);
  --font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --line: 1px;
}

/* ============ 暗黑模式 ============ */
[data-theme="dark"] {
  --bg: #121816;
  --bg-alt: #1a211e;
  --bg-deep: #222b27;
  --text: #e6edea;
  --text-muted: #93a39d;
  --accent: #34c79b;
  --border: #2a3430;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* ============ 基础重置 ============ */
.d2fcd2-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

.d2fcd2-body *, .d2fcd2-body *::before, .d2fcd2-body *::after {
  box-sizing: border-box;
}

.d2fcd2-body a { color: var(--accent); text-decoration: none; }
.d2fcd2-body a:hover { opacity: 0.75; }
.d2fcd2-body img { max-width: 100%; height: auto; display: block; }

.d2fcd2-body h1, .d2fcd2-body h2, .d2fcd2-body h3,
.d2fcd2-body h4, .d2fcd2-body h5, .d2fcd2-body h6 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.d2fcd2-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ============ 页首 Header（现代极简） ============ */
.d2fcd2-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.d2fcd2-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.d2fcd2-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.d2fcd2-logo a { color: var(--text); display: flex; align-items: center; gap: 9px; }
.d2fcd2-logo a:hover { opacity: 1; }

.d2fcd2-logo-mark {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* 中间分类导航 */
.d2fcd2-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
}

.d2fcd2-nav a {
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.d2fcd2-nav a:hover { color: var(--accent); opacity: 1; }

/* 右侧操作 */
.d2fcd2-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.d2fcd2-icon-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

.d2fcd2-icon-btn:hover { border-color: var(--border); opacity: 1; }

/* 搜索面板 */
.d2fcd2-search-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 28px;
  z-index: 200;
  display: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.d2fcd2-search-panel.d2fcd2-open { display: block; }

.d2fcd2-search-panel form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.d2fcd2-search-panel input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  outline: none;
}

.d2fcd2-search-panel input[type="search"]:focus { border-color: var(--accent); }

.d2fcd2-search-panel button {
  background: var(--text);
  color: var(--bg);
  border: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.d2fcd2-search-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

/* ============ 文章卡片（样式 C） ============ */
.d2fcd2-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  min-height: 220px;
  display: block;
}

.d2fcd2-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.d2fcd2-card:hover .d2fcd2-card-bg { transform: scale(1.05); }

.d2fcd2-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,24,22,0.02) 0%, rgba(18,24,22,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.d2fcd2-card-cat {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #fff;
  background: var(--accent);
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.d2fcd2-card-title {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.d2fcd2-card-title a { color: #fff; }

.d2fcd2-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

/* 文章元数据（作者头像 + 名字 + 日期，无阅读时长） */
.d2fcd2-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

.d2fcd2-meta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.d2fcd2-meta-group { display: flex; align-items: center; gap: 8px; }
.d2fcd2-meta-name { color: var(--text); font-weight: 600; }
.d2fcd2-meta-sep { color: var(--border); }

/* ============ 归档/索引页 ============ */
.d2fcd2-page-head {
  padding: 60px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.d2fcd2-page-head h1 { font-size: 40px; letter-spacing: -0.03em; margin-bottom: 10px; }
.d2fcd2-page-desc { color: var(--text-muted); max-width: 640px; }

.d2fcd2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 60px;
}

.d2fcd2-grid .d2fcd2-card { min-height: 260px; }

/* ============ 单篇文章页（纯文字长文，无特色图） ============ */
.d2fcd2-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 70px 0 80px;
}

.d2fcd2-article-header { margin-bottom: 44px; }

.d2fcd2-article-header h1 {
  font-size: 44px;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.d2fcd2-article-content {
  font-size: 19px;
  line-height: 1.9;
  color: var(--text);
}

.d2fcd2-article-content p { margin: 0 0 1.6em; }

.d2fcd2-article-content h2 {
  font-size: 26px;
  margin: 1.8em 0 0.7em;
  letter-spacing: -0.02em;
}

.d2fcd2-article-content h3 { font-size: 21px; margin: 1.5em 0 0.5em; }
.d2fcd2-article-content a { text-decoration: underline; text-underline-offset: 3px; }

.d2fcd2-article-tags {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.d2fcd2-article-tags a {
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 5px 13px;
  border-radius: 2px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.d2fcd2-article-tags a:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* ============ 页脚（订阅型） ============ */
.d2fcd2-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.d2fcd2-footer-subscribe {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.d2fcd2-footer-subscribe h3 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.d2fcd2-footer-subscribe p {
  color: var(--text-muted);
  margin: 0 0 24px;
}

.d2fcd2-subscribe-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.d2fcd2-subscribe-form input[type="email"] {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 13px 16px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  outline: none;
}

.d2fcd2-subscribe-form input[type="email"]:focus { border-color: var(--accent); }

.d2fcd2-subscribe-form button {
  background: var(--text);
  color: var(--bg);
  border: none;
  font-family: var(--font-head);
  font-weight: 600;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.d2fcd2-footer-cols {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 28px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.d2fcd2-footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.d2fcd2-footer-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 10px;
  display: block;
}

.d2fcd2-footer-mission { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.d2fcd2-footer ul { list-style: none; margin: 0; padding: 0; }
.d2fcd2-footer ul li { margin-bottom: 10px; }
.d2fcd2-footer ul li a { color: var(--text-muted); font-size: 14px; }
.d2fcd2-footer ul li a:hover { color: var(--accent); opacity: 1; }

.d2fcd2-footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ 404 ============ */
.d2fcd2-404 { text-align: center; padding: 120px 24px; }
.d2fcd2-404 h1 { font-size: 96px; letter-spacing: -0.04em; color: var(--accent); margin-bottom: 0; }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .d2fcd2-grid { grid-template-columns: repeat(2, 1fr); }
  .d2fcd2-nav { display: none; }
  .d2fcd2-header-inner { grid-template-columns: 1fr auto; }
}

@media (max-width: 640px) {
  .d2fcd2-grid { grid-template-columns: 1fr; }
  .d2fcd2-article-header h1 { font-size: 32px; }
  .d2fcd2-footer-cols { grid-template-columns: 1fr; }
  .d2fcd2-page-head h1 { font-size: 28px; }
}
