/* ==========================================================================
   1. 强行锁死导航栏背景（你做好的完美导航栏）
   ========================================================================== */
.navbar {
    background-color: #2f4154 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16) !important;
}
.navbar-custom { transition: none !important; }
.navbar-nav { flex-direction: row !important; }
.nav-item { margin-left: 1rem !important; }

/* ==========================================================================
   4. 精确优化：加大字体、加宽磨砂背景
   ========================================================================== */
.header-inner h1,
#subtitle {
    background-color: rgba(0, 0, 0, 0.8) !important;
    padding: 15px 60px !important;
    border-radius: 40px !important;
    display: inline-block !important;
    margin-top: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    font-size: 2.2rem !important;
    font-weight: bold !important;
}
.header-inner h1:empty, #subtitle:empty { display: none !important; }
.typed-cursor { display: none !important; }

/* ==========================================================================
   6. 确保关闭打字机的子页面标题文字瞬间直接全部显示
   ========================================================================== */
.page .header-inner h1,
.page #subtitle,
.page .typing-value {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    display: inline !important;
    width: auto !important;
    max-width: none !important;
    white-space: normal !important;
}

/* ==========================================================================
   7. 完美复刻 MyFigureCollection (MFC) 风格大卡片与图片格子系统
   ========================================================================== */
.mfc-container { max-width: 1000px; margin: 30px auto; padding: 0 15px; }
.mfc-block { background-color: #1c1c1c !important; border-radius: 6px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); margin-bottom: 25px; border: 1px solid #2d2d2d; overflow: hidden; }
.mfc-header { background-color: #262626 !important; padding: 12px 20px; font-size: 1.2rem; font-weight: bold; color: #ffffff !important; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #2d2d2d; }
.mfc-title-left { display: flex; align-items: center; gap: 10px; }
.mfc-counter { background-color: #333333; color: #888888; padding: 2px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: normal; }
.mfc-grid { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, 75px); gap: 12px; }
.mfc-item { width: 75px; height: 75px; border-radius: 4px; border: 2px solid #4caf50; overflow: hidden; background-color: #141414; cursor: pointer; transition: transform 0.15s ease; }
.mfc-item:hover { transform: scale(1.08); border-color: #ffffff; }
.mfc-empty-tip { padding: 30px; color: #666666; font-style: italic; text-align: center; font-size: 0.95rem; width: 100%; }

/* ==========================================================================
   8. 板块位置与重叠优化（向上拉拢贴近 Banner）
   ========================================================================== */
.header-inner {
    height: 40vh !important;
}
#board {
    margin-top: -2.5rem !important; /* 核心：负数外边距让白板向上重叠 */
    padding-top: 20px !important;    /* 配合缩小内部顶部留白 */
    padding-bottom: 30px !important; /* 配合缩小内部底部留白 */
    position: relative !important;   /* 确保层级浮在 Banner 之上 */
    z-index: 3 !important;
}


.qa-subtitle {
    font-size: 25px;
    font-weight: bold;
    color: #30a9de;
    border-left: 4px solid #30a9de;
    padding-left: 10px;
    margin: 12px 0 16px 0;
}

.qa-notice-red {
    font-size: 25px;
    font-weight: bold;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
    padding-left: 10px;
    margin: 12px 0 16px 0;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 默认是 center center，改成 top 可以靠上显示；或者写 percentage 如 center 15% */
    object-position: center 15%;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
/* ==========================================================================
   9. 藏品总览：未收藏的格子（.mfc-item.missing）—— 灰色虚线外框 + 图片变淡
   ========================================================================== */
.mfc-item.missing {
    border: 2px dashed #6b6b6b;
    outline: 2px solid #2d2d2d;
    outline-offset: 2px;
}
.mfc-item.missing img {
    filter: grayscale(70%) brightness(0.75);
    transition: filter 0.15s ease;
}
.mfc-item.missing:hover { border-color: #ffffff; border-style: dashed; }
.mfc-item.missing:hover img { filter: none; }

.mfc-legend { font-size: 0.75rem; font-weight: normal; color: #888; margin-left: 12px; display: inline-flex; align-items: center; gap: 6px; }
.mfc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.mfc-legend-owned { border: 2px solid #4caf50; }
.mfc-legend-missing { border: 2px dashed #6b6b6b; margin-left: 8px; }

/* 珍藏标识：格子右下角的金色星星（data.json 里 star: true） */
.mfc-item { position: relative; }
.mfc-star {
    position: absolute; bottom: 2px; right: 2px; z-index: 2;
    width: 18px; height: 18px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.72); color: #ffc83d;
    font-size: 12px; line-height: 1;
    text-shadow: 0 0 4px rgba(255, 200, 61, 0.8);
    pointer-events: none;
}
/* 图例里的「珍藏」小方块：金色高亮框（格子上已不再显示星星） */
.mfc-legend i.mfc-legend-star { margin-left: 8px; border: 2px solid #b02a3c; box-shadow: 0 0 5px rgba(232, 194, 90, 0.9); }

/* 珍藏格子的外框：一段金色光带像贪吃蛇一样绕着边框转（底色：已收藏 = 暗酒红，未收藏 = 灰）
   做法：格子里加一个 <span class="mfc-ring">，用遮罩只露出 4px 的边框，里面一块渐变用 transform 旋转。
   transform 动画由显卡单独跑，页面加载图片时也不会卡。 */
@keyframes mfc-spin { to { transform: rotate(360deg); } }
.mfc-item.star, .mfc-item.star:hover { border: 0; box-shadow: 0 0 10px rgba(201, 146, 50, 0.75); }
.mfc-ring {
    position: absolute; inset: 0; z-index: 3; pointer-events: none;
    padding: 4px; border-radius: inherit; overflow: hidden;
    background: var(--snake-base, #5c1a26);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.mfc-ring::before {
    content: ""; position: absolute; left: -25%; top: -25%; width: 150%; height: 150%;
    /* FA logo 色系：深酒红字 → 金色描边 → 亮金蛇头 */
    background: conic-gradient(transparent 0 44%, rgba(90, 14, 28, 0.8) 54%, #8e1b2e 64%, #b02a3c 74%, #c99232 84%, #e8c25a 92%, #fff1b8 100%);
    animation: mfc-spin 2s linear infinite; will-change: transform;
}
.mfc-item.star.missing .mfc-ring { --snake-base: #4a4a4a; }
@media (prefers-reduced-motion: reduce) { .mfc-ring::before { animation: none; } }

/* ==========================================================================
   10. 单品页里的表格（如「版本说明」）：加内边距和分隔线
   ========================================================================== */
.page-content table th,
.page-content table td {
    padding: 6px 12px !important;
    border-bottom: 1px solid #333 !important;
    vertical-align: middle;
}
.page-content table { margin: 10px 0; border-collapse: collapse; }

/* ==========================================================================
   11. 书籍系列页的「各卷一览」：从藏品总览点某一卷跳过来时，不被顶栏挡住并高亮那一行
   ========================================================================== */
.page-content tr[id^="v"] { scroll-margin-top: 90px; }
.page-content tr[id^="v"]:target td { background: rgba(255, 200, 61, 0.12); }
.page-content tr[id^="v"]:target td:first-child { box-shadow: inset 3px 0 0 #ffc83d; }
.page-content tr[id^="v"] td { white-space: nowrap; }
.page-content table:has(tr[id^="v"]) { display: block; overflow-x: auto; }

/* ==========================================================================
   12. 资讯页：一览页（news/index.md）一行一条，详情页（news/*.md）底部是官方原页面和离线存档按钮
   ========================================================================== */
.news-rows { margin-top: 18px; border-top: 1px solid #2d2d2d; }
.page-content a.news-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid #2d2d2d; color: inherit; text-decoration: none; transition: background 0.15s ease; }
.page-content a.news-row:hover { background: rgba(48, 169, 222, 0.08); }
.news-row .news-date { flex: 0 0 auto; min-width: 9.5em; color: #999; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.news-row .news-tag { flex: 0 0 auto; }
.news-row-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-arrow { flex: 0 0 auto; color: #666; font-size: 1.3rem; line-height: 1; }
.page-content a.news-back { display: inline-block; margin-bottom: 12px; color: #30a9de; text-decoration: none; }
@media (max-width: 600px) {
    .page-content a.news-row { flex-wrap: wrap; gap: 4px 10px; }
    .news-row-title { flex-basis: 100%; order: 3; white-space: normal; }
    .news-arrow { display: none; }
}
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; color: #999; }
.news-date { margin-right: 4px; }
.news-tag { background: #2f4154; color: #cfe3f5; padding: 1px 8px; border-radius: 10px; font-size: 0.78rem; }
.page-content .news-img { display: block; width: 100%; max-width: 640px; height: auto; border-radius: 6px; margin: 14px auto; }
.news-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.page-content .news-btn { display: inline-block; padding: 5px 14px; border-radius: 16px; border: 1px solid #30a9de; color: #30a9de; font-size: 0.9rem; text-decoration: none; }
.page-content .news-btn:hover { background: #30a9de; color: #fff; }
.page-content .news-btn.archive { border-color: #8a8a8a; color: #bbb; }
.page-content .news-btn.archive:hover { background: #8a8a8a; color: #fff; }

/* ==========================================================================
   藏品总览：「未发售」一栏（开发中止的 PS3/PSP 版、发售中止的角色 CD）—— 深色细虚线 + 左上角「未发售」小标签
   ========================================================================== */
.mfc-item.unreleased { border: 2px dashed #8a6d3b; }
.mfc-item.unreleased img { filter: grayscale(100%) brightness(0.6); transition: filter 0.15s ease; }
.mfc-item.unreleased:hover img { filter: grayscale(30%) brightness(0.9); }
.mfc-unrel-tag {
    position: absolute; top: 4px; left: 4px; z-index: 4; pointer-events: none;
    padding: 1px 6px; border-radius: 3px; font-size: 11px; line-height: 1.5;
    background: rgba(0, 0, 0, 0.75); color: #e8c25a; border: 1px solid #8a6d3b;
}
