/*
 * 2026 改版「冒險者大廳」：內頁深色內容樣式（首頁以外的所有頁面）。
 * 載入順序：shell.css → auto_dark.css（自動把全站淺色規則轉深色）→ 本檔（手調的改版質感，優先）。
 * redesign.php 會在改版開啟時替 body 加上 dark-mode，全站既有的深色規則與 contrast_guard.js 都會生效。
 */

/* ---------- 色票：覆寫既有的深色變數 ---------- */
html.bf-c1 body.dark-mode {
  --bg-body-grad-1: #070b1a;
  --bg-body-grad-2: #0b1126;
  --bg-card: #111a38;
  --text-main: #e8edfb;
  --text-sub: #9aa4c6;
  --border-color: rgba(255, 255, 255, .1);
  --card-shadow: 0 14px 34px rgba(0, 0, 0, .35);

  --bf-page-bg-top: #070b1a;
  --bf-page-bg-bottom: #0b1126;
  --bf-surface: #111a38;
  --bf-surface-soft: #0e1530;
  --bf-surface-muted: #16214a;
  --bf-text: #e8edfb;
  --bf-text-muted: #9aa4c6;
  --bf-border: rgba(255, 255, 255, .1);
  --bf-border-strong: rgba(69, 227, 255, .35);
  --bf-brand-700: #45e3ff;
  --bf-shadow-card: 0 14px 34px rgba(0, 0, 0, .35);
  --bf-shadow-raised: 0 20px 46px rgba(0, 0, 0, .45);

  --c1-card: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), #111a38;
  --c1-card-2: #16214a;

  background:
    radial-gradient(900px 520px at 85% -120px, rgba(155, 107, 255, .18), transparent 60%),
    radial-gradient(800px 480px at -10% 10%, rgba(69, 227, 255, .10), transparent 60%),
    var(--c1-bg) !important;
  background-attachment: fixed !important;
  color: var(--c1-text);
  font-family: var(--c1-font);
}
html.bf-c1 body.dark-mode .site-bg { display: none; }
html.bf-c1 #theme-toggle-btn { display: none !important; }

/* ---------- 文字與連結 ---------- */
html.bf-c1 body.dark-mode main { font-family: var(--c1-font); }
html.bf-c1 body.dark-mode main :is(h1, h2, h3) { color: #fff; }
html.bf-c1 body.dark-mode main :is(h1, h2) { font-weight: 900; letter-spacing: -.005em; }
html.bf-c1 body.dark-mode main :is(p, li, dd) { color: var(--c1-text-2); }
html.bf-c1 body.dark-mode main :is(strong, b) { color: #fff; }
html.bf-c1 body.dark-mode main a { color: #7fe9ff; }
html.bf-c1 body.dark-mode main a.bf-term-link {
  color: #7fe9ff !important;
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(127, 233, 255, .55) !important;
}
html.bf-c1 body.dark-mode main a.bf-term-link:hover { color: #fff !important; border-bottom-color: #fff !important; }
html.bf-c1 body.dark-mode main li::marker { color: var(--c1-cyan); }
html.bf-c1 body.dark-mode main ::selection { background: rgba(255, 200, 61, .35); color: #fff; }

/* ---------- 卡片 ---------- */
html.bf-c1 body.dark-mode .site-main .card-section { background: transparent !important; box-shadow: none !important; border: 0 !important; }
html.bf-c1 body.dark-mode .site-main :is(.guide-detail-card, .guide-meta-block) {
  background: var(--c1-card) !important;
  border: 1px solid var(--c1-line) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05) !important;
  color: var(--c1-text-2);
}
html.bf-c1 body.dark-mode .site-main .guide-detail-card > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c1-line) !important;
  color: #fff !important;
}
html.bf-c1 body.dark-mode .site-main .h2-emoji {
  display: inline-grid !important;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(69, 227, 255, .22), rgba(155, 107, 255, .22)) !important;
  border: 1px solid rgba(69, 227, 255, .32) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3) !important;
  font-size: 1.2rem;
}
html.bf-c1 body.dark-mode .site-main .guide-section-link-btn { color: var(--c1-muted); background: transparent; border-color: var(--c1-line); }

/* ---------- 快速前往（頁內導覽） ---------- */
html.bf-c1 body.dark-mode .site-main .guide-subnav {
  background: rgba(10, 16, 36, .82) !important;
  border: 1px solid var(--c1-line-2) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
html.bf-c1 body.dark-mode .site-main .guide-subnav-label { color: var(--c1-muted) !important; font-weight: 700; }
html.bf-c1 body.dark-mode .site-main .guide-subnav a {
  color: var(--c1-text-2) !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid var(--c1-line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 600;
  transition: color .15s, background .15s, border-color .15s;
}
html.bf-c1 body.dark-mode .site-main .guide-subnav a:hover { color: #fff !important; background: rgba(69, 227, 255, .12) !important; border-color: rgba(69, 227, 255, .45) !important; }
html.bf-c1 body.dark-mode .site-main .guide-subnav a.gd-overview-link {
  color: var(--c1-gold) !important;
  background: rgba(255, 200, 61, .08) !important;
  border-color: rgba(255, 200, 61, .35) !important;
}

/* ---------- 側欄：麵包屑、資訊、延伸閱讀、上一篇／下一篇 ---------- */
html.bf-c1 body.dark-mode .guide-breadcrumb a { color: #7fe9ff !important; }
html.bf-c1 body.dark-mode .guide-breadcrumb [aria-current="page"],
html.bf-c1 body.dark-mode .guide-breadcrumb > span:last-child { color: #fff !important; }
html.bf-c1 body.dark-mode .guide-breadcrumb-sep { color: var(--c1-muted) !important; }
html.bf-c1 body.dark-mode .site-main .guide-meta-label { color: var(--c1-muted) !important; }
html.bf-c1 body.dark-mode .site-main .guide-meta-value { color: #fff !important; }
html.bf-c1 body.dark-mode .site-main .guide-meta-tag {
  color: #bdf4ff !important;
  background: rgba(69, 227, 255, .1) !important;
  border: 1px solid rgba(69, 227, 255, .28) !important;
}
html.bf-c1 body.dark-mode .site-main .guide-related-title { color: var(--c1-cyan) !important; }
html.bf-c1 body.dark-mode .site-main :is(.guide-related-card, .pn-card, .guide-button, .related-button, .guide-related-link, .npc-link) {
  color: var(--c1-text) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)), #141f44 !important;
  border: 1px solid var(--c1-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25) !important;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}
html.bf-c1 body.dark-mode .site-main :is(.guide-related-card, .pn-card, .guide-button, .related-button, .guide-related-link, .npc-link):hover {
  transform: translateY(-3px);
  border-color: rgba(69, 227, 255, .5) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(69, 227, 255, .2) !important;
}
html.bf-c1 body.dark-mode .site-main :is(.guide-related-card-arrow, .pn-kicker) { color: var(--c1-gold) !important; }
html.bf-c1 body.dark-mode .site-main :is(.pn-title, .button-title, .guide-related-card-label) { color: #fff !important; }
html.bf-c1 body.dark-mode .site-main .button-desc { color: var(--c1-muted) !important; }

/* ---------- 攻略頁標題區（fs-hero） ---------- */
html.bf-c1 body.dark-mode .site-main .fs-hero {
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}
/* 依類型配色的標題區（神話＝桃紅、傳說＝紫…）：自動深色檔不要蓋掉 */
html.bf-c1 body.dark-mode .guide-detail-page .fs-hero.gd-standard-hero {
  background: linear-gradient(135deg, var(--gd-hero-start) 0%, var(--gd-hero-mid) 55%, var(--gd-hero-end) 100%) !important;
}
html.bf-c1 body.dark-mode .site-main .fs-hero h1 { color: #fff !important; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
html.bf-c1 body.dark-mode .site-main .fs-hero-icon {
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .22), rgba(7, 11, 26, .5) 70%) !important;
  border: 2px solid rgba(255, 255, 255, .22) !important;
  border-radius: 22px !important;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .06), 0 16px 34px rgba(0, 0, 0, .45) !important;
}

/* ---------- 按鈕：主要＝金色立體，次要＝玻璃 ---------- */
html.bf-c1 body.dark-mode .site-main :is(
  .gd-hero-actions a:first-child,
  .wp-primary, .acc-primary, .it-primary, .raid-primary,
  .fruit-market-route-primary, .bfv-btn-primary, .pfv-hero-action,
  .contact-primary-link, .raffle-hero-action.primary, .player-cta, .fun-btn.btn-primary
) {
  color: #3a2200 !important;
  background: var(--c1-btn-gold) !important;
  border: 0 !important;
  box-shadow: var(--c1-shadow-gold) !important;
  text-shadow: none !important;
  font-weight: 800 !important;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease !important;
}
html.bf-c1 body.dark-mode .site-main :is(
  .gd-hero-actions a:first-child,
  .wp-primary, .acc-primary, .it-primary, .raid-primary,
  .fruit-market-route-primary, .bfv-btn-primary, .pfv-hero-action,
  .contact-primary-link, .raffle-hero-action.primary, .player-cta, .fun-btn.btn-primary
):hover { transform: translateY(-2px); filter: brightness(1.05); }
html.bf-c1 body.dark-mode .site-main .fruit-market-route-primary span { color: #5a3a00 !important; }
html.bf-c1 body.dark-mode .site-main :is(.gd-hero-actions a:not(:first-child), .wp-secondary, .acc-secondary, .it-secondary) {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .24) !important;
  box-shadow: none !important;
}

/* ---------- 重點框 ---------- */
html.bf-c1 body.dark-mode .site-main :is(.highlight-box, .tip-box, .info-box, .note-box) {
  color: var(--c1-text-2) !important;
  background: linear-gradient(135deg, rgba(69, 227, 255, .08), rgba(155, 107, 255, .07)) !important;
  border: 1px solid rgba(69, 227, 255, .2) !important;
  border-left: 4px solid var(--c1-cyan) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
html.bf-c1 body.dark-mode .site-main :is(.highlight-warning, .warning-box, .highlight-yellow) {
  color: #f5e6c4 !important;
  background: linear-gradient(135deg, rgba(255, 200, 61, .12), rgba(255, 159, 28, .05)) !important;
  border: 1px solid rgba(255, 200, 61, .3) !important;
  border-left: 4px solid var(--c1-gold) !important;
  border-radius: 16px !important;
}
html.bf-c1 body.dark-mode .site-main :is(.highlight-box, .tip-box, .highlight-warning) strong { color: #fff !important; }

/* ---------- 表格 ---------- */
html.bf-c1 body.dark-mode .site-main .table-responsive {
  background: #0e1530 !important;
  border: 1px solid var(--c1-line) !important;
  border-radius: 16px !important;
}
html.bf-c1 body.dark-mode .site-main table { color: var(--c1-text-2); }
html.bf-c1 body.dark-mode .site-main table th {
  color: #fff !important;
  background: linear-gradient(180deg, #1b2756, #16214a) !important;
  border-color: var(--c1-line) !important;
}
html.bf-c1 body.dark-mode .site-main table td { border-color: rgba(255, 255, 255, .07) !important; }
html.bf-c1 body.dark-mode .site-main table tbody tr:nth-child(even) > td { background-color: rgba(255, 255, 255, .025); }
html.bf-c1 body.dark-mode .site-main table tbody tr:hover > td { background-color: rgba(69, 227, 255, .05); }
/* 技能表第一欄（按鍵）：金色大字 */
html.bf-c1 body.dark-mode .site-main .gd-skill-cards tbody td:first-child { color: var(--c1-gold) !important; font: 900 1.15rem/1.2 var(--c1-font); }

/* ---------- FAQ／可收合卡片 ---------- */
html.bf-c1 body.dark-mode .site-main :is(.guide-faq-card, .guide-collapsible-card) {
  background: var(--c1-card) !important;
  border: 1px solid var(--c1-line) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3) !important;
}
html.bf-c1 body.dark-mode .site-main details { border-color: var(--c1-line); }
html.bf-c1 body.dark-mode .site-main details > summary { color: #fff; }
html.bf-c1 body.dark-mode .site-main details[open] { border-color: rgba(69, 227, 255, .3); }

/* ---------- 行情導流框（果實頁） ---------- */
html.bf-c1 body.dark-mode .site-main .fruit-market-route {
  background: linear-gradient(135deg, rgba(255, 200, 61, .1), rgba(17, 26, 56, .6)) !important;
  border: 1px solid rgba(255, 200, 61, .28) !important;
  border-radius: 18px !important;
}
html.bf-c1 body.dark-mode .site-main .fruit-market-route-head strong { color: var(--c1-gold) !important; }
html.bf-c1 body.dark-mode .site-main .fruit-market-route-actions a:not(.fruit-market-route-primary) {
  color: #fff !important;
  background: rgba(255, 255, 255, .06) !important;
  border: 1px solid var(--c1-line-2) !important;
}

/* ---------- 表單 ---------- */
html.bf-c1 body.dark-mode .site-main :is(input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="email"], select, textarea) {
  color: #fff;
  background-color: #0e1530 !important;
  border-color: var(--c1-line-2) !important;
  border-radius: 12px;
}
html.bf-c1 body.dark-mode .site-main :is(input, select, textarea):focus {
  border-color: var(--c1-cyan) !important;
  box-shadow: 0 0 0 4px rgba(69, 227, 255, .15) !important;
  outline: 0;
}
html.bf-c1 body.dark-mode .site-main ::placeholder { color: #7e88aa; }

/* ---------- 圖片 ---------- */
html.bf-c1 body.dark-mode .site-main figure img { border-radius: 14px; }
html.bf-c1 body.dark-mode .site-main figcaption { color: var(--c1-muted) !important; background: transparent !important; }

/* ---------- 個別頁面 ---------- */
/* 玩家市集：未登入時「請先登入」原本用 inline 灰底 */
html.bf-c1 body.dark-mode .btn-market-post[style*="94a3b8"] {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid var(--c1-line-2) !important;
}

/* ---------- 標籤 ---------- */
html.bf-c1 body.dark-mode .site-main .tag { border: 1px solid rgba(255, 255, 255, .12); }
