/* 91网 - 品牌社区门户 主样式 */
:root {
  --primary: #1a6fc4;
  --primary-dark: #0d5ba8;
  --accent: #f47c20;
  --accent-dark: #d96b10;
  --bg: #f4f6f9;
  --card-bg: #fff;
  --text: #222;
  --text-muted: #666;
  --border: #e0e6ef;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26,111,196,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 12px;
  padding: 4px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #cce0ff; font-size: 12px; }
.top-bar a:hover { color: #fff; }

/* ===== HEADER ===== */
header {
  background: var(--primary);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-text .brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.logo-text .brand-sub {
  font-size: 11px;
  color: #cce0ff;
  letter-spacing: 1px;
}

/* NAV */
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}
nav.main-nav ul li a {
  display: block;
  padding: 6px 14px;
  color: #fff;
  font-size: 14px;
  border-radius: 5px;
  font-weight: 500;
  transition: background .2s;
}
nav.main-nav ul li a:hover,
nav.main-nav ul li a.active {
  background: var(--accent);
  color: #fff;
}

/* SEARCH BAR */
.search-bar {
  background: #1259a8;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.search-form {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 18px;
  font-size: 14px;
  background: transparent;
  color: #333;
}
.search-form button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s;
}
.search-form button:hover { background: var(--accent-dark); }
.search-tips {
  text-align: center;
  margin-top: 6px;
  font-size: 12px;
  color: #cce0ff;
}
.search-tips span {
  display: inline-block;
  margin: 0 6px;
  cursor: pointer;
  transition: color .2s;
}
.search-tips span:hover { color: #fff; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  padding: 20px 0;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}
.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.section-header .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}
.section-header .more-link {
  font-size: 13px;
  color: var(--primary);
  white-space: nowrap;
}
.section-header .more-link:hover { color: var(--accent); }

/* ===== BANNER SLIDER ===== */
.banner-section { margin-bottom: 20px; }
.banner-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/6;
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s;
}
.banner-slide.active { opacity: 1; }
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  padding: 20px 20px 14px;
}
.banner-caption h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.banner-caption p { font-size: 13px; opacity: .85; }
.banner-dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
}
.banner-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background .2s;
}
.banner-dots span.active { background: var(--accent); }

/* ===== CARD ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26,111,196,0.14);
}

/* ===== VIDEO CARD ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.video-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26,111,196,0.16);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #1a1a2e;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity .25s;
}
.video-card:hover .play-btn { opacity: 1; }
.play-btn svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
}
.video-info { padding: 10px 12px 12px; }
.video-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.video-meta .views { display: flex; align-items: center; gap: 3px; }
.video-meta .likes { display: flex; align-items: center; gap: 3px; color: var(--accent); }
.video-author { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

/* ===== NEWS LIST ===== */
.news-list { list-style: none; }
.news-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.news-list li:last-child { border-bottom: none; }
.news-list .news-img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}
.news-list .news-content { flex: 1; }
.news-list .news-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.news-list .news-content h4:hover { color: var(--primary); cursor: pointer; }
.news-list .news-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.tag-video { background: #fff3e0; color: var(--accent); }
.tag-article { background: #e3f0ff; color: var(--primary); }
.tag-hot { background: #ffe0e0; color: #e53e3e; }

/* ===== AUTHOR CARDS ===== */
.author-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.author-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  text-align: center;
  transition: transform .2s;
}
.author-card:hover { transform: translateY(-3px); }
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 10px;
}
.author-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.author-card .fans { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.author-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.btn-follow {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  transition: background .2s;
}
.btn-follow:hover { background: var(--accent); }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sidebar-card-header {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
}
.sidebar-card-body { padding: 14px 16px; }
.hot-list { list-style: none; }
.hot-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.hot-list li:last-child { border-bottom: none; }
.hot-rank {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.hot-rank.top1 { background: #e53e3e; color: #fff; }
.hot-rank.top2 { background: var(--accent); color: #fff; }
.hot-rank.top3 { background: #ecc94b; color: #fff; }
.hot-list li a { color: var(--text); flex: 1; }
.hot-list li a:hover { color: var(--primary); }
.hot-views { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ===== FAQ ===== */
.faq-section { margin-bottom: 24px; }
.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background .2s;
}
.faq-question:hover { background: #f0f6ff; }
.faq-question.open { color: var(--primary); background: #f0f6ff; }
.faq-question .faq-icon {
  font-size: 18px;
  color: var(--primary);
  transition: transform .3s;
  flex-shrink: 0;
}
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 18px 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ===== COMMENTS ===== */
.comments-section { margin-bottom: 24px; }
.comment-list { list-style: none; }
.comment-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-user { font-size: 14px; font-weight: 600; color: var(--primary); }
.comment-time { font-size: 12px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.comment-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.comment-actions span {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: color .2s;
}
.comment-actions span:hover { color: var(--accent); }

/* ===== TOPIC CARDS ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.topic-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s;
}
.topic-card:hover { transform: translateY(-3px); }
.topic-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.topic-card-body { padding: 12px 14px; }
.topic-card-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.topic-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.topic-meta { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }

/* ===== FOOTER ===== */
footer {
  background: #0d1b2e;
  color: #aab8cc;
  margin-top: 40px;
}
.footer-top {
  padding: 40px 0 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .logo-text .brand-name { color: #fff; font-size: 20px; }
.footer-brand .logo-text .brand-sub { color: #7a9cc4; }
.footer-desc {
  font-size: 13px;
  color: #7a9cc4;
  margin-top: 12px;
  line-height: 1.7;
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #7a9cc4; font-size: 13px; transition: color .2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #1e3050;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #4a6a8a;
}
.footer-bottom a { color: #4a6a8a; }
.footer-bottom a:hover { color: var(--accent); }
.footer-logo-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== NOTICE BAR ===== */
.notice-bar {
  background: #fff8e1;
  border-bottom: 1px solid #ffe082;
  padding: 8px 0;
  font-size: 13px;
  color: #8a6200;
}
.notice-bar .notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice-bar .notice-label {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.notice-bar .notice-scroll { flex: 1; overflow: hidden; }

/* ===== HERO STATS ===== */
.hero-stats {
  background: linear-gradient(135deg, var(--primary), #0d5ba8);
  color: #fff;
  padding: 20px 0;
  margin-bottom: 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 10px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 13px; color: #cce0ff; margin-top: 4px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: all .2s;
}
.pagination a:hover, .pagination a.active {
  background: var(--primary);
  color: #fff;
}

/* ===== INTERACTION BAR ===== */
.interaction-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.interaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all .2s;
}
.interaction-btn:hover { border-color: var(--primary); color: var(--primary); }
.interaction-btn.liked { color: var(--accent); border-color: var(--accent); }

/* ===== INNER PAGE ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), #1259a8);
  color: #fff;
  padding: 40px 0 30px;
  margin-bottom: 24px;
}
.page-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.page-hero p { font-size: 15px; color: #cce0ff; }

/* ===== FORM ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: var(--card-bg);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .author-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 8px; }
  nav.main-nav ul { flex-wrap: wrap; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .topic-grid { grid-template-columns: 1fr 1fr; }
  .author-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-slider { aspect-ratio: 16/8; }
}
