/* 命運 Eternal 永恆 — 官網第一版（副手 2026-12-05）
   原則：不用原版遊戲素材，只用 CSS 和自己畫的 SVG。 */
:root {
  --bg: #120d0a;
  --bg2: #1b1410;
  --panel: #221913;
  --line: #5a4321;
  --gold: #d9b26a;
  --gold-hi: #f3d999;
  --text: #eadfcf;
  --muted: #a8977f;
  --red: #b5462e;
  --radius: 10px;
  --font: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", "Microsoft JhengHei", serif;
  --sans: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); line-height: 1.75; font-size: 16px;
}
a { color: var(--gold-hi); }
img { max-width: 100%; }

/* ---- 上方選單 ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 13, 10, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand b { font-family: var(--font); font-size: 20px; color: var(--gold-hi); letter-spacing: 2px; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a {
  display: block; padding: 8px 14px; border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: 15px;
}
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--gold-hi); background: rgba(217, 178, 106, .1); }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ---- 首頁大圖區 ---- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 110px 0 120px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217, 178, 106, .25), transparent 60%),
    radial-gradient(ellipse at 15% 90%, rgba(181, 70, 46, .25), transparent 55%),
    linear-gradient(180deg, rgba(36, 24, 15, .72) 0%, rgba(18, 13, 10, .92) 100%),
    url("img/water-gate.jpg") 55% 55% / max(170%, 1400px) auto no-repeat, #1a120c;
  border-bottom: 1px solid var(--line);
}
.hero::before { /* 星點 */
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, #f3d999, transparent),
    radial-gradient(1px 1px at 35% 75%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, #f3d999, transparent);
}
.hero .emblem { width: 120px; height: 120px; margin: 0 auto 18px; display: block; }
.hero h1 {
  font-family: var(--font); font-weight: 700; margin: 0;
  font-size: clamp(40px, 7vw, 76px); letter-spacing: 8px;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold) 55%, #8a6a2e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(217, 178, 106, .25);
}
.hero .en { font-family: var(--font); letter-spacing: 10px; color: var(--gold); margin: 6px 0 18px; font-size: 18px; }
.hero p.lead { max-width: 620px; margin: 0 auto 34px; color: var(--text); font-size: 18px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 8px; font-size: 17px; font-weight: 700;
  text-decoration: none; border: 1px solid var(--gold); color: var(--gold-hi);
  background: rgba(217, 178, 106, .08); transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); background: rgba(217, 178, 106, .18); }
.btn.primary {
  color: #2a1a08; border-color: #f3d999;
  background: linear-gradient(180deg, #f6e0a6, #c99a45);
  box-shadow: 0 6px 24px rgba(217, 178, 106, .3);
}
.btn.soon { opacity: .55; cursor: not-allowed; }
.btn.soon:hover { transform: none; }

/* ---- 區塊 ---- */
section { padding: 72px 0; }
section.alt { background: var(--bg2); border-top: 1px solid #2c2118; border-bottom: 1px solid #2c2118; }
h2 {
  font-family: var(--font); color: var(--gold-hi); font-size: 30px;
  letter-spacing: 3px; margin: 0 0 8px; text-align: center;
}
h2 + .sub { text-align: center; color: var(--muted); margin: 0 0 36px; }
h3 { font-family: var(--font); color: var(--gold-hi); font-size: 20px; margin: 0 0 8px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px; position: relative;
}
.card::after { /* 金色角飾 */
  content: ""; position: absolute; top: 8px; right: 8px; width: 14px; height: 14px;
  border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); opacity: .6;
}
.card p { margin: 0; color: var(--text); }
.card .tag { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 1px 10px; margin-bottom: 8px; }

/* 最新消息 */
.news { list-style: none; padding: 0; margin: 0 auto; max-width: 820px; }
.news li {
  display: grid; grid-template-columns: 110px 90px 1fr; gap: 14px; align-items: baseline;
  padding: 16px 6px; border-bottom: 1px dashed #3a2c1c;
}
.news time { color: var(--muted); font-size: 14px; }
.news .kind { font-size: 13px; text-align: center; border-radius: 4px; padding: 1px 0; background: rgba(181, 70, 46, .25); color: #f0b6a6; }
.news .kind.info { background: rgba(217, 178, 106, .15); color: var(--gold-hi); }

/* 即將開放 */
.soon-box {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted);
}
.soon-box b { color: var(--gold); }

/* 內文頁 */
.page-head { padding: 70px 0 40px; text-align: center; background: linear-gradient(180deg, #24180f, var(--bg)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-family: var(--font); color: var(--gold-hi); font-size: 40px; letter-spacing: 6px; margin: 0; }
.page-head p { color: var(--muted); margin: 8px 0 0; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.toc a { font-size: 14px; text-decoration: none; padding: 5px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); }
.toc a:hover { color: var(--gold-hi); border-color: var(--gold); }

.article { max-width: 860px; margin: 0 auto; }
.article h2 { text-align: left; font-size: 24px; margin-top: 8px; border-left: 4px solid var(--gold); padding-left: 12px; }
.article section { padding: 40px 0; border-bottom: 1px solid #2c2118; }
.article table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.article th, .article td { border: 1px solid #3a2c1c; padding: 9px 12px; text-align: left; vertical-align: top; }
.article th { background: #2a1f16; color: var(--gold-hi); font-weight: 700; }
.tip {
  background: rgba(217, 178, 106, .08); border-left: 3px solid var(--gold);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0;
}
.tip.warn { background: rgba(181, 70, 46, .12); border-color: var(--red); }
kbd {
  font-family: var(--sans); font-size: 13px; padding: 1px 8px; border-radius: 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: #2a1f16; color: var(--gold-hi);
}
ol.steps { padding-left: 22px; }
ol.steps li { margin: 6px 0; }

details { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--gold-hi); }
details > div { padding: 0 18px 16px; }

/* 遊戲畫面 */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shot {
  margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: block; text-decoration: none; color: var(--text);
}
.shot img { width: 100%; height: 230px; object-fit: cover; display: block; transition: transform .3s; }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { padding: 10px 14px; font-size: 15px; }
.shot figcaption b { color: var(--gold-hi); margin-right: 6px; }
.shot.left img { object-position: 0% 55%; }   /* 截圖右邊有背包視窗，只露出左邊 */

/* 放大看圖 */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .85); padding: 4vw;
}
.lightbox:target { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border: 1px solid var(--line); border-radius: 6px; }
.lightbox .close { position: absolute; top: 18px; right: 26px; font-size: 34px; color: var(--gold-hi); text-decoration: none; }

/* 城鎮聊天 */
.town { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.town img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.chatbox {
  background: rgba(10, 8, 6, .85); border: 1px solid #3a2c1c; border-radius: 8px;
  padding: 14px 16px; font-size: 15px; line-height: 2; font-family: var(--sans);
}
.chatbox .c-king { color: #8fd0ff; }
.chatbox .c-norm { color: #f2eee6; }
.chatbox .c-guild { color: #9fe39a; }
.chatbox .c-whisper { color: #f0a6e6; }
.chatbox .c-sys { color: #f3d999; }
.chat-tabs { display: flex; gap: 2px; margin-top: 10px; }
.chat-tabs span { font-size: 13px; padding: 3px 14px; background: #2a1f16; border: 1px solid #4a3722; color: var(--text); }

/* 時裝展示 */
.showcase { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: center; }
.showcase img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }

@media (max-width: 760px) {
  .town, .showcase { grid-template-columns: 1fr; }
  .showcase img { max-width: 340px; margin: 0 auto; }
}

/* 頁尾 */
footer { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--muted); font-size: 14px; text-align: center; }
footer nav { display: flex; gap: 18px; justify-content: center; margin-bottom: 10px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold-hi); }

@media (max-width: 760px) {
  .nav .wrap { height: auto; flex-wrap: wrap; padding: 10px 0; gap: 8px; }
  .nav ul { margin: 0; width: 100%; overflow-x: auto; }
  .nav ul a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .hero { padding: 70px 0 80px; }
  .news li { grid-template-columns: 1fr; gap: 2px; }
  .news .kind { width: 70px; }
}
