/* 旅绘记 一体机网页版 —— 自适应、触控友好、国风基调 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: radial-gradient(120% 120% at 50% 0%, #2a3a3c 0%, #1a2426 60%, #0f1517 100%);
  color: #f5f0e6; user-select: none; -webkit-user-select: none;
}
#app { height: 100dvh; width: 100vw; }
.screen {
  height: 100%; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4vh; padding: 6vh 6vw;
  text-align: center;
}
.hidden { display: none !important; }

/* 字号自适应 */
.brand { font-size: clamp(3rem, 9vw, 7rem); letter-spacing: .3em; font-weight: 700; color: #e8d5a2; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.slogan { font-size: clamp(1.2rem, 3.4vw, 2.4rem); color: #f5f0e6; margin-top: 2vh; }
.sub { font-size: clamp(.9rem, 2.2vw, 1.4rem); color: #9fb0a8; letter-spacing: .2em; margin-top: 1vh; }
.hint { font-size: clamp(.85rem, 2vw, 1.1rem); color: #7a8a85; }
.privacy-note { font-size: clamp(.68rem, 1.6vw, .95rem); color: #6a7a75; line-height: 1.8; max-width: min(82vw, 540px); margin-top: 3.5vh; letter-spacing: .03em; text-align: center; }
.privacy-note a { color: #c8b890; text-decoration: underline; }

/* 拍照同意弹层 */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 6vw; }
.overlay-card { background: linear-gradient(160deg, #2a3a3c, #1a2426); border: 1px solid rgba(232,213,162,.3); border-radius: 20px; padding: 5vh 6vw; max-width: min(92vw, 560px); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.overlay-title { font-size: clamp(1.05rem, 2.8vw, 1.5rem); color: #e8d5a2; margin-bottom: 2.5vh; }
.overlay-card p { font-size: clamp(.8rem, 1.8vw, 1.02rem); color: #d4cfc3; line-height: 1.75; margin-bottom: 1.8vh; }
.overlay-card p b { color: #e8d5a2; }
.overlay-sub { color: #9fb0a8 !important; font-size: clamp(.72rem, 1.5vw, .88rem) !important; }
.overlay-actions { display: flex; flex-wrap: nowrap; gap: 3vw; justify-content: center; margin: 2.5vh 0 2vh; }
.overlay-actions .btn { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; padding: .85em 1em; white-space: nowrap; font-size: clamp(.95rem, 2.3vw, 1.4rem); letter-spacing: 0; }
.overlay-link { color: #c8b890; font-size: clamp(.8rem, 1.9vw, 1rem); text-decoration: underline; display: inline-block; margin-top: 1vh; }

/* 按钮 —— 触控大目标 */
.btn {
  font-size: clamp(1.1rem, 2.8vw, 1.8rem); padding: 1.1em 2.2em; border-radius: 999px;
  border: none; cursor: pointer; font-family: inherit; letter-spacing: .15em; transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, #c8964b, #a8645b); color: #fff; box-shadow: 0 6px 24px rgba(168,100,91,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: #e8d5a2; border: 1px solid rgba(232,213,162,.4); }
.btn:disabled { opacity: .4; }

/* 顶栏 */
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 3vh 5vw; }
.btn-back { background: none; border: none; color: #c8b890; font-size: clamp(1rem,2.6vw,1.6rem); cursor: pointer; font-family: inherit; }
.step { color: #9fb0a8; font-size: clamp(.9rem,2.2vw,1.3rem); letter-spacing: .1em; }

/* 拍照 */
.cam-wrap { position: relative; width: min(90vw, 60vh); aspect-ratio: 3/4; border-radius: 24px; overflow: hidden; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
#cam { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); } /* 镜像，自拍体验 */
.face-guide { position: absolute; top: 12%; left: 22%; right: 22%; height: 52%; border: 3px dashed rgba(232,213,162,.7); border-radius: 50%; pointer-events: none; }
.cam-tip { position: absolute; bottom: 4%; left: 5%; right: 5%; font-size: clamp(.8rem,1.9vw,1.1rem); color: #fff; text-shadow: 0 1px 4px #000; }
.cam-actions { display: flex; gap: 3vw; flex-wrap: wrap; justify-content: center; }

/* 选择题 */
.q-title { font-size: clamp(1.4rem, 4vw, 2.6rem); color: #e8d5a2; margin-bottom: 2vh; }
.options { display: flex; flex-direction: column; gap: 2.2vh; width: min(80vw, 70vh); }
.opt {
  font-size: clamp(1.1rem, 2.8vw, 1.7rem); padding: 1.2em 1.5em; border-radius: 18px;
  background: rgba(255,255,255,.07); border: 2px solid rgba(232,213,162,.3); color: #f5f0e6;
  cursor: pointer; font-family: inherit; text-align: left; transition: all .15s;
}
.opt .opt-desc { display: block; font-size: .62em; color: #9fb0a8; margin-top: .3em; letter-spacing: .02em; }
.opt:active, .opt:hover { background: rgba(200,150,75,.18); border-color: #c8964b; transform: scale(1.02); }

/* 等待 */
.ink-spinner { width: clamp(80px,14vw,140px); height: clamp(80px,14vw,140px); border-radius: 50%;
  border: 4px solid rgba(232,213,162,.2); border-top-color: #c8964b; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-title { font-size: clamp(1.3rem,3.6vw,2.2rem); color: #e8d5a2; }
.wait-stage { font-size: clamp(1rem,2.6vw,1.5rem); color: #9fb0a8; letter-spacing: .1em; }
.progress { width: min(70vw,50vh); height: 10px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg,#c8964b,#a8645b); transition: width .4s; }
.wait-tip { font-size: clamp(.85rem,2vw,1.1rem); color: #7a8a85; }

/* 结果 */
.result-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; overflow: visible; }
.scenic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 35vw), 1fr)); gap: 2.5vh; width: min(90vw, 800px); }
#result-video { width: min(46vh, 42vw); aspect-ratio: 9/16; border-radius: 16px; background: #000; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.video-wrap { position: relative; }
.video-wrap .watermark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; pointer-events: none; }
.wm-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 3vh 4vw; transform: rotate(-22deg); }
.wm-grid span { font-size: clamp(1rem,2.4vw,1.6rem); color: rgba(255,255,255,.34); letter-spacing: .15em; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.r-title { font-size: clamp(1.1rem,2.8vw,1.6rem); color: #e8d5a2; }
.r-posters { display: flex; gap: 2vw; flex-wrap: wrap; justify-content: center; }
.r-posters img { height: 16vh; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.pay-area, .unlocked { display: flex; flex-direction: column; align-items: center; gap: 1.5vh; }
.pay-qr img { width: clamp(160px,22vw,240px); height: clamp(160px,22vw,240px); background: #fff; padding: 8px; flex-shrink: 0; }
.pay-info { font-size: clamp(.95rem,2.3vw,1.3rem); color: #f5f0e6; }
.pay-info b { color: #e8d5a2; }

/* 横屏适配（结果页内容太长，改为可滚动 + 缩小间距+QR） */
@media (orientation: landscape) {
  #screen-result { justify-content: flex-start; overflow-y: auto; gap: 1.8vh; padding-top: 2vh; padding-bottom: 3vh; }
  #result-video { width: min(42vh, 32vw); }
  .pay-qr img { width: clamp(120px, 14vw, 160px); height: clamp(120px, 14vw, 160px); padding: 5px; }
  .pay-area, .unlocked { gap: 0.8vh; }
  .pay-info { font-size: clamp(.8rem, 1.8vw, 1rem); }
  .r-title { font-size: clamp(.9rem, 2vw, 1.2rem); }
}
