/* ============================================================
   news_coralreef -- 珊瑚礁蓝橙 主题样式
   小旋风蜘蛛池Pro2.96 新闻站模板 · 类名前缀 crf-
   配色: 珊瑚橙 #ff7657 / 礁石蓝 #2a6f97 / 浪花白 #f4faf9 / 深海军蓝 #1a3a4a
   ============================================================ */

:root {
  --crf-coral: #ff7657;
  --crf-coral-light: #ffb199;
  --crf-coral-dark: #e8592f;
  --crf-reef: #2a6f97;
  --crf-reef-light: #6fa8c9;
  --crf-reef-dark: #1d5372;
  --crf-foam: #f4faf9;
  --crf-white: #ffffff;
  --crf-ink: #1a3a4a;
  --crf-ink-soft: #4a6572;
  --crf-line: #dbeae8;
  --crf-radius: 18px;
  --crf-shadow: 0 4px 14px rgba(26, 58, 74, 0.08);
  --crf-shadow-hover: 0 12px 24px rgba(26, 58, 74, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.crf-body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
  background: var(--crf-foam);
  color: var(--crf-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--crf-coral); }

ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }

/* ------------------------------------------------------------
   顶部潮汐细线 + 页头
------------------------------------------------------------ */
.crf-tideline {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--crf-reef) 0%, var(--crf-reef-light) 25%, var(--crf-coral-light) 50%, var(--crf-coral) 75%, var(--crf-reef) 100%);
  background-size: 200% 100%;
  animation: crf-tideline-flow 8s linear infinite;
}
@keyframes crf-tideline-flow {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.crf-header {
  background: var(--crf-white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(26, 58, 74, 0.06);
}
.crf-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.crf-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.crf-brand-logo { max-height: 46px; width: auto; }

/* 导航 */
.crf-nav-toggle-input { display: none; }
.crf-nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.crf-nav-toggle-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--crf-ink);
  border-radius: 2px;
}

.crf-nav-list {
  display: flex;
  align-items: center;
}
.crf-nav-item { position: relative; display: flex; align-items: center; }
.crf-nav-item:not(:last-child)::after {
  content: "\2022";
  margin: 0 14px;
  font-size: 14px;
  color: var(--crf-coral-light);
}
.crf-nav-item:nth-child(even):not(:last-child)::after { color: var(--crf-reef-light); }

.crf-nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--crf-ink);
  white-space: nowrap;
}
/* 珊瑚枝干分叉 hover 装饰,替代常规下划线 */
.crf-nav-link::before,
.crf-nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 11px;
  height: 2px;
  background: var(--crf-coral);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.crf-nav-link::before { transform: translate(-100%, 0) rotate(24deg); transform-origin: right center; }
.crf-nav-link::after { transform: translate(0, 0) rotate(-24deg); transform-origin: left center; }
.crf-nav-link:hover { color: var(--crf-coral-dark); }
.crf-nav-link:hover::before,
.crf-nav-link:hover::after { opacity: 1; }

/* ------------------------------------------------------------
   Hero + 波浪分割线
------------------------------------------------------------ */
.crf-hero {
  background: linear-gradient(135deg, var(--crf-reef) 0%, var(--crf-reef-dark) 55%, #164059 100%);
  padding: 56px 20px 70px;
}
.crf-hero-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.crf-hero-kicker {
  color: var(--crf-coral-light);
  letter-spacing: 3px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.crf-hero-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  /* 渐变文字: 必须先给兜底 color,再用 -webkit-text-fill-color 覆盖 */
  color: var(--crf-coral);
  background: linear-gradient(90deg, var(--crf-coral-light), var(--crf-coral) 45%, var(--crf-foam) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.crf-hero-desc { color: rgba(244, 250, 249, 0.85); font-size: 16px; }

.crf-wave {
  width: 100%;
  height: 34px;
  display: block;
}
.crf-wave--hero {
  background: linear-gradient(180deg, var(--crf-reef-dark), var(--crf-reef));
  clip-path: polygon(0% 0%, 100% 0%, 100% 40%, 92% 100%, 84% 40%, 76% 100%, 68% 40%, 60% 100%, 52% 40%, 44% 100%, 36% 40%, 28% 100%, 20% 40%, 12% 100%, 4% 40%, 0% 65%);
  margin-top: -1px;
}
.crf-wave--alt {
  background: linear-gradient(90deg, var(--crf-coral), var(--crf-reef));
  clip-path: polygon(0% 100%, 4% 35%, 8% 100%, 12% 35%, 16% 100%, 20% 35%, 24% 100%, 28% 35%, 32% 100%, 36% 35%, 40% 100%, 44% 35%, 48% 100%, 52% 35%, 56% 100%, 60% 35%, 64% 100%, 68% 35%, 72% 100%, 76% 35%, 80% 100%, 84% 35%, 88% 100%, 92% 35%, 96% 100%, 100% 35%, 100% 0%, 0% 0%);
  opacity: 0.85;
}
.crf-wave--foot {
  background: linear-gradient(90deg, var(--crf-reef-light), var(--crf-coral-light));
  clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 90% 20%, 80% 60%, 70% 20%, 60% 60%, 50% 20%, 40% 60%, 30% 20%, 20% 60%, 10% 20%, 0% 60%);
  opacity: 0.6;
}

/* ------------------------------------------------------------
   潮汐热榜(横向气泡卡片)
------------------------------------------------------------ */
.crf-tide { background: var(--crf-white); padding: 30px 20px 26px; }
.crf-tide-head {
  max-width: 1200px;
  margin: 0 auto 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.crf-tide-title { font-size: 22px; font-weight: 800; color: var(--crf-ink); }
.crf-tide-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--crf-white);
  background: var(--crf-coral);
  padding: 3px 10px;
  border-radius: 20px 20px 20px 4px;
}
.crf-tide-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.crf-tide-item {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--crf-foam);
  border: 1px solid var(--crf-line);
  border-radius: 14px;
  padding: 12px 14px;
}
.crf-tide-item:hover {
  border-color: var(--crf-coral);
  box-shadow: var(--crf-shadow);
  color: var(--crf-ink);
}
.crf-tide-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}
.crf-tide-item-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--crf-reef);
}

/* 气泡徽章: 珊瑚元素造型 border-radius 50% 50% 50% 0 */
.crf-bubble {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 30% 30%, var(--crf-coral-light), var(--crf-coral) 60%, var(--crf-reef) 140%);
}
.crf-bubble--sm { width: 16px; height: 16px; }
.crf-bubble--card {
  position: absolute;
  top: -12px;
  left: 20px;
  width: 32px;
  height: 32px;
  border: 3px solid var(--crf-white);
  box-shadow: 0 3px 8px rgba(26, 58, 74, 0.22);
}

/* ------------------------------------------------------------
   通用布局:左侧栏 + 右主区
------------------------------------------------------------ */
.crf-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px 60px;
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.crf-side { flex: 0 0 260px; width: 260px; }
.crf-side-card {
  background: var(--crf-white);
  border-radius: var(--crf-radius);
  box-shadow: var(--crf-shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.crf-side-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--crf-reef-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--crf-line);
}
.crf-side-list li { margin-bottom: 4px; }
.crf-side-list li a {
  display: block;
  padding: 7px 4px 7px 14px;
  font-size: 14px;
  color: var(--crf-ink-soft);
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
}
.crf-side-list li a:hover {
  color: var(--crf-coral-dark);
  border-left-color: var(--crf-coral);
  background: var(--crf-foam);
}
.crf-side-list--tight li a { font-size: 13.5px; padding: 5px 4px 5px 14px; }

.crf-main { flex: 1; min-width: 0; }
.crf-main-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.crf-main-title { font-size: 22px; font-weight: 800; color: var(--crf-ink); flex-shrink: 0; }
.crf-main-head-line {
  flex: 1;
  min-width: 0;
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--crf-coral-light) 0 8px, var(--crf-reef-light) 8px 16px);
  opacity: 0.35;
  border-radius: 4px;
}

/* ------------------------------------------------------------
   首页流式卡片网格 (auto-fill,非固定列)
------------------------------------------------------------ */
.crf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.crf-card {
  position: relative;
  background: var(--crf-white);
  border-radius: var(--crf-radius);
  box-shadow: var(--crf-shadow);
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.crf-card:hover { transform: translateY(-5px); box-shadow: var(--crf-shadow-hover); }
.crf-card-link {
  position: relative;
  display: block;
  padding: 28px 18px 18px;
  color: inherit;
}
.crf-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--crf-ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.crf-card-info {
  font-size: 13px;
  color: var(--crf-ink-soft);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.crf-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--crf-reef);
  border-top: 1px dashed var(--crf-line);
  padding-top: 10px;
}

/* ------------------------------------------------------------
   面包屑
------------------------------------------------------------ */
.crf-crumb { background: var(--crf-white); border-bottom: 1px solid var(--crf-line); }
.crf-crumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--crf-ink-soft);
  flex-wrap: nowrap;
}
.crf-crumb-inner a:hover { color: var(--crf-coral); }
.crf-crumb-sep { color: var(--crf-coral-light); flex-shrink: 0; }
.crf-crumb-current {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--crf-ink);
  font-weight: 700;
}

/* ------------------------------------------------------------
   列表页
------------------------------------------------------------ */
.crf-list-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--crf-white);
  border-radius: 14px;
  box-shadow: var(--crf-shadow);
  padding: 18px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.crf-list-item:hover { box-shadow: var(--crf-shadow-hover); transform: translateX(2px); }
.crf-list-score {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, var(--crf-coral), var(--crf-reef));
  color: var(--crf-white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crf-list-body { flex: 1; min-width: 0; }
.crf-list-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.crf-list-title a:hover { color: var(--crf-coral-dark); }
.crf-list-info {
  font-size: 13.5px;
  color: var(--crf-ink-soft);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.crf-list-meta { display: flex; gap: 18px; font-size: 12px; color: var(--crf-reef); }

.crf-pager { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.crf-pager-btn {
  padding: 8px 16px;
  border-radius: 50% 50% 50% 4px / 40% 40% 40% 4px;
  background: var(--crf-white);
  border: 1px solid var(--crf-line);
  font-size: 13.5px;
  color: var(--crf-ink-soft);
}
.crf-pager-btn:hover { background: var(--crf-coral); border-color: var(--crf-coral); color: var(--crf-white); }

/* ------------------------------------------------------------
   文章详情页
------------------------------------------------------------ */
.crf-article {
  background: var(--crf-white);
  border-radius: var(--crf-radius);
  box-shadow: var(--crf-shadow);
  padding: 32px 30px;
  margin-bottom: 24px;
}
.crf-article-head { border-bottom: 2px dashed var(--crf-line); padding-bottom: 16px; margin-bottom: 20px; }
.crf-article-title { font-size: 26px; font-weight: 800; color: var(--crf-ink); margin-bottom: 12px; }
.crf-article-meta { font-size: 13px; color: var(--crf-reef); }
.crf-article-body { font-size: 16px; color: var(--crf-ink); line-height: 1.9; }
.crf-article-body img { border-radius: 10px; margin: 12px 0; }
.crf-article-body p { margin-bottom: 16px; }

.crf-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.crf-prevnext-item {
  background: var(--crf-white);
  border-radius: 14px;
  box-shadow: var(--crf-shadow);
  padding: 14px 18px;
  min-width: 0;
}
.crf-prevnext-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--crf-coral);
  margin-bottom: 6px;
}
.crf-prevnext-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: var(--crf-ink-soft);
}
.crf-prevnext-link:hover { color: var(--crf-coral-dark); }

/* ------------------------------------------------------------
   页脚
------------------------------------------------------------ */
.crf-footer { background: var(--crf-ink); color: rgba(244, 250, 249, 0.8); position: relative; }
.crf-wave--footer {
  background: linear-gradient(90deg, var(--crf-reef), var(--crf-coral));
  clip-path: polygon(0% 100%, 6% 30%, 12% 100%, 18% 30%, 24% 100%, 30% 30%, 36% 100%, 42% 30%, 48% 100%, 54% 30%, 60% 100%, 66% 30%, 72% 100%, 78% 30%, 84% 100%, 90% 30%, 96% 100%, 100% 30%, 100% 0%, 0% 0%);
}
.crf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px;
}
.crf-footer-brand { max-width: 280px; }
.crf-footer-logo { max-height: 40px; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: 0.9; }
.crf-footer-desc { font-size: 13px; color: rgba(244, 250, 249, 0.65); }
.crf-footer-title { font-size: 14px; font-weight: 700; color: var(--crf-coral-light); margin-bottom: 14px; }
.crf-footer-list li { margin-bottom: 9px; }
.crf-footer-list li a { font-size: 13px; color: rgba(244, 250, 249, 0.72); }
.crf-footer-list li a:hover { color: var(--crf-coral-light); }
.crf-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 26px;
  border-top: 1px solid rgba(244, 250, 249, 0.12);
  font-size: 12.5px;
  color: rgba(244, 250, 249, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* ------------------------------------------------------------
   响应式断点: ~1024 / ~768(导航收起) / ~480
------------------------------------------------------------ */
@media (max-width: 1024px) {
  .crf-layout { flex-direction: column; }
  .crf-side { flex: 1 1 auto; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
  .crf-side-card { margin-bottom: 0; }
  .crf-hero-title { font-size: 34px; }
  .crf-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 768px) {
  .crf-nav-toggle-btn { display: flex; }
  .crf-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--crf-white);
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 10px 18px rgba(26, 58, 74, 0.12);
    transition: max-height 0.3s ease;
  }
  .crf-nav-list { flex-direction: column; align-items: flex-start; padding: 6px 20px; }
  .crf-nav-item { width: 100%; padding: 8px 0; }
  .crf-nav-item:not(:last-child)::after { display: none; }
  .crf-nav-item:not(:last-child) { border-bottom: 1px dashed var(--crf-line); }
  .crf-nav-toggle-input:checked ~ .crf-nav { max-height: 480px; }

  .crf-side { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .crf-hero { padding: 40px 20px 54px; }
  .crf-hero-title { font-size: 28px; }
  .crf-tide-item { flex: 0 0 220px; }
  .crf-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .crf-article { padding: 24px 18px; }
  .crf-article-title { font-size: 21px; }
}

@media (max-width: 480px) {
  .crf-header-inner { min-height: 62px; }
  .crf-brand-logo { max-height: 38px; }
  .crf-hero { padding: 32px 16px 46px; }
  .crf-hero-title { font-size: 23px; }
  .crf-hero-desc { font-size: 14px; }
  .crf-layout { padding: 24px 14px 40px; gap: 20px; }
  .crf-side { grid-template-columns: 1fr; }
  .crf-grid { grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); gap: 14px; }
  .crf-card-link { padding: 24px 14px 14px; }
  .crf-list-item { flex-direction: column; }
  .crf-list-score { display: none; }
  .crf-prevnext { grid-template-columns: 1fr; }
  .crf-tide-item { flex: 0 0 200px; }
}
