/* =========================================================
   DaoEssence 工具系统样式（通栏下拉 / 类别卡 / 精选 / 页脚）
   视觉严格继承站点浅色语言：
     底 = 米黄 #F5F0E6 / 卡片白 #FFF / 深褐字 #2C2416 / 金 #D4AF37
   不修改 styles.min.css；本文件独立挂载。
   ========================================================= */

/* 工具链接通用：live 可点 + coming 不可点，统一浅色主题 */
.tool-link {
  font-family: var(--font-body, sans-serif);
}
/* 活工具行尾的金色箭头（目录感，来自同类站调研） */
.mega-list .tool-link:not(.is-coming)::after,
.tool-card-list .tool-link:not(.is-coming)::after {
  content: '→';
  margin-left: auto;
  color: var(--accent-color, #D4AF37);
  opacity: 0.55;
  font-weight: 600;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.mega-list .tool-link:hover:not(.is-coming)::after,
.tool-card-list .tool-link:hover:not(.is-coming)::after {
  transform: translateX(3px);
  opacity: 1;
}

/* ---------- 1) 导航「工具」通栏面板（奶白底深字） ---------- */
.tools-mega {
  position: fixed;
  left: 0;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg-primary, #F5F0E6);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 18px 44px rgba(26, 22, 18, 0.18);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.tools-mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 36px;
}
.mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.mega-col-title {
  font-family: var(--font-display, Georgia, 'Times New Roman', serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text-primary, #2C2416);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}
.mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-list li {
  margin: 0;
}
.mega-list .tool-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text-secondary, #5A5040);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.18s ease, color 0.18s ease;
}
.mega-list .tool-link:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-color, #D4AF37);
}

/* 即将上线（不可点）统一样式 */
.tool-link.is-coming {
  color: var(--text-light, #8B8070);
  cursor: default;
  background: none;
}
.tool-link.is-coming:hover {
  background: none;
  color: var(--text-light, #8B8070);
}
.coming-badge {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-color, #D4AF37);
  white-space: nowrap;
}

/* ---------- 2) 首页三张类别卡内的工具目录（深字，修正隐身） ---------- */
.tool-card-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  text-align: left;
}
.tool-card-list li {
  margin: 0;
}
.tool-card-list .tool-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  color: var(--text-primary, #2C2416);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  transition: color 0.18s ease, padding 0.18s ease, background 0.18s ease;
}
.tool-card-list .tool-link:hover {
  color: var(--accent-color, #D4AF37);
  padding-left: 8px;
  background: rgba(212, 175, 55, 0.06);
}
.tool-card-list .tool-link.is-coming {
  color: var(--text-light, #8B8070);
  border-bottom-color: transparent;
  background: none;
  padding-left: 4px;
}
.tool-card-list .tool-link.is-coming:hover {
  padding-left: 4px;
}
/* 「即将推出」预告分组小标题 */
.tool-card-coming-sep {
  margin-top: 10px;
  padding-top: 2px;
}
.tool-card-coming-sep span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color, #D4AF37);
  opacity: 0.75;
}

/* 广告位卡片（继承 .service-card 奶白底，叠加金色虚线边框） */
.ad-card {
  position: relative;
  border: 1px dashed rgba(212, 175, 55, 0.45) !important;
  background: var(--bg-accent, #F8F4ED) !important;
}
.ad-flag {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-color, #D4AF37);
}

/* ---------- 4) 页脚工具链接（深色底，跟随登记表含即将上线） ---------- */
/* 页脚 .footer{background:var(--bg-dark)}，链接色 rgba(245,240,230,0.7)。
   即将上线项用 span.footer-link-soon 占位，配色比 live 链接更灰、不可点。 */
#footer-tool-links .footer-link-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(245, 240, 230, 0.7);
  cursor: default;
  font-size: 0.9rem;
  line-height: 1.5;
}
/* 复用 .coming-badge：金边金字在深色页脚上本就可见，仅收紧间距避免换行 */
#footer-tool-links .footer-link-soon .coming-badge {
  margin-left: 2px;
  padding: 1px 6px;
  font-size: 0.58rem;
}

/* 页脚工具区（方案A 通栏三栏）的样式已统一抽到 /footer-tools.css（全站单一事实源）。
   此处只保留 #footer-tool-links 作用域下的极小覆盖，避免与本文件导航样式冲突；
   其余 .footer-* / .footer-tools-row 规则一律由 footer-tools.css 提供，勿在此重复定义。 */

/* ---------- 5) 响应式 ---------- */
@media (max-width: 768px) {
  .tools-mega {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .tools-mega.is-open {
    display: block;
  }
  .mega-inner {
    padding: 8px 0 12px;
  }
  .mega-cols {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ===== Daily Fortune (今日运势 B module) — dark gold ===== */
.daily-fortune {
  padding: calc(4rem + 50px) 0; /* 背景区上下各留 114px 间距（对称） */
  background: #0B0E18;
  position: relative;
  overflow: hidden;
}
/* 国学元素：星盘/罗盘水印 + 星点（神秘玄学意象，契合运势/黄历的天象主题） */
.daily-fortune::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('images/home/df-luopan.svg'), url('images/home/df-stars.svg');
  background-position: center center, 0 0;
  background-size: 1700px 1700px, 300px 300px;
  background-repeat: no-repeat, repeat;
}
/* 版块标题（与首页其他版块一致；深色底需浅色文字） */
.daily-fortune .section-header {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}
.daily-fortune .section-header h2 { color: #F5F0E6; }
.daily-fortune .section-header .subtitle { color: rgba(212,175,55,0.9); }
.daily-fortune .section-header p { color: rgba(245,240,230,0.6); }
.df-card {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(13,16,26,0.95), rgba(20,16,30,0.95));
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 18px;
  padding: 2.2rem 2rem 2rem;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.04), 0 30px 80px rgba(0,0,0,0.55);
  overflow: hidden;
}
.df-card::before {
  content: '';
  position: absolute;
  top: -45%; left: 50%;
  width: 540px; height: 540px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212,175,55,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.df-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.df-eyebrow {
  margin: 0 0 0.45rem;
  color: #D4AF37;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.df-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', 'SimSun', 'STSong', serif;
  color: #F5F0E6;
  font-size: 1.55rem;
  font-weight: 500;
}
.df-date {
  margin: 0;
  color: rgba(245,240,230,0.55);
  font-size: 0.85rem;
}
.df-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.7rem;
}
/* 加载占位骨架：数据到达前先撑起 12 格，避免出现空白或高度跳动 */
.df-skel {
  display: block;
  height: 141px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,55,0.10);
  animation: dfSkelPulse 1.5s ease-in-out infinite;
}
@keyframes dfSkelPulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.95; }
}
.df-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 0.3rem 0.7rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,55,0.14);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.df-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.6);
  background: rgba(212,175,55,0.06);
}
.df-imgwrap {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(212,175,55,0.08);
}
.df-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  filter: saturate(1.03);
}
.df-ph { color: #F5F0E6; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.df-name {
  color: #F5F0E6;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
}
.df-name small { color: rgba(245,240,230,0.45); font-size: 0.58rem; letter-spacing: 0.05em; text-transform: uppercase; }
.df-level { font-size: 0.72rem; font-weight: 500; }
.df-level.best { color: #D4AF37; }
.df-level.good { color: #5DCAA5; }
.df-level.flat { color: #EF9F27; }
.df-level.bad  { color: #E24B4A; }
.df-almanac {
  position: relative;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin: 1.6rem 0 0;
  padding: 1rem 1.2rem;
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 12px;
}
/* 黄历内容尚未渲染时不要显示空框 */
.df-almanac:empty { display: none; }
.df-al { display: flex; align-items: baseline; gap: 0.5rem; }
.df-al-k {
  color: #D4AF37; font-weight: 500; font-size: 0.82rem;
  border: 1px solid rgba(212,175,55,0.4); border-radius: 4px; padding: 0 0.35rem;
}
.df-al-k.bad { color: #E24B4A; border-color: rgba(226,75,74,0.4); }
.df-al-v { color: rgba(245,240,230,0.85); font-size: 0.88rem; }
.df-cta { position: relative; text-align: center; }
.df-link {
  color: #D4AF37; text-decoration: none; font-size: 0.95rem;
  border-bottom: 1px solid rgba(212,175,55,0.4); padding-bottom: 2px;
}
.df-link:hover { color: #F5F0E6; }
@media (max-width: 760px) {
  .df-grid { grid-template-columns: repeat(4, 1fr); }
  .df-title { font-size: 1.3rem; }
  .daily-fortune::after { background-size: 1100px 1100px, 240px 240px; }
}
@media (max-width: 460px) {
  .df-grid { grid-template-columns: repeat(3, 1fr); }
  .daily-fortune::after { background-size: 820px 820px, 200px 200px; }
}
