/* ==========================================
   nbjz.hub123.cn - 奶爸教资导航 样式
   风格：清爽 · 粉笔感 · 浅蓝白
   不动框架，只改视觉
   ========================================== */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色：明亮天蓝，替代原来的深海蓝 */
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;

  /* 强调色：活力橙，更柔和 */
  --orange: #f97316;
  --orange-light: #fff7ed;
  --orange-dark: #ea580c;

  /* 中性色 */
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-hover: 0 10px 25px -5px rgba(59,130,246,0.10), 0 4px 6px -2px rgba(0,0,0,0.03);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 58px;
  --max-width: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }
img { max-width: 100%; }
ul { list-style: none; }

/* ---------- Container ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Header：改成浅蓝白清爽风格 ---------- */
.header {
  background: linear-gradient(180deg, #ffffff 0%, var(--blue-soft) 100%);
  color: var(--text);
  padding: 48px 0 36px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--blue-border);
}
.header::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.header-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.header-brand h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
}
.header-brand .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-border);
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 600;
}

/* 考试倒计时 */
.countdown-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.countdown-card {
  background: var(--bg-card);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
  box-shadow: var(--shadow);
}
.countdown-card .num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  min-width: 36px;
  text-align: center;
}

/* 搜索框 */
.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto 24px;
}
.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
.search-box .icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.5;
}

/* 直播 Banner */
.live-banner {
  background: linear-gradient(90deg, var(--orange) 0%, #fb923c 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: 0 6px 20px rgba(249,115,22,0.22);
  cursor: pointer;
  transition: all 0.2s;
}
.live-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.28);
}
.live-banner .dot {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Sticky Nav ---------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.nav-links {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 50px;
  transition: all 0.2s;
}
.nav-links a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
.nav-links a.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

/* 汉堡按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: var(--blue-soft);
  border: none;
  border-radius: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--blue);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* 移动端抽屉 */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  z-index: 99;
  padding: 16px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.2s;
}
.mobile-drawer a:hover,
.mobile-drawer a:active { background: var(--blue-soft); color: var(--blue); }

/* ---------- Section ---------- */
.section {
  padding: 44px 0;
}
.section-header {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.section-header h2 .icon { margin-right: 6px; }
.section-header .desc {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 400;
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card-title {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title a {
  color: var(--text);
  text-decoration: none;
}
.card-title a:hover { color: var(--blue); }
.card-desc {
  font-size: 0.86rem;
  color: var(--text-light);
  line-height: 1.55;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
}
.tag-official { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag-free { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tag-paid { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tag-tested { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tag-app { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.tag-avoid { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.tag-experience { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.tag-placeholder { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.tag-douyin { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.tag-weibo { background: #fff1f2; color: #9d174d; border-color: #fbcfe8; }
.tag-bilibili { background: #ecfeff; color: #0891b2; border-color: #a5f3fc; }
.tag-freebie { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.tag-wechat { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* 占位卡片 */
.card-placeholder { opacity: 0.65; background: #fbfcfd; }
.card-placeholder:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }

/* 卡片隐藏（搜索过滤） */
.card.hidden { display: none; }
.section.hidden { display: none; }

/* ---------- Footer ---------- */
.footer {
  background: #ffffff;
  color: var(--text-light);
  padding: 44px 0;
  text-align: center;
  font-size: 0.86rem;
  line-height: 2;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--blue); font-weight: 500; }
.footer a:hover { color: var(--orange); }
.footer .icp { margin-top: 10px; color: var(--text-muted); }

/* ---------- 搜索无结果 ---------- */
.no-result {
  display: none;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
}
.no-result.show { display: block; }
.no-result .emoji { font-size: 3rem; margin-bottom: 12px; }

/* ---------- 直播底部区（main.js 动态插入） ---------- */
#live-bottom {
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 100%);
  padding: 50px 0;
}
#live-bottom .section-header { justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .header { padding: 36px 0 28px; }
  .header-brand h1 { font-size: 1.7rem; }
  .header-brand .badge { font-size: 0.78rem; padding: 5px 12px; }

  .countdown-bar { gap: 10px; }
  .countdown-card { font-size: 0.8rem; padding: 10px 16px; }
  .countdown-card .num { font-size: 1.25rem; min-width: 30px; }

  .search-box { max-width: 100%; }
  .search-box input { font-size: 0.92rem; padding: 12px 16px 12px 44px; }

  .live-banner {
    font-size: 0.86rem;
    padding: 12px 18px;
    width: 90%;
    max-width: 360px;
    justify-content: center;
  }

  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-drawer { display: block; }

  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 18px; }
  .section { padding: 32px 0; }
  .section-header { gap: 6px; }
  .section-header h2 { font-size: 1.2rem; }
  .section-header .desc { font-size: 0.82rem; }

  .footer { padding: 32px 0; font-size: 0.82rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================
   详情弹窗（奶爸介绍 + 考友点评）
   ========================================== */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 40px 16px;
  overflow-y: auto;
}
.detail-overlay.open { display: flex; }

.detail-modal {
  position: relative;
  background: var(--bg-card);
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -10px rgba(37, 99, 235, 0.25);
  padding: 32px 28px 36px;
  animation: detailPop .22s ease;
}
@keyframes detailPop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s;
}
.detail-close:hover { background: var(--blue); color: #fff; }

.detail-head h2 {
  margin: 0 8px 10px 0;
  font-size: 1.4rem;
  color: var(--text);
  padding-right: 30px;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.detail-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
}
.detail-content {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.85;
}
.detail-content h3 {
  font-size: 1.05rem;
  color: var(--blue);
  margin: 18px 0 8px;
}
.detail-content p { margin: 0 0 12px; }
.detail-content b { color: var(--text); }
.detail-content ul, .detail-content ol { margin: 0 0 12px; padding-left: 22px; }
.detail-content li { margin-bottom: 6px; }

.detail-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 22px;
  padding: 11px 22px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all .15s;
}
.detail-visit:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow-hover); }

/* 点评区 */
.detail-comments { border-top: 1px solid var(--line, #e6edf6); padding-top: 20px; margin-top: 4px; }
.detail-comments h3 { font-size: 1.05rem; color: var(--text); margin: 0 0 14px; }
.detail-comments h3 small { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; min-height: 10px; }
.comment-item {
  background: var(--bg, #f8fafc);
  border: 1px solid var(--line, #e6edf6);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.comment-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.comment-nick { font-weight: 600; color: var(--blue); font-size: 0.9rem; }
.comment-date { color: var(--text-muted); font-size: 0.75rem; }
.comment-body { color: var(--text); font-size: 0.9rem; line-height: 1.7; word-break: break-word; }
.comment-empty, .comment-loading { color: var(--text-muted); font-size: 0.88rem; padding: 6px 2px; }

.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--line, #e6edf6);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.comment-form textarea { resize: vertical; min-height: 78px; }
.comment-form button {
  align-self: flex-end;
  border: none;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 10px 26px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all .15s;
}
.comment-form button:hover { background: var(--blue-dark); }
.comment-form button:disabled { opacity: .6; cursor: default; }
.comment-tip { color: var(--blue); font-size: 0.82rem; min-height: 16px; margin: 0; }

/* 卡片详情标记 */
.card-detail { cursor: pointer; }
.card-detail:hover .card-title-link { color: var(--blue); }
.card-title-link { color: var(--text); font-weight: 600; }
.detail-arrow { color: var(--blue); font-weight: 700; }

@media (max-width: 768px) {
  .detail-overlay { padding: 0; }
  .detail-modal {
    max-width: 100%;
    min-height: 100%;
    border-radius: 0;
    padding: 26px 18px 32px;
  }
  .detail-head h2 { font-size: 1.25rem; }
}
