/* ============================================
   60_Apple_Newsroom - 苹果新闻室风格论坛
   ============================================ */

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

:root {
  --an2-black: #1D1D1F;
  --an2-blue: #007AFF;
  --an2-bg: #FFFFFF;
  --an2-surface: #F5F5F7;
  --an2-text: #1D1D1F;
  --an2-text-secondary: #86868B;
  --an2-border: #D2D2D7;
  --an2-radius: 12px;
  --an2-radius-lg: 20px;
  --an2-serif: Georgia, "Times New Roman", "Noto Serif SC", serif;
  --an2-sans: -apple-system, "SF Pro Display", "Noto Sans SC", sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--an2-sans);
  background: var(--an2-bg); color: var(--an2-text); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--an2-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---- Navigation ---- */
.an2-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--an2-border);
}
.an2-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 52px;
}
.an2-nav-logo img { height: 28px; }
.an2-nav-menu { display: flex; gap: 2px; list-style: none; flex: 1; }
.an2-nav-menu a { display: block; padding: 6px 10px; font-size: 13px; color: var(--an2-text); border-radius: 6px; white-space: nowrap; }
.an2-nav-menu a:hover { background: var(--an2-surface); text-decoration: none; }
.an2-nav-search { position: relative; width: 180px; }
.an2-nav-search input { width: 100%; height: 32px; padding: 0 12px 0 32px; border: 1px solid var(--an2-border); border-radius: 8px; font-size: 13px; background: var(--an2-surface); outline: none; }
.an2-nav-search input:focus { border-color: var(--an2-blue); }
.an2-nav-search svg { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--an2-text-secondary); }
.an2-nav-user { display: flex; align-items: center; gap: 12px; }
.an2-nav-user img { width: 30px; height: 30px; border-radius: 50%; }
.an2-login-btn { padding: 6px 16px; font-size: 13px; font-weight: 600; background: var(--an2-black); color: #fff; border: none; border-radius: 16px; cursor: pointer; }

/* ---- Hero (Full-width image + title) ---- */
.an2-hero { width: 100%; position: relative; overflow: hidden; }
.an2-hero img { width: 100%; min-height: 400px; object-fit: cover; }
.an2-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 60px 24px 48px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.an2-hero-inner { max-width: 1200px; margin: 0 auto; }
.an2-hero-date { font-size: 13px; color: var(--an2-blue); font-weight: 600; }
.an2-hero-title { font-family: var(--an2-serif); font-size: 42px; font-weight: 700; color: #fff; margin-top: 8px; line-height: 1.2; }
.an2-hero-subtitle { font-size: 17px; color: #fff; opacity: 0.85; margin-top: 12px; }
.an2-hero-meta { font-size: 14px; color: var(--an2-blue); margin-top: 16px; }

/* ---- Main Layout ---- */
.an2-main { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px; padding: 40px 24px; }

/* ---- Date Group ---- */
.an2-date-group { margin-bottom: 40px; }
.an2-date-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.an2-date-header h2 { font-family: var(--an2-serif); font-size: 24px; font-weight: 700; }
.an2-date-header .an2-date-line { flex: 1; height: 1px; background: var(--an2-border); }

/* ---- News Card Grid (mixed text/image) ---- */
.an2-news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.an2-news-card { cursor: pointer; transition: transform .2s; }
.an2-news-card:hover { transform: translateY(-2px); }
.an2-news-card:hover .an2-news-title { color: var(--an2-blue); }
.an2-news-img { width: 100%; aspect-ratio: 16/10; border-radius: var(--an2-radius); overflow: hidden; margin-bottom: 12px; }
.an2-news-img img { width: 100%; height: 100%; object-fit: cover; }
.an2-news-category { font-size: 12px; color: var(--an2-blue); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.an2-news-title { font-family: var(--an2-serif); font-size: 20px; font-weight: 700; margin: 6px 0; line-height: 1.3; transition: color .2s; }
.an2-news-excerpt { font-size: 14px; color: var(--an2-text-secondary); line-height: 1.6; }
.an2-news-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--an2-text-secondary); }
.an2-news-meta .an2-read-time { display: flex; align-items: center; gap: 4px; }
.an2-news-meta svg { width: 12px; height: 12px; fill: currentColor; }

/* ---- Featured Card (large) ---- */
.an2-featured-card { grid-column: 1 / -1; display: flex; gap: 24px; }
.an2-featured-card .an2-news-img { flex: 1; aspect-ratio: 16/10; margin-bottom: 0; }
.an2-featured-card .an2-news-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.an2-featured-card .an2-news-title { font-size: 28px; }

/* ---- Sidebar ---- */
.an2-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 68px; align-self: start; min-width: 0; }
.an2-widget { background: var(--an2-surface); border-radius: var(--an2-radius); padding: 20px; }
.an2-widget h3 { font-family: var(--an2-serif); font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.an2-widget-list { list-style: none; }
.an2-widget-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 13px; line-height: 1.5; }
.an2-widget-list li:last-child { border-bottom: none; }
.an2-rank { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--an2-text-secondary); flex-shrink: 0; }
.an2-rank.r1 { background: var(--an2-black); }
.an2-rank.r2 { background: #86868B; }
.an2-rank.r3 { background: #86868B; opacity: .7; }
.an2-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.an2-tag { padding: 4px 12px; background: #fff; border-radius: 14px; font-size: 12px; color: var(--an2-blue); border: 1px solid var(--an2-border); }

/* ---- Breadcrumb ---- */
.an2-breadcrumb { max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; font-size: 13px; color: var(--an2-text-secondary); }
.an2-breadcrumb a { color: var(--an2-blue); }
.an2-breadcrumb span { margin: 0 6px; }

/* ---- Board Info ---- */
.an2-board-info { max-width: 1200px; margin: 0 auto; padding: 16px 24px 24px; border-bottom: 1px solid var(--an2-border); }
.an2-board-info h1 { font-family: var(--an2-serif); font-size: 32px; font-weight: 700; }
.an2-board-info p { font-size: 15px; color: var(--an2-text-secondary); margin-top: 6px; }
.an2-board-info-bar { display: flex; align-items: center; gap: 20px; margin-top: 16px; }
.an2-board-stat { font-size: 13px; color: var(--an2-text-secondary); }
.an2-board-stat strong { font-size: 18px; color: var(--an2-text); font-family: var(--an2-serif); }
.an2-btn-post { margin-left: auto; padding: 10px 24px; background: var(--an2-black); color: #fff; border: none; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }

/* ---- Post List ---- */
.an2-post-list { display: flex; flex-direction: column; gap: 0; }
.an2-post-item {
  display: flex; gap: 20px; padding: 24px 0;
  border-bottom: 1px solid var(--an2-border); cursor: pointer;
}
.an2-post-item:last-child { border-bottom: none; }
.an2-post-item:hover .an2-post-title { color: var(--an2-blue); }
.an2-post-thumb { width: 180px; height: 120px; border-radius: var(--an2-radius); overflow: hidden; flex-shrink: 0; }
.an2-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.an2-post-body { flex: 1; }
.an2-post-category { font-size: 12px; color: var(--an2-blue); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.an2-post-title { font-family: var(--an2-serif); font-size: 20px; font-weight: 700; margin: 6px 0; line-height: 1.3; transition: color .2s; }
.an2-post-excerpt { font-size: 14px; color: var(--an2-text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.an2-post-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--an2-text-secondary); }
.an2-post-meta .an2-read-time { display: flex; align-items: center; gap: 4px; }
.an2-post-meta svg { width: 12px; height: 12px; fill: currentColor; }

/* ---- Pagination ---- */
.an2-pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; }
.an2-pagination a, .an2-pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 8px; font-size: 13px;
  border: 1px solid var(--an2-border); color: var(--an2-text); background: #fff;
}
.an2-pagination a:hover { background: var(--an2-surface); text-decoration: none; }
.an2-pagination .active { background: var(--an2-black); color: #fff; border-color: var(--an2-black); }

/* ---- Detail Page (Article style) ---- */
.an2-article { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.an2-article-category { font-size: 13px; color: var(--an2-blue); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.an2-article-title { font-family: var(--an2-serif); font-size: 40px; font-weight: 700; margin: 12px 0; line-height: 1.2; }
.an2-article-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--an2-border); }
.an2-article-author { display: flex; align-items: center; gap: 10px; }
.an2-article-author img { width: 40px; height: 40px; border-radius: 50%; }
.an2-article-author-name { font-size: 14px; font-weight: 600; }
.an2-article-author-role { font-size: 12px; color: var(--an2-text-secondary); }
.an2-article-date { font-size: 13px; color: var(--an2-text-secondary); }
.an2-article-read-time { font-size: 13px; color: var(--an2-text-secondary); display: flex; align-items: center; gap: 4px; }
.an2-article-read-time svg { width: 14px; height: 14px; fill: currentColor; }

.an2-article-hero-img { width: 100%; border-radius: var(--an2-radius-lg); margin-bottom: 32px; overflow: hidden; }
.an2-article-hero-img img { width: 100%; }
.an2-article-content { font-size: 17px; line-height: 1.8; overflow: hidden; word-wrap: break-word; overflow-wrap: anywhere; }
.an2-article-content p { margin-bottom: 20px; }
.an2-article-content .an2-drop-cap::first-letter { font-family: var(--an2-serif); font-size: 56px; font-weight: 700; float: left; line-height: 1; margin-right: 8px; margin-top: 4px; }
.an2-article-images { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 24px 0; }
.an2-article-images img { border-radius: var(--an2-radius); aspect-ratio: 1; object-fit: cover; }
.an2-article-actions { display: flex; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--an2-border); }
.an2-article-actions button { display: flex; align-items: center; gap: 6px; padding: 8px 18px; border: 1px solid var(--an2-border); border-radius: 20px; background: #fff; cursor: pointer; font-size: 13px; color: var(--an2-text-secondary); }
.an2-article-actions button:hover { background: var(--an2-surface); }
.an2-article-actions svg { width: 16px; height: 16px; fill: currentColor; }

/* ---- Replies ---- */
.an2-replies { max-width: 800px; margin: 0 auto; padding: 0 24px 40px; }
.an2-replies h3 { font-family: var(--an2-serif); font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.an2-reply { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--an2-border); }
.an2-reply:last-child { border-bottom: none; }
.an2-reply img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.an2-reply-body { flex: 1; }
.an2-reply-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.an2-reply-name { font-size: 14px; font-weight: 600; }
.an2-reply-floor { font-size: 11px; color: var(--an2-text-secondary); }
.an2-reply-text { font-size: 15px; line-height: 1.7; }
.an2-reply-time { font-size: 12px; color: var(--an2-text-secondary); margin-top: 6px; }

/* ---- Reply Box ---- */
.an2-reply-box { max-width: 800px; margin: 0 auto; padding: 0 24px 40px; }
.an2-reply-box-inner { background: var(--an2-surface); border-radius: var(--an2-radius); padding: 20px; }
.an2-reply-box h3 { font-family: var(--an2-serif); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.an2-reply-box textarea { width: 100%; min-height: 100px; padding: 14px; border: 1px solid var(--an2-border); border-radius: var(--an2-radius); font-size: 15px; font-family: inherit; resize: vertical; background: #fff; outline: none; }
.an2-reply-box textarea:focus { border-color: var(--an2-blue); }
.an2-reply-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.an2-reply-actions button { padding: 8px 24px; background: var(--an2-black); color: #fff; border: none; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ---- Detail Sidebar ---- */
.an2-detail-sidebar { max-width: 300px; margin-left: auto; }
.an2-detail-layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 32px; padding: 0 24px 40px; }

/* ---- Search Page ---- */
.an2-search-page { max-width: 800px; margin: 0 auto; padding: 48px 24px; }
.an2-search-hero { text-align: center; margin-bottom: 32px; }
.an2-search-hero h1 { font-family: var(--an2-serif); font-size: 36px; font-weight: 700; margin-bottom: 20px; }
.an2-search-input-wrap { position: relative; margin-bottom: 24px; }
.an2-search-input-wrap input { width: 100%; height: 52px; padding: 0 16px 0 48px; border: 1px solid var(--an2-border); border-radius: 12px; font-size: 16px; background: var(--an2-surface); outline: none; }
.an2-search-input-wrap input:focus { border-color: var(--an2-blue); background: #fff; }
.an2-search-input-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; fill: var(--an2-text-secondary); }
.an2-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.an2-chip { padding: 6px 16px; border-radius: 18px; font-size: 13px; background: var(--an2-surface); color: var(--an2-text); cursor: pointer; }
.an2-chip.active { background: var(--an2-black); color: #fff; }
.an2-search-results { margin-top: 40px; }
.an2-search-results h2 { font-family: var(--an2-serif); font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.an2-search-result { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--an2-border); cursor: pointer; }
.an2-search-result:hover .an2-search-result-title { color: var(--an2-blue); }
.an2-search-result-thumb { width: 120px; height: 80px; border-radius: var(--an2-radius); overflow: hidden; flex-shrink: 0; }
.an2-search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.an2-search-result-body { flex: 1; }
.an2-search-result-cat { font-size: 12px; color: var(--an2-blue); font-weight: 600; text-transform: uppercase; }
.an2-search-result-title { font-family: var(--an2-serif); font-size: 18px; font-weight: 700; margin: 4px 0; transition: color .2s; }
.an2-search-result-excerpt { font-size: 14px; color: var(--an2-text-secondary); }
.an2-search-result-meta { font-size: 12px; color: var(--an2-text-secondary); margin-top: 6px; }
.an2-hot-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---- Footer ---- */
.an2-footer { background: var(--an2-surface); border-top: 1px solid var(--an2-border); padding: 40px 24px; }
.an2-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.an2-footer-links { display: flex; gap: 24px; }
.an2-footer-links a { font-size: 13px; color: var(--an2-text-secondary); }
.an2-footer-copy { font-size: 13px; color: var(--an2-text-secondary); font-family: var(--an2-serif); }

@media (max-width: 900px) {
  .an2-main, .an2-detail-layout { grid-template-columns: 1fr; }
  .an2-sidebar { position: static; }
  .an2-news-grid { grid-template-columns: 1fr; }
  .an2-featured-card { flex-direction: column; }
  .an2-nav-menu { display: none; }
  .an2-nav-search { width: auto; flex: 1; }
  .an2-hero-title { font-size: 28px; }
}

/* ============================================
   CMS Pagination & Comment Styles
   ============================================ */

/* ---- CMS Pagination (.jv-pagination) ---- */
.jv-pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; flex-wrap: wrap; }
.jv-pagination a, .jv-pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--an2-radius); font-size: 13px;
  border: 1px solid var(--an2-border); color: var(--an2-text); background: #fff;
  text-decoration: none;
}
.jv-pagination a:hover { background: var(--an2-surface); text-decoration: none; }
.jv-pagination .current { background: var(--an2-black); color: #fff; border-color: var(--an2-black); font-weight: 600; }
.jv-pagination .disabled { color: var(--an2-text-secondary); cursor: not-allowed; }

/* ---- Comment System (.comment-*) ---- */
.comment-item {
  display: flex; gap: 14px; padding: 20px 0;
  border-bottom: 1px solid var(--an2-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.comment-author { font-size: 14px; font-weight: 600; color: var(--an2-text); }
.comment-time { font-size: 11px; color: var(--an2-text-secondary); }
.comment-floor { font-size: 11px; color: var(--an2-text-secondary); }
.comment-content { font-size: 15px; line-height: 1.7; color: var(--an2-text); }
.comment-reply-btn {
  display: inline-block; margin-top: 8px; padding: 4px 12px;
  font-size: 12px; color: var(--an2-blue); background: var(--an2-surface);
  border: none; border-radius: 14px; cursor: pointer;
}
.comment-reply-btn:hover { background: var(--an2-border); }
.comment-reply-form {
  display: none; margin-top: 12px; padding: 12px;
  background: var(--an2-surface); border-radius: var(--an2-radius);
}
.comment-reply-input {
  width: 100%; min-height: 60px; padding: 10px;
  border: 1px solid var(--an2-border); border-radius: 8px;
  font-size: 14px; font-family: inherit; resize: vertical;
  background: #fff; outline: none;
}
.comment-reply-input:focus { border-color: var(--an2-blue); }
.comment-reply-submit {
  margin-top: 8px; padding: 6px 16px;
  background: var(--an2-black); color: #fff; border: none;
  border-radius: 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.comment-reply-submit:hover { opacity: 0.85; }
.comment-replies {
  margin-left: 58px; padding-left: 14px;
  border-left: 2px solid var(--an2-border);
}
.comment-replies .comment-item { padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }

/* ---- Force PC Detail Layout ---- */
.an2-detail-layout {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 280px !important;
  gap: 32px !important;
  align-items: start !important;
}
.an2-detail-layout > div:first-child {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
.an2-detail-layout > aside.an2-sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}
.an2-main > div:first-child {
  min-width: 0;
  overflow: hidden;
}
