/* ===== 网站底部徽标样式 ===== */
#footer-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 16px;
  max-width: 1200px;
  margin: 0 auto;
}
#footer-badges .footer-badge-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
#footer-badges .footer-badge {
  height: 20px;
  max-width: 100%;
  vertical-align: middle;
  transition: opacity 0.2s ease;
}
#footer-badges .footer-badge:hover {
  opacity: 0.8;
}

/* 页脚徽标：加一层底色，与页面背景区分（亮/暗各一套色调） */
#footer-badges .footer-badge {
  border-radius: 6px;
  padding: 3px 5px;
  box-sizing: content-box;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
[data-theme='dark'] #footer-badges .footer-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* 页脚圆形社交图标（#footer_deal .deal_link）
   暗色下底色原本取 --anzhiyu-fontcolor=#f7f7fa（纯白）→ 刺眼。
   改为柔和深色底 + 浅色图标：底色与图标不同色，保证图标可见。 */
[data-theme='dark'] #footer-wrap #footer_deal .deal_link {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e6e6e9;
}
[data-theme='dark'] #footer-wrap #footer_deal .deal_link:hover {
  background: var(--anzhiyu-main);
  border-color: var(--anzhiyu-main);
  color: var(--anzhiyu-white);
}

/* ===== 滚动选择器样式 - 左右布局单项目滚动版 ===== */

/* 位置选择器容器 - 显示相邻项目预览的滚动设计 */
.scroll-selector {
  position: relative;
  height: 60px; /* 减小高度但仍保留预览功能 */
  overflow-y: auto; /* 允许滚动但隐藏滚动条 */
  -webkit-overflow-scrolling: touch;
  background: var(--anzhiyu-background);
  min-height: 60px;
  border-radius: 4px;
  /* 添加渐变阴影效果 */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* 隐藏滚动条，实现平滑滚动效果 */
.scroll-selector::-webkit-scrollbar {
  display: none;
}

/* 选择器内容容器 - 启用平滑滚动和滚动捕捉 */
.scroll-selector {
  scroll-snap-type: y mandatory;
  -webkit-scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-scroll-behavior: smooth;
}

/* 选择项样式 - 显示相邻项目预览的设计 */
.scroll-select-item {
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  user-select: none;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 40px; /* 保持行高以实现垂直居中 */
  height: 40px; /* 固定高度 */
  width: 100%;
  scroll-snap-align: center; /* 使项目在容器中居中对齐 */
  -webkit-scroll-snap-align: center;
  /* 确保项目在中间位置 */
  position: relative;
}

/* 选择项悬停效果 - 平滑过渡 */
.scroll-select-item:hover {
  background: var(--anzhiyu-card-bg);
  padding-left: 18px;
  padding-right: 14px;
}

/* 选中项样式 - 明确视觉反馈 */
.scroll-select-item.selected {
  background: var(--anzhiyu-card-bg);
  border-left-color: var(--anzhiyu-main);
  color: var(--anzhiyu-main);
  font-weight: 500;
}

/* 选中项指示 - 简洁清晰 */
.scroll-select-item.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  font-size: 14px;
  opacity: 1;
}

/* 选择器行 - 左右布局设计 */
.selector-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px; /* 进一步减小底部间距至最小可行值 */
  background: var(--anzhiyu-background);
  border-radius: 6px;
  border: 1px solid var(--anzhiyu-border);
  overflow: hidden;
}

/* 标题文本样式 - 左侧固定宽度 */
.selector-title {
  flex-shrink: 0;
  width: 80px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--anzhiyu-font-color);
  background: var(--anzhiyu-card-bg);
  height: 40px;
  line-height: 40px;
  text-align: right;
  border-right: 1px solid var(--anzhiyu-border);
}

/* 选择器容器 - 右侧填充剩余空间 */
.selector-content {
  flex-grow: 1;
  position: relative;
  /* 允许内容滚动 */
}

/* 滚动选择器控制按钮 - 居中布局设计 */
.scroll-select-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px; /* 进一步减小顶部间距至最小可行值 */
  padding: 2px 0; /* 进一步减小内边距至最小可行值 */
}

.scroll-select-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 80px;
}

.scroll-select-btn.cancel {
  background: var(--anzhiyu-background);
  color: var(--anzhiyu-font-color);
  border: 1px solid var(--anzhiyu-border);
}

.scroll-select-btn.cancel:hover {
  background: var(--anzhiyu-gray-bg);
}

.scroll-select-btn.save {
  background: var(--anzhiyu-main);
  color: white;
}

.scroll-select-btn.save:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.scroll-select-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 省市区联动容器 - 垂直堆叠布局 */
.province-city-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 4px 0; /* 减小整体容器的内边距 */
}

/* 移除原有的包装器样式，使用新的左右布局结构 */
.province-selector-wrapper,
.city-selector-wrapper {
  background: none;
  border-radius: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  /* 确保内部滚动容器正常工作 */
  position: relative;
}

/* 触摸反馈 */
@media (hover: none) and (pointer: coarse) {
  .scroll-select-item:active {
    background: var(--anzhiyu-card-bg);
    transform: scale(0.98);
  }
  
  .scroll-select-btn:active {
    transform: scale(0.96);
  }
}

/* ===== FOOTER 布局修复 ===== */

/* 1. 基础布局 - 确保footer-bar整体结构 */
#footer-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding: 0.5rem 0 !important;
}

.footer-bar-links {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

/* 2. 左侧诗句和竖线同排 */
.footer-bar-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
}

/* 诗句容器 */
#footer-type-tips {
    display: inline-block !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 竖线分隔符 */
.footer-bar-left .footer-bar-separator {
    display: none !important;
}

/* 3. 右侧主题图床紧密排列 */
.footer-bar-right {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* 隐藏所有分隔符 */
.footer-bar-separator {
    display: none !important;
}

/* 4. 强制显示footer打字机相关元素，防止被主题或其他样式隐藏 */
#footer-type-tips,
.typed-cursor {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* 5. 移动端适配 */
@media (max-width: 768px) {
    .footer-bar-links {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .footer-bar-left,
    .footer-bar-right {
        justify-content: center !important;
    }
}

/* ===== Footer Animal Strip 动物条 ===== */
#footer-animal {
    position: relative;
    width: 100%;
}

#footer-animal .animal-wall {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 36px;
    max-width: none;
    /* 原第三方纹理图（p.qjqq.cn）整域已下线 404，改为零请求的 CSS 纹理，
       避免每页产生一条失败请求，同时不会再随图床失效而变白 */
    background-color: #bcb0a4;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.10)),
        repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 3px, transparent 3px 7px);
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 1023px) {
    #footer-animal .animal-wall {
        height: 4vw;
    }
}

#footer-animal img.animal {
    position: relative;
    max-width: min(974px, 100vw);
    margin: 0 auto;
    display: block;
}

/* 紧贴动物条的底部栏 */
#footer-bar {
    margin-top: 0 !important;
}

/* ===== 侧边栏欢迎卡片 ===== */
.welcome-card {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--anzhiyu-card-bg, #fff);
    box-shadow: var(--anzhiyu-shadow);
    margin: 12px 0;
    font-size: 14px;
}

.welcome-card .welcome-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.welcome-card .welcome-row {
    opacity: .85;
    line-height: 1.7;
}

/* ===== 侧边栏公告欢迎卡片精细样式（1:1 复刻风格） ===== */
#aside-content .card-announcement#welcome-card {
    margin-top: 12px;
}

#aside-content .card-announcement#welcome-card .item-headline {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .35rem;
}

#aside-content .card-announcement#welcome-card .item-headline .anzhiyu-icon-bullhorn {
    color: var(--anzhiyu-blue, #425AEF);
}

#aside-content .card-announcement#welcome-card .announcement_content {
    line-height: 1.85;
    color: var(--anzhiyu-secondtext, rgba(60, 60, 67, .8));
}

#aside-content .card-announcement#welcome-card .announcement_content a {
    color: var(--anzhiyu-main, #425AEF);
    text-decoration: none;
}

#aside-content .card-announcement#welcome-card .announcement_content a:hover {
    text-decoration: underline;
}

/* 那年今日样式 */
#aside-content .card-history .swiper-wrapper {
    flex-direction: column
}

#aside-content .card-history .item-headline {
    margin-left: 0;
}

#aside-content .card-history .history_slide {
    text-align: left;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start
}

#aside-content .card-history .history_slide_time {
    color: var(--efu-secondtext);
    font-size: 14px;
    font-style: italic;
    font-weight: lighter
}

#aside-content .card-history .history_slide_link {
    line-height: 1.5;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical
}

#aside-content .card-history .history_slide_link a {
    color: var(--efu-main);
    padding: 0 4px;
    border-radius: 4px
}

#aside-content .card-history .history_slide_link a:hover {
    color: var(--efu-white);
    background: var(--efu-main)
}

/* ===== 隐藏和风天气组件 ===== */
#he-plugin-simple {
    display: none !important;
    visibility: hidden !important;
}

/* ===== 火山引擎Banner视频背景 ===== */
.topGroup .todayCard .todayCard-video {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.topGroup .todayCard .todayCard-cover {
    display: none !important;
}

/* ===== 关于页追番模块：去掉斜切，图片正着显示 ===== */
.author-content-item.comic-content .comic-item {
  -webkit-transform: none;
  -moz-transform: none;
  -o-transform: none;
  -ms-transform: none;
  transform: none;
}
.author-content-item.comic-content .comic-item .comic-item-cover {
  left: 0;
  width: 100%;
  -webkit-transform: none;
  -moz-transform: none;
  -o-transform: none;
  -ms-transform: none;
  transform: none;
}
.author-content-item.comic-content .comic-item:hover .comic-item-cover {
  left: 0;
  -webkit-transform: scale(1.2);
  -moz-transform: scale(1.2);
  -o-transform: scale(1.2);
  -ms-transform: scale(1.2);
  transform: scale(1.2);
}
.author-content-item.comic-content .comic-item .comic-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== SEO: 文章内 FAQ 区块（配合 FAQPage 结构化数据，GEO 提升 AI 问答引用） ===== */
.seo-faq-block {
  margin: 28px 0 8px;
  padding: 18px 20px;
  background: #f7f9fe;
  border: 1px solid #e3e8f3;
  border-radius: 12px;
}
.seo-faq-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2b3245;
}
.seo-faq-item {
  border-top: 1px solid #e3e8f3;
  padding: 10px 0;
}
.seo-faq-item:first-of-type {
  border-top: none;
}
.seo-faq-q {
  cursor: pointer;
  font-weight: 600;
  color: #425aef;
  list-style: none;
  position: relative;
  padding-left: 20px;
}
.seo-faq-q::-webkit-details-marker {
  display: none;
}
.seo-faq-q::before {
  content: "Q";
  position: absolute;
  left: 0;
  font-weight: 800;
  color: #425aef;
}
.seo-faq-a {
  margin: 8px 0 0 20px;
  color: #4a5169;
  line-height: 1.8;
  font-size: 0.95rem;
}
html[data-theme="dark"] .seo-faq-block {
  background: #1c1f2b;
  border-color: #2b3040;
}
html[data-theme="dark"] .seo-faq-title {
  color: #e6e8ef;
}
html[data-theme="dark"] .seo-faq-item {
  border-top-color: #2b3040;
}
html[data-theme="dark"] .seo-faq-a {
  color: #c3c8d6;
}
/* ===== 正文内链（scripts/lib/internal-links.js 自动注入的锚文本） =====
   设计意图：点得动、但不过分抢戏——正文里用「虚线下划线」提示可跳转，悬停才变主题色。
   注意：主题对正文链接用的是
   `#article-container a:not(...)...:not(...)`（6 个 :not，特异性 1,6,1），
   普通写法 `a.ilink`（1,1,1）会被它压掉 —— 所以这里必须拼出同等特异性再加 .ilink。 */
#article-container a:not([data-fancybox="gallery"]):not(.headerlink):not(.cf-friends-link):not(.tag-Link):not(.btn-anzhiyu):not(.no-text-decoration).ilink {
  color: inherit;
  padding: 0;
  text-decoration: none;
  border-bottom: 1px dashed var(--anzhiyu-secondtext, #9a9a9a);
  transition: color 0.2s ease, border-color 0.2s ease;
}
#article-container a:not([data-fancybox="gallery"]):not(.headerlink):not(.cf-friends-link):not(.tag-Link):not(.btn-anzhiyu):not(.no-text-decoration).ilink:hover {
  color: var(--anzhiyu-main, #49b1f5);
  border-bottom: 1px solid var(--anzhiyu-main, #49b1f5);
}

/* ===== 侧边栏归左：兑现 _config.anzhiyu.yml 的 aside.position: left =====
   主题只把 aside.position 用于决定 padding 方向，没有真正排序逻辑，
   桌面端按 DOM 顺序（主内容在前）会把侧边栏落到右边。
   这里仅改视觉顺序（order），不动宽度分配、不动 ≤1200px 的纵向堆叠。 */
@media screen and (min-width: 1201px) {
  #content-inner > #aside-content {
    order: -1;
  }
}

