/* ============== 华创网 资源站 自定义样式 ============== */

/* 全局 */
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }

/* 文字截断 */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 渐变背景 */
.bg-brand-gradient { background: linear-gradient(135deg, #0c1e3e 0%, #1e3a8a 50%, #f59e0b 100%); }
.bg-gold-gradient  { background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #b45309 100%); }

/* 头部品牌色 */
.bg-brand-blue   { background-color: #0c1e3e; }
.text-brand-blue { color: #0c1e3e; }
.text-brand-gold { color: #f59e0b; }

/* 阴影 */
.shadow-card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.shadow-card-hover { box-shadow: 0 8px 24px rgba(0,0,0,0.10); }

/* 卡片悬浮效果 */
.card-hover { transition: all 0.25s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.10); }

/* 移动端底部 Tab 栏预留 */
@media (max-width: 768px) {
  body { padding-bottom: 64px; }
  .pc-only { display: none !important; }
}
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

/* 右下悬浮按钮 */
.floating-actions {
  position: fixed;
  right: 12px;
  bottom: 80px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 769px) {
  .floating-actions { right: 24px; bottom: 24px; }
}
.floating-actions a {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.20);
  transition: transform 0.2s;
}
.floating-actions a:hover { transform: scale(1.08); }
.floating-actions a span {
  position: absolute;
  right: 60px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.floating-actions a:hover span { opacity: 1; }

/* 表单输入统一 */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* 移动端头部搜索 */
.mobile-search-bar {
  background: linear-gradient(135deg, #0c1e3e, #1e3a8a);
  padding: 8px 12px 14px;
}

/* 详情页内容样式 */
.article-content { line-height: 1.8; color: #334155; }
.article-content h1, .article-content h2, .article-content h3 { font-weight: 800; margin: 1.2em 0 0.6em; color: #0c1e3e; }
.article-content h1 { font-size: 1.6em; }
.article-content h2 { font-size: 1.4em; }
.article-content h3 { font-size: 1.2em; }
.article-content p { margin: 0.8em 0; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 0.8em 0; }
.article-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article-content pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; overflow-x: auto; }
.article-content ul, .article-content ol { margin-left: 1.5em; }
.article-content li { margin: 0.3em 0; }
.article-content a { color: #f59e0b; text-decoration: underline; }
.article-content blockquote { border-left: 4px solid #f59e0b; padding: 8px 12px; background: #fef3c7; color: #78350f; margin: 1em 0; }

/* 付费墙 */
.paywall {
  position: relative;
  margin-top: 2em;
  padding: 2em 1.5em;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px dashed #f59e0b;
  border-radius: 12px;
  text-align: center;
}
.paywall::before {
  content: '';
  position: absolute;
  top: -2em;
  left: 0; right: 0;
  height: 4em;
  background: linear-gradient(to bottom, transparent, #fef3c7);
  pointer-events: none;
}

/* 表格 */
.admin-table { font-size: 13px; }
.admin-table th { background: #f8fafc; color: #475569; }

/* 后台布局 */
.admin-sidebar {
  width: 220px;
  background: #0c1e3e;
  color: #cbd5e1;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  padding-top: 64px;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  color: #cbd5e1;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.admin-sidebar a.active { background: rgba(245,158,11,0.15); color: #f59e0b; border-left-color: #f59e0b; }
.admin-main { margin-left: 220px; padding: 20px 24px; }
@media (max-width: 768px) {
  .admin-sidebar { width: 100%; position: static; padding: 0; }
  .admin-main { margin-left: 0; padding: 12px; }
}
