/* ========== Variables ========== */
:root {
  --bg: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --primary: #4b7bec;
  --primary-light: #eef2fc;
  --primary-dark: #3867d6;
  --link: #4b7bec;
  --link-hover: #3867d6;
  --accent: #34d399;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --max-width: 820px;
  --font:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC',
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --primary: #7fa8f5;
    --primary-light: #1e2a45;
    --primary-dark: #a0c0ff;
    --link: #7fa8f5;
    --link-hover: #a0c0ff;
    --accent: #34d399;
    --border: #374151;
    --border-light: #1f2937;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  }
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--link-hover);
}

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

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

/* ========== Header ========== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--bg);
}

.site-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.site-header h1 a {
  color: var(--text);
}
.site-header h1 a:hover {
  color: var(--primary);
}

.site-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* ========== Navigation ========== */
.site-nav {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== Navigation Dropdown ========== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  user-select: none;
}

.nav-dropdown-trigger:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 100;
  min-width: 100px;
  padding: 4px 0;
  flex-direction: column;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 6px 16px;
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ========== Main ========== */
main {
  flex: 1;
  padding: 28px 0;
}

/* ========== Page Title ========== */
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.page-title small {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 8px;
}

/* ========== Post List ========== */
.post-list {
  list-style: none;
}

.post-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.post-card:last-child {
  border-bottom: none;
}

.post-card[data-href] {
  cursor: pointer;
}

/* ========== Post Meta ========== */
.post-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

.post-type-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  line-height: 1.6;
}

.post-type-badge.tweet {
  color: #fff;
  background: #34d399;
}

.post-type-badge.blog {
  color: #fff;
  background: #64748b;
}

/* ========== Post Excerpt ========== */
.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== Blog Card (PostItem Style) ========== */
.blog-card-panel {
  display: block;
  margin-top: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.4s;
}

.blog-card-panel:hover {
  color: inherit;
}

.blog-card-cover {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--bg-secondary);
  transition: border-color 0.4s;
}

.blog-card-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: transform 0.3s;
}

.blog-card-panel:hover .blog-card-cover {
  border-color: var(--primary);
}

.blog-card-panel:hover .blog-card-cover img {
  transform: scale(1.02);
}

.blog-card-title {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg);
  transition:
    border-color 0.4s,
    color 0.4s;
}

.blog-card-panel:hover .blog-card-title {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========== Tags ========== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-item {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--primary);
  transition: color 0.2s;
}

.tag-item:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ========== Tag/Category Cloud ========== */
.cloud-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}

.cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s;
}

.cloud-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cloud-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 0 6px;
  border-radius: 10px;
}

/* ========== Pagination ========== */
.pagination {
  padding: 32px 0 16px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .ellipsis {
  border: none;
  padding: 6px 8px;
  color: var(--text-secondary);
}

/* ========== Tweet Card in List ========== */
.tweet-card .tweet-body {
  margin-top: 6px;
}

.tweet-card .tweet-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-card .tweet-text a {
  color: var(--primary);
}

.tweet-footer {
  margin-top: 10px;
  font-size: 0.8125rem;
}

.tweet-footer a {
  color: var(--primary);
}
.tweet-footer a:hover {
  text-decoration: underline;
}

/* ========== Media Grid (Image/Video Tiles) ========== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 8px 0;
}

.media-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  display: block;
  position: relative;
  background: var(--bg-tertiary);
  cursor: zoom-in;
  text-decoration: none;
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 4px;
}

/* 视频播放按鈕 - 半透明蒙层 + 三角形 */
.media-play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 1;
}

.media-play-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
  z-index: 2;
}

.media-video-blank {
  background: var(--bg-tertiary);
}

/* ========== Single Media (Blog-style, 1 item) ========== */
.single-media-wrap {
  display: inline-block;
  border-radius: 0.75rem;
  max-width: 100%;
  min-height: 150px;
  overflow: hidden;
  isolation: isolate;
  margin: 8px 0;
  position: relative;
  vertical-align: top;
}
.single-media-wrap.is-portrait {
  max-height: 380px;
}
.single-media-inner {
  display: block;
  width: 100%;
  height: 100%;
}
.single-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  margin: 0;
}
.single-media-wrap .media-play-btn::after {
  border-width: 12px 0 12px 22px;
}

/* ========== Media Description Tag ========== */
.media-desc-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-bottom-right-radius: 4px;
  pointer-events: auto;
  z-index: 10;
  white-space: nowrap;
  cursor: default;
}

.media-desc-tag::after {
  content: attr(data-desc);
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  max-width: 260px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  z-index: 20;
  pointer-events: none;
}

.media-desc-tag:hover::after {
  display: block;
}

/* ========== GLightbox Description Override ========== */
.glightbox-clean .gslide-description {
  background: rgba(0, 0, 0, 0.72) !important;
}

.glightbox-clean .gslide-title {
  display: none !important;
}

.glightbox-clean .gdesc-inner {
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.glightbox-clean .gslide-desc {
  color: #e8e8e8 !important;
  font-size: 0.85em;
  line-height: 1.6;
}

/* ========== Tweet Detail ========== */
.tweet-detail-text {
  font-size: 1rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-detail-text a {
  color: var(--primary);
}

/* ========== Bilibili Embed ========== */
.bilibili-embed {
  margin: 12px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bilibili-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

/* ========== Post Detail ========== */
.post-detail {
}

.post-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-content {
  font-size: 1rem;
  line-height: 1.9;
}

/* 博文富文本专用层 */
.rich-content p {
  margin-bottom: 16px;
}
.rich-content h2 {
  font-size: 1.35rem;
  margin: 28px 0 14px;
  font-weight: 600;
}
.rich-content h3 {
  font-size: 1.15rem;
  margin: 22px 0 10px;
  font-weight: 600;
}
.rich-content h4 {
  font-size: 1.05rem;
  margin: 18px 0 8px;
  font-weight: 600;
}

.rich-content ul,
.rich-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.rich-content li {
  margin-bottom: 4px;
}

.rich-content img:not(.w-e-image-group-img) {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 14px 0;
  display: block;
  cursor: zoom-in;
}

.w-e-image-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 100%;
  border-radius: 0.375rem;
  isolation: isolate;
  overflow: hidden;
}

.w-e-image-group-img-body {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
}

.rich-content .w-e-image-group-img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  cursor: zoom-in;
}

/* 奇数图片组的最后一个元素样式 */
.w-e-image-group-odd .w-e-image-group-img-body:last-child {
  grid-column: 1 / -1;
  aspect-ratio: 2/1;
}

.rich-content video {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 14px 0;
  display: block;
}

.rich-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 16px;
  color: var(--text-secondary);
  margin: 16px 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.rich-content pre {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  position: relative;
}

.rich-content code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.rich-content pre code {
  background: none;
  padding: 0;
}

/* ========== Code Highlight (highlight.js) ========== */
.rich-content pre code.hljs {
  position: relative;
  padding-left: 3.5em;
  padding-top: 2.5rem;
  padding-bottom: 0.75em;
  padding-right: 1em;
  border-radius: 0 0 var(--radius) var(--radius);
}

.rich-content pre code.hljs::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.rich-content pre code.hljs::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: transparent;
}
.rich-content pre code.hljs:hover::-webkit-scrollbar-thumb {
  background-color: rgba(128, 128, 128, 0.5);
}

/* 行号 */
.rich-content pre code.hljs::before {
  content: attr(data-lines);
  position: absolute;
  top: 2.5rem;
  left: 0;
  width: 3em;
  padding: 0 0.5em;
  overflow: hidden;
  letter-spacing: -1px;
  text-align: right;
  color: rgba(128, 128, 128, 0.6);
  border-right: 1px solid rgba(128, 128, 128, 0.3);
  user-select: none;
  -webkit-user-select: none;
}

/* 代码块顶部头部栏 */
.code-header {
  color: #f3f4f6;
  font-size: 0.875rem;
  background: #1e1e2e;
  padding: 0 0.5em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2rem;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  border-radius: var(--radius) var(--radius) 0 0;
  box-sizing: border-box;
}

.code-language {
  margin-left: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.code-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-right: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.code-copy-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.code-copy-btn.copied {
  opacity: 1;
}
.code-copy-btn svg {
  width: 14px;
  height: 14px;
  fill: #f3f4f6;
}
.code-copy-btn.copied svg {
  fill: #34d399;
}

.rich-content a {
  color: var(--primary);
}
.rich-content a:hover {
  text-decoration: underline;
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.rich-content th,
.rich-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.rich-content th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.post-footer {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 原文链接 */
.post-source {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.post-source a {
  color: var(--primary);
}

.post-source a:hover {
  text-decoration: underline;
}

/* Tags below post content */
/* .post-detail > .tag-list {
  margin-top: 20px;
  padding-top: 14px;
} */

/* ========== Content Series Sections (Inline Tweet Content) ========== */
.content-series-section {
  margin-top: 12px;
}

/* ========== Event Item ========== */
.event-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.event-item:last-child {
  border-bottom: none;
}

.event-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-title {
  font-size: 0.9rem;
}

/* ========== Vote Card ========== */
.vote-card {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.vote-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.vote-header-icon {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.vote-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

.vote-body {
  padding: 12px 14px;
  background: var(--bg-secondary);
}

.vote-option {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.vote-option:last-child {
  margin-bottom: 0;
}

.vote-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.vote-option-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.vote-option-votes {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vote-option-bar {
  height: 5px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.vote-option-bar-inner {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  min-width: 3px;
  transition: width 0s;
}

.vote-option-bar-inner.max-vote {
  background: #34d399;
}

.vote-footer {
  padding: 6px 14px 10px;
  background: var(--bg-secondary);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
}

.vote-note {
  padding: 7px 14px;
  background: var(--bg-secondary);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-style: italic;
}

/* ========== ACGN Card ========== */
.acgn-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.acgn-cover {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.acgn-cover img {
  width: 80px;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  flex-shrink: 0;
}

/* 评分组件 - 仿 Rating.vue：文字在上层(z-index 2)，进度条绝对定位在背后(z-index 1) */
.acgn-rating {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 4px;
  width: 100%;
}

.acgn-rating-text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  padding-top: 2px;
}

.acgn-rating-text span {
  display: block;
  height: 100%;
}

.acgn-rating-sep {
  display: inline-block;
  width: 1px;
  height: 0.875rem !important;
  background: var(--primary);
  opacity: 0.4;
  margin: 0 4px;
  flex-shrink: 0;
}

.acgn-rating-pbar {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(75, 123, 236, 0.25);
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.acgn-rating-pbar-inner {
  height: 100%;
  background: rgba(75, 123, 236, 0.15);
}

.acgn-no-rating {
  width: 100%;
  margin-top: 10px;
}

.acgn-no-rating-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.acgn-info {
  flex: 1;
  min-width: 0;
}

.acgn-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.acgn-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
  font-weight: 500;
}

.acgn-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.acgn-summary {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  /* display: -webkit-box; */
  /* -webkit-line-clamp: 3; */
  /* -webkit-box-orient: vertical; */
  /* overflow: hidden; */
}

.acgn-label {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.acgn-label-prefix {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.acgn-label-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.acgn-label-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.acgn-status-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  border: 1px solid #ef4444;
  color: #ef4444;
}

.acgn-time-range {
  font-size: 10px;
  color: var(--text-secondary);
}

/* ========== Content Post/Tweet Links ========== */
.content-link-item {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.2s;
}

.content-link-item:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.content-link-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ========== Responsive ========== */
@media (max-width: 640px) {
  .post-header h1 {
    font-size: 1.3rem;
  }
  .container {
    padding: 0 16px;
  }
  main {
    padding: 20px 0;
  }
  .post-card {
    padding: 16px 0;
  }
  .media-grid {
    gap: 3px;
  }
  .single-media-wrap.is-portrait {
    max-height: 320px;
  }
}

/* ========== Media List Pages (番剧/阅读/游戏/剧场版) ========== */

/* 媒体列表容器：在专属页面中给 acgn-card 较大封面 */
.media-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-list .acgn-card {
  margin-bottom: 0;
}

.media-list .acgn-cover {
  width: 90px;
}

.media-list .acgn-cover img {
  width: 90px;
  height: 124px;
}

/* .media-list .acgn-summary {
  -webkit-line-clamp: 4;
} */

/* 番剧季节组标题 */
.media-season-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 16px 0 6px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.media-season-header:first-child {
  padding-top: 0;
}

/* ========== Mappoint Location Tags ========== */
.icon-map-pin {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.mappoint-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mappoint-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8125rem;
  color: var(--primary);
  transition: color 0.2s;
}

.mappoint-tag-item .icon-map-pin {
  color: var(--primary);
}

.mappoint-tag-item:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.mappoint-tag-item:hover .icon-map-pin {
  color: var(--primary-dark);
}

/* page-title 中的 map-pin 图标 */
.page-title .icon-map-pin {
  width: 20px;
  height: 20px;
  color: var(--primary);
  vertical-align: text-bottom;
  margin-right: 4px;
}

/* ========== Toast Notifications ========== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(100%);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.toast-item.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-item.toast-hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast-item.toast-success {
  border-left: 3px solid #34d399;
}

.toast-item.toast-error {
  border-left: 3px solid #ef4444;
}
