/* 象棋西游 · 样式（浅色宣纸水墨风，自包含） */
:root{
  --ink:#2b2119; --ink2:#5a4a3a; --paper:#f4ead7; --paper2:#efe2c8;
  --red:#b1272a; --red2:#8e1f22; --gold:#b8912f; --line:#d9c6a0;
  --green:#4b7a4a; --shadow:0 6px 22px rgba(80,55,25,.16);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Microsoft YaHei","PingFang SC",simsun,serif;
  color:var(--ink); background:var(--paper); line-height:1.6; min-height:100vh;
}
.sky{position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(1200px 500px at 15% -5%,rgba(180,145,70,.16),transparent 60%),
    radial-gradient(900px 420px at 95% 8%,rgba(120,150,110,.12),transparent 60%),
    repeating-linear-gradient(0deg,rgba(120,90,50,.025) 0 1px,transparent 1px 4px);
}
.hero{position:relative;overflow:hidden;background:
  linear-gradient(135deg,rgba(43,33,25,.96),rgba(78,52,34,.94)),
  url('../img/80.jpg?v=3') center 30%/cover no-repeat;
  color:#f6ecd8;padding:46px 20px 40px;border-bottom:5px solid var(--gold);
}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(30,22,16,.85),rgba(30,22,16,.35) 70%,transparent);pointer-events:none}
.hero-inner{position:relative;z-index:2;max-width:1080px;margin:0 auto;display:flex;gap:28px;align-items:flex-start}
.seal-big{flex:0 0 auto;width:74px;height:74px;border:3px solid #e8b04a;border-radius:8px;color:#f0c25e;
  font-family:simkai,"KaiTi",serif;font-size:26px;line-height:1.05;text-align:center;padding-top:8px;
  letter-spacing:2px;transform:rotate(-3deg);background:rgba(0,0,0,.15)}
.hero-txt{flex:1;min-width:0}
.hero h1{font-family:simkai,"KaiTi",serif;font-size:46px;margin:0 0 4px;letter-spacing:6px;color:#f7d98a;
  text-shadow:0 2px 10px rgba(0,0,0,.4)}
.hero .sub{margin:0 0 12px;font-size:16px;letter-spacing:2px;color:#e8c98a}
.hero .lead{margin:0 0 18px;max-width:760px;font-size:14px;color:#efe2c8;line-height:1.9}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap}
.btn{border:0;border-radius:8px;padding:12px 24px;font-size:15px;cursor:pointer;font-weight:700;letter-spacing:1px;transition:.18s}
.btn-primary{background:linear-gradient(135deg,#d0393c,#8e1f22);color:#fff;box-shadow:0 4px 14px rgba(180,30,30,.4)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(180,30,30,.55)}
.btn-ghost{background:rgba(255,255,255,.1);color:#f6ecd8;border:1px solid rgba(246,236,216,.4)}
.btn-ghost:hover{background:rgba(255,255,255,.2)}
.btn-back{display:inline-flex;align-items:center;text-decoration:none;background:rgba(255,255,255,.14);color:#ffe9bd;border:1px solid rgba(255,220,160,.55)}
.btn-back:hover{background:rgba(255,255,255,.26);text-decoration:none;color:#fff}
.footer a{color:#b8862f;text-decoration:underline}
.progress-wrap{display:flex;align-items:center;gap:12px;margin-top:18px;max-width:520px}
.progress-bar{flex:1;height:10px;background:rgba(255,255,255,.18);border-radius:6px;overflow:hidden}
.progress-fill{height:100%;width:0;background:linear-gradient(90deg,#e8b04a,#d0393c);transition:width .5s}
.progress-text{font-size:13px;color:#f0dcae;white-space:nowrap}

.wrap{max-width:1180px;margin:0 auto;padding:30px 20px 60px}
.section-head{margin-bottom:22px}
.section-head h2{font-family:simkai,"KaiTi",serif;font-size:30px;margin:0 0 6px;color:var(--red2);letter-spacing:3px}
.section-head p{margin:0;color:var(--ink2);font-size:14px}

/* 路线：按篇章分组 */
.chapter-list{display:block}
.chapter{margin-bottom:34px}
.chapter-title{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.chapter-title .cn{font-family:simkai,"KaiTi",serif;font-size:23px;color:var(--ink);letter-spacing:2px}
.chapter-title .bar{flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}
.chapter-title .rng{font-size:12px;color:#9c8763;background:#efe3c9;border:1px solid var(--line);border-radius:20px;padding:2px 12px}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.card{position:relative;background:var(--paper2);border:1px solid var(--line);border-radius:10px;overflow:hidden;
  cursor:pointer;box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s}
.card:hover{transform:translateY(-4px);box-shadow:0 12px 28px rgba(80,55,25,.25)}
.card.cleared{outline:2px solid var(--green)}
.card.current{outline:2px solid var(--gold);animation:pulse 2s infinite}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(184,145,47,.5)}50%{box-shadow:0 0 0 8px rgba(184,145,47,0)}}
.card .thumb{height:96px;background-size:cover;background-position:center 22%;position:relative;filter:saturate(.85)}
.card .thumb::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(30,20,12,.55))}
.card .lvnum{position:absolute;top:8px;left:8px;z-index:2;width:30px;height:30px;border-radius:50%;
  background:var(--red);color:#fff;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;
  border:2px solid rgba(255,255,255,.85);box-shadow:0 2px 6px rgba(0,0,0,.3)}
.card .badge{position:absolute;bottom:7px;right:8px;z-index:2;color:#ffe3a6;font-size:11px;font-weight:700}
.card .done{position:absolute;top:7px;right:8px;z-index:2;width:24px;height:24px;border-radius:50%;
  background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;border:2px solid #fff}
.card.locked{opacity:.62;filter:grayscale(.65)}
.card.locked:hover{transform:none;box-shadow:var(--shadow)}
.card .lock{position:absolute;top:7px;right:8px;z-index:2;width:24px;height:24px;border-radius:50%;
  background:rgba(40,32,22,.82);color:#e9d5a8;display:flex;align-items:center;justify-content:center;font-size:11px;border:2px solid rgba(255,255,255,.7)}
.lock-tip{color:#8a6b45;font-weight:700}
.card .meta{padding:9px 10px 11px}
.card .trib{font-family:simkai,"KaiTi",serif;font-size:18px;font-weight:700;color:var(--ink);margin-bottom:2px}
.card .foe{font-size:12px;color:var(--red2)}
.card .elo{font-size:11px;color:#9c8763;margin-top:5px;display:flex;justify-content:space-between}
.elo-dots{display:inline-flex;gap:2px;vertical-align:middle}
.elo-dots i{width:5px;height:5px;border-radius:50%;background:#cbb78f;display:block}
.elo-dots i.on{background:var(--red)}

/* 弹层 */
.modal{position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;padding:20px}
.modal.show{display:flex}
.modal-mask{position:absolute;inset:0;background:rgba(20,14,8,.72)}
.modal-card{position:relative;z-index:2;width:min(900px,96vw);max-height:92vh;overflow:auto;background:var(--paper);
  border:2px solid var(--gold);border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.modal-close{position:absolute;top:10px;right:14px;z-index:5;width:36px;height:36px;border:0;border-radius:50%;
  background:rgba(0,0,0,.5);color:#fff;font-size:24px;cursor:pointer;line-height:1}
.detail-img{width:100%;display:block;border-bottom:1px solid var(--line)}
.detail-body{padding:20px 26px 26px}
.detail-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.detail-head h3{font-family:simkai,"KaiTi",serif;font-size:32px;color:var(--red2);margin:0;letter-spacing:3px}
.detail-head .chap{color:#9c8763;font-size:13px}
.detail-tags{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 14px}
.tag{background:#efe3c9;border:1px solid var(--line);border-radius:20px;padding:4px 14px;font-size:13px;color:var(--ink2)}
.tag.foe{background:#f6dede;border-color:#e5b9b9;color:var(--red2)}
.story-box{background:linear-gradient(135deg,#faf3e3,#f0e3c8);border-left:4px solid var(--gold);
  padding:16px 18px;border-radius:0 8px 8px 0;font-size:16px;line-height:2;color:#3d3125;margin:14px 0}
.detail-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px}
.btn-next{background:linear-gradient(135deg,#c0392b,#7d1c1c)}
.tip{font-size:12px;color:#9c8763;margin-left:auto}

.footer{text-align:center;padding:22px;color:#9c8763;font-size:12px;border-top:1px solid var(--line);background:#efe3c9}

@media(max-width:640px){
  .hero{padding:30px 16px}
  .hero h1{font-size:34px}
  .seal-big{width:56px;height:56px;font-size:20px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
  .card .thumb{height:80px}
  .detail-head h3{font-size:26px}
}

/* ★观影按钮 + 观影层（2026-11-18）：已通关关卡随时重看通关影片 */
.btn-watch{background:linear-gradient(135deg,#2f6f8f,#1d4a63);color:#fff;box-shadow:0 4px 14px rgba(30,80,110,.35)}
.btn-watch:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(30,80,110,.5)}
.watch-modal{position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;padding:20px}
.watch-modal.show{display:flex}
.watch-mask{position:absolute;inset:0;background:rgba(8,10,16,.85)}
.watch-card{position:relative;z-index:2;width:min(880px,96vw);max-height:94vh;overflow:auto;background:#1b2233;
  border:2px solid #e8c26a;border-radius:16px;box-shadow:0 20px 70px rgba(0,0,0,.7);padding:20px;color:#f0e9d8}
.watch-close{position:absolute;top:10px;right:14px;z-index:5;width:36px;height:36px;border:0;border-radius:50%;
  background:rgba(255,255,255,.14);color:#fff;font-size:24px;line-height:34px;cursor:pointer}
.watch-close:hover{background:rgba(255,255,255,.28)}
.watch-head{font-size:20px;font-weight:700;color:#f6d98a;padding:2px 44px 14px 4px}
.watch-head .watch-sub{font-size:13px;font-weight:400;color:#a99a76}
.watch-stage{position:relative;width:100%;aspect-ratio:7/4;background:#000;border-radius:10px;overflow:hidden}
.watch-stage video,.watch-stage iframe{display:block;width:100%;height:100%;border:0}
.watch-foot{padding-top:12px;font-size:13px;color:#cbbd9c;line-height:1.7}
@media(max-width:640px){
  .watch-card{width:96vw;padding:14px}
  .watch-head{font-size:16px;padding-right:40px}
  .watch-stage{aspect-ratio:4/3}
}

/* ★AI角色对话按钮 + 对话层（2026-11-18）：气泡聊天 + 打字机 */
.btn-talk{background:linear-gradient(135deg,#7a5aa8,#503578);color:#fff;box-shadow:0 4px 14px rgba(80,53,120,.35)}
.btn-talk:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(80,53,120,.5)}
.talk-card{position:relative;z-index:2;width:min(560px,96vw);max-height:92vh;display:flex;flex-direction:column;
  background:#171d2b;border:2px solid #9a7fd0;border-radius:16px;box-shadow:0 20px 70px rgba(0,0,0,.7);padding:18px;color:#eee7f7}
.talk-head{font-size:19px;font-weight:700;color:#cbb2f5;padding:2px 44px 12px 4px;border-bottom:1px solid rgba(155,127,208,.28)}
.talk-head .watch-sub{font-size:12px;font-weight:400;color:#9a8bb5}
.talk-body{flex:1;min-height:220px;max-height:52vh;overflow-y:auto;padding:16px 6px;display:flex;flex-direction:column;gap:12px}
.talk-row{display:flex;align-items:flex-end;gap:8px;max-width:88%}
.talk-row-me{align-self:flex-end;flex-direction:row-reverse}
.talk-av{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#9a7fd0,#5e3f8c);
  color:#fff;font-size:15px;display:flex;align-items:center;justify-content:center}
.talk-bubble{padding:9px 13px;border-radius:14px;font-size:14.5px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.talk-row-foe .talk-bubble{background:#2a2440;color:#e8def7;border-bottom-left-radius:4px}
.talk-row-me .talk-bubble{background:#3a5a7a;color:#eaf4ff;border-bottom-right-radius:4px}
.talk-thinking{color:#9a8bb5;font-style:italic}
.talk-thinking::after{content:'';animation:talk-dots 1.2s steps(4,end) infinite}
@keyframes talk-dots{0%{content:''}25%{content:'·'}50%{content:'··'}75%{content:'···'}100%{content:''}}
.talk-input-row{display:flex;gap:8px;padding-top:12px;border-top:1px solid rgba(155,127,208,.28)}
.talk-input{flex:1;min-width:0;padding:10px 13px;border-radius:10px;border:1px solid #4a3d63;background:#221a33;
  color:#f0e9f8;font-size:14px;outline:none}
.talk-input:focus{border-color:#9a7fd0}
.talk-send{padding:10px 18px;border:0;border-radius:10px;background:linear-gradient(135deg,#9a7fd0,#5e3f8c);color:#fff;
  font-size:14px;cursor:pointer;white-space:nowrap}
.talk-send:hover{filter:brightness(1.12)}
.talk-foot{padding-top:8px;font-size:11.5px;color:#7f7396;text-align:center}
@media(max-width:640px){
  .talk-card{width:96vw;padding:13px;max-height:94vh}
  .talk-head{font-size:16px;padding-right:40px}
  .talk-body{min-height:180px;max-height:48vh}
  .talk-bubble{font-size:14px}
}
