/* ============================================================
 * 《2019》智慧卡剧 · 视觉
 * 2049冷蓝夜 × 2019暖琥珀 × 命运卡鎏金
 * ============================================================ */

:root {
  --bg: #05070d;
  --bg2: #0a0f1c;
  --panel: #0d1424;
  --panel2: #111a2e;
  --line: rgba(120, 160, 255, 0.14);
  --amber: #f2b03d;
  --amber-soft: rgba(242, 176, 61, 0.14);
  --cyan: #57d7ff;
  --gold: #d9b36a;
  --text: #dce6f5;
  --dim: #7285a3;
  --warn: #ff9d6b;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html.no-anim *, html.no-anim *::before, html.no-anim *::after {
  animation: none !important;
  transition: none !important;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(87, 215, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at 15% 110%, rgba(242, 176, 61, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 24px;
  overflow-x: auto;
}

/* ————— 桌面侧栏 ————— */
.side { max-width: 300px; }
.side-kicker { font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: 2px; opacity: 0.85; }
.side-title {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 42px rgba(242, 176, 61, 0.35), 0 0 90px rgba(87, 215, 255, 0.2);
  margin: 12px 0 6px;
}
.side-sub { color: var(--gold); letter-spacing: 8px; font-size: 14px; }
.side-note {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2.1;
  color: var(--dim);
  border-left: 2px solid var(--line);
  padding-left: 16px;
}
.side-tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.side-tags span {
  font-size: 11px; color: var(--cyan);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; letter-spacing: 1px;
}
.side-fine { margin-top: 36px; font-size: 11px; color: #45536b; line-height: 1.8; }

/* ————— 手机 ————— */
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone {
  width: min(412px, 94vw);
  height: min(860px, 92vh);
  background: #05070c;
  border: 1px solid rgba(160, 190, 255, 0.16);
  border-radius: 44px;
  box-shadow:
    0 0 0 8px #0b0e16,
    0 0 60px rgba(87, 215, 255, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #05070c; border-radius: 12px; z-index: 30;
}
#statusBar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px 6px; font-family: var(--mono);
  font-size: 11px; color: var(--dim); letter-spacing: 1px; z-index: 20;
}
#screen {
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px 22px;
  scrollbar-width: thin;
  scrollbar-color: #223 transparent;
}
#tabbar {
  display: flex; border-top: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.9); backdrop-filter: blur(8px);
}
#tabbar .tab {
  flex: 1; background: none; border: none; color: var(--dim);
  font-family: var(--sans); font-size: 11px; padding: 10px 0 18px;
  cursor: pointer; letter-spacing: 2px; transition: color 0.2s;
}
#tabbar .tab span { display: block; font-size: 17px; margin-bottom: 2px; }
#tabbar .tab.active { color: var(--amber); }
.homebar { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 120px; height: 4px; border-radius: 4px; background: #2a3142; }
.platform-flag {
  font-size: 11px; color: var(--dim); letter-spacing: 1px; cursor: pointer;
  border: 1px solid var(--line); padding: 5px 14px; border-radius: 999px;
  transition: color 0.2s;
}
.platform-flag:hover { color: var(--cyan); }

/* ————— 首页 ————— */
.hero { text-align: center; padding: 26px 0 18px; }
.hero-kicker { font-family: var(--mono); font-size: 10px; color: var(--cyan); letter-spacing: 3px; }
.hero-title {
  font-family: var(--serif); font-size: 76px; color: #fff; letter-spacing: 8px;
  text-shadow: 0 0 30px rgba(242, 176, 61, 0.4), 0 0 80px rgba(87, 215, 255, 0.25);
  margin: 10px 0 4px; animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .88; } }
.hero-sub { color: var(--gold); letter-spacing: 10px; font-size: 13px; }
.hero-meta { margin-top: 10px; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.hero .btn { margin-top: 18px; }

.section-title { font-size: 13px; color: var(--dim); letter-spacing: 3px; margin: 20px 2px 10px; font-weight: normal; }

.chapter-list { display: flex; flex-direction: column; gap: 8px; }
.chapter-item {
  display: flex; gap: 14px; align-items: center; text-align: left;
  font-family: inherit; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; transition: transform 0.15s, border-color 0.15s;
}
.chapter-item.clickable, .chapter-item:not(.locked) { cursor: pointer; }
.chapter-item:not(.locked):hover { transform: translateX(3px); border-color: rgba(242, 176, 61, 0.4); }
.chapter-item.locked { opacity: 0.55; cursor: pointer; }
.ch-no { font-family: var(--serif); font-size: 24px; color: var(--gold); width: 34px; text-align: center; }
.ch-title { font-size: 14px; color: var(--text); }
.ch-desc { font-size: 11px; color: var(--dim); margin-top: 3px; }
.tag { font-size: 10px; padding: 1px 8px; border-radius: 999px; margin-left: 6px; letter-spacing: 1px; }
.tag-free { color: #7fe3a0; border: 1px solid rgba(127, 227, 160, 0.4); }
.tag-preview { color: var(--cyan); border: 1px solid rgba(87, 215, 255, 0.4); }
.tag-soon { color: var(--dim); border: 1px solid var(--line); }

/* ————— 观看 ————— */
.watch { display: flex; flex-direction: column; min-height: 100%; }
.watch-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 2px 12px; font-size: 12px; color: var(--dim);
  position: sticky; top: 0; background: linear-gradient(180deg, #05070c 80%, transparent);
  z-index: 5;
}
.watch-title { color: var(--text); letter-spacing: 1px; }
.back { cursor: pointer; padding: 4px 8px 4px 0; }
.back:hover { color: var(--amber); }
.trust-chip { font-family: var(--mono); font-size: 11px; color: var(--gold); }
.watch-body { display: flex; flex-direction: column; gap: 16px; padding-bottom: 30px; }

.anim-in { animation: fadein 0.7s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(14px); } }

/* 场景字幕卡 */
.scene-card {
  background: linear-gradient(180deg, #070a12, #0b101d);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 22px; position: relative; overflow: hidden;
}
.scene-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.012) 3px 4px);
}
.scene-place { font-family: var(--serif); color: var(--gold); font-size: 15px; letter-spacing: 3px; }
.scene-time { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin: 6px 0 20px; letter-spacing: 2px; }
.scene-para { font-family: var(--serif); font-size: 15px; line-height: 2.05; color: var(--text); margin-bottom: 12px; }
.scene-line { font-size: 14px; line-height: 1.9; color: var(--dim); margin-bottom: 10px; }
.scene-line b { color: var(--amber); font-weight: normal; }

/* 2049终端 */
.terminal {
  background: #020509; border: 1px solid rgba(87, 215, 255, 0.25); border-radius: 16px;
  padding: 26px 20px; font-family: var(--mono); font-size: 12px; color: #9fe8ff;
  box-shadow: inset 0 0 40px rgba(87, 215, 255, 0.05);
}
.term-line { line-height: 2.1; animation: fadein 0.5s ease both; white-space: pre-wrap; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 论坛（2019） */
.forum { background: #0c111c; border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.forum-board { font-size: 11px; color: var(--dim); letter-spacing: 1px; }
.forum-title { font-size: 16px; font-weight: 600; color: #fff; margin: 8px 0 4px; line-height: 1.5; }
.forum-heat { font-size: 11px; color: #c96f4a; margin-bottom: 14px; }
.op-post {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(120deg, rgba(242,176,61,0.08), rgba(87,215,255,0.06));
  border: 1px solid rgba(217, 179, 106, 0.35);
}
.op-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #05070c;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  font-weight: bold;
}
.op-name { font-family: var(--mono); letter-spacing: 3px; color: var(--gold); }
.qa { border-top: 1px dashed rgba(120,160,255,0.12); padding: 12px 2px; }
.qa .q { font-size: 13px; color: var(--dim); line-height: 1.7; margin-bottom: 8px; }
.qa .a {
  font-family: var(--serif); font-size: 15px; color: #ffe9c4; line-height: 1.9;
  padding-left: 10px; border-left: 2px solid rgba(242, 176, 61, 0.5);
}

/* 聊天 */
.chat { background: #0a0f18; border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; }
.chat-title { text-align: center; font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.65; margin-bottom: 10px;
  animation: fadein 0.5s ease both;
}
.bubble.them { background: #1a2333; border: 1px solid var(--line); }
.bubble.me { background: linear-gradient(135deg, #3a5c46, #2e4a38); margin-left: auto; }

/* ————— 命运卡 ————— */
.card-choice { text-align: center; padding: 20px 0; }
.card-prompt { font-family: var(--serif); color: var(--gold); font-size: 16px; letter-spacing: 2px; margin-bottom: 26px; animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { text-shadow: 0 0 24px rgba(242, 176, 61, 0.65); } }
.card-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.dcard {
  width: 138px; height: 200px; perspective: 900px; cursor: pointer;
  font-family: inherit; border: none; padding: 0; background: none; color: inherit;
  animation: cardin 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  animation-delay: calc(var(--i) * 0.18s);
}
@keyframes cardin { from { opacity: 0; transform: translateY(40px) rotate(4deg); } }
.dcard-face {
  width: 100%; height: 100%; border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 235, 190, 0.12), transparent 55%),
    linear-gradient(160deg, #17203a, #0b1120 70%);
  border: 1.5px solid rgba(217, 179, 106, 0.65);
  box-shadow: 0 0 24px rgba(217, 179, 106, 0.12), inset 0 0 30px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dcard:hover .dcard-face {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 14px 40px rgba(217, 179, 106, 0.25);
  border-color: var(--gold);
}
.dcard-sigil { font-size: 40px; color: var(--gold); text-shadow: 0 0 18px rgba(242, 176, 61, 0.6); }
.dcard-label { font-size: 13px; color: var(--text); letter-spacing: 1px; padding: 0 8px; line-height: 1.5; }

/* ————— 本集终 ————— */
.ep-end { text-align: center; padding: 44px 10px 20px; }
.ep-end-title { font-family: var(--serif); font-size: 30px; color: #fff; letter-spacing: 10px; text-shadow: 0 0 30px rgba(242,176,61,0.4); }
.ep-end-ch { color: var(--gold); margin: 12px 0 18px; letter-spacing: 2px; }
.ep-end-stats { font-size: 13px; line-height: 2; color: var(--text); }
.ep-end-stats .dim { font-size: 12px; }
.ep-end-cards { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.ep-end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.ep-end-note { text-align: center; font-size: 11px; color: var(--dim); margin-top: 20px; }

/* ————— 卡册 ————— */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.album-card {
  background: linear-gradient(165deg, #141d33, #0b111f);
  border: 1px solid rgba(217, 179, 106, 0.4); border-radius: 12px;
  padding: 14px 8px; text-align: center;
}
.album-card.unowned { filter: grayscale(1); opacity: 0.4; border-color: var(--line); }
.album-sigil { font-size: 26px; color: var(--gold); }
.album-name { font-size: 12px; margin-top: 6px; color: var(--text); }
.album-rare { font-size: 10px; color: var(--gold); margin: 4px 0; letter-spacing: 2px; }
.album-desc { font-size: 10px; color: var(--dim); line-height: 1.6; }

/* ————— 我的 ————— */
.me-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.me-title { font-size: 14px; color: var(--gold); letter-spacing: 2px; margin-bottom: 14px; }
.me-row { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--line); color: var(--dim); }
.me-row b { color: var(--text); font-weight: normal; max-width: 60%; text-align: right; }
.me-row .pts { color: var(--gold); }
.me-actions { display: flex; gap: 10px; margin-top: 16px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.auth-form input {
  background: #0a0f1a; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 14px; padding: 11px 14px; outline: none;
}
.auth-form input:focus { border-color: var(--cyan); }
.auth-msg { font-size: 12px; color: var(--warn); min-height: 16px; }
.pad { padding: 4px 2px; }
.tiny { font-size: 10px; line-height: 1.8; }
.preview-note {
  font-size: 11px; color: var(--cyan);
  border: 1px dashed rgba(87, 215, 255, 0.4); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 10px; line-height: 1.7;
}

/* ————— 问事 · 逆旅 ————— */
.oracle { padding: 18px 4px 8px; text-align: center; }
.oracle-kicker { font-family: var(--mono); font-size: 10px; color: var(--cyan); letter-spacing: 3px; }
.oracle-title { font-family: var(--serif); font-size: 30px; color: #fff; letter-spacing: 6px; margin: 10px 0 8px; text-shadow: 0 0 24px rgba(242,176,61,0.35); }
.oracle-copy { font-family: var(--serif); font-size: 13px; color: var(--dim); line-height: 2; margin-bottom: 16px; }
.oracle-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.oracle-form textarea {
  background: #0a0f1a; border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.8;
  padding: 13px 15px; outline: none; resize: vertical;
}
.oracle-form textarea:focus { border-color: var(--gold); }
.oracle-price { font-size: 12px; color: var(--gold); letter-spacing: 1px; text-align: center; }
.oracle-answer { margin-top: 20px; background: linear-gradient(180deg, #0b101d, #070a12); border: 1px solid rgba(217,179,106,0.35); border-radius: 14px; padding: 20px 16px; }
.oracle-sigil { font-size: 26px; color: var(--gold); text-shadow: 0 0 16px rgba(242,176,61,0.6); margin-bottom: 10px; }
.oracle-text { font-family: var(--serif); font-size: 15px; line-height: 2.1; color: #ffe9c4; white-space: pre-wrap; }
.oracle-foot { margin-top: 12px; font-family: var(--mono); font-size: 10px; color: var(--dim); }

/* ————— 按钮 ————— */
.btn {
  font-family: var(--sans); font-size: 13px; letter-spacing: 2px;
  border-radius: 999px; padding: 11px 22px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #f2b03d, #d98a1f); color: #14100a;
  font-weight: 600; box-shadow: 0 4px 24px rgba(242, 176, 61, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(242, 176, 61, 0.4); }
.btn-gold { background: transparent; color: var(--gold); border-color: rgba(217, 179, 106, 0.6); }
.btn-gold:hover { background: rgba(217, 179, 106, 0.1); }
.btn-ghost { background: transparent; color: var(--dim); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--dim); }
.btn-next { margin: 4px auto 0; min-width: 120px; display: block; animation: fadein 1.2s ease both; }

/* ————— 弹窗 / 提示 ————— */
.modal-mask {
  position: fixed; inset: 0; background: rgba(2, 4, 8, 0.75);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(4px); animation: fadein 0.25s ease;
}
.modal {
  width: min(360px, 92vw); background: linear-gradient(180deg, #101828, #0a101c);
  border: 1px solid rgba(217, 179, 106, 0.4); border-radius: 20px;
  padding: 26px 22px; text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.pw-kicker { font-family: var(--mono); font-size: 10px; color: var(--cyan); letter-spacing: 3px; }
.pw-title { font-family: var(--serif); font-size: 24px; color: #fff; margin: 12px 0 8px; }
.pw-desc { font-size: 12px; color: var(--dim); line-height: 1.8; margin-bottom: 14px; }
.pw-price { font-size: 15px; color: var(--gold); margin-bottom: 10px; }
.pw-status { font-size: 13px; padding: 10px; background: rgba(87, 215, 255, 0.05); border-radius: 10px; margin-bottom: 16px; }
.pw-actions { display: grid; gap: 9px; }
.warn { color: var(--warn); }
.dim { color: var(--dim); }

#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(10, 16, 28, 0.95); color: var(--text);
  border: 1px solid rgba(217, 179, 106, 0.5); border-radius: 999px;
  font-size: 13px; padding: 10px 22px; letter-spacing: 1px;
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 200;
  max-width: 88vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 自动放映角标 */
#autoBadge {
  position: absolute; top: 46px; right: 18px; z-index: 40;
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  color: #05070c; background: var(--cyan);
  border-radius: 6px; padding: 3px 8px;
  animation: badgeblink 1.6s ease-in-out infinite;
}
@keyframes badgeblink { 50% { opacity: 0.55; } }
html.no-anim #autoBadge { animation: none; }

/* ————— 响应式 ————— */
@media (max-width: 900px) {
  body { padding: 12px; }
  .side { display: none; }
}
@media (max-width: 460px) {
  .phone { width: 100vw; height: 100vh; border-radius: 0; border: none; box-shadow: none; }
  .notch, .homebar { display: none; }
  .platform-flag { display: none; }
}

/* ————— v1.4.2 命运卡卡面 PNG 接入 ————— */
.dcard-face{background-size:cover;background-position:center;}
.dcard-face .dcard-sigil{background:rgba(4,6,12,.35);border-radius:12px;padding:6px 12px;}
.dcard-face .dcard-label{background:rgba(4,6,12,.55);border-radius:8px;padding:3px 8px;}
.album-card{background-size:cover;background-position:center;}
.album-card .album-name,.album-card .album-rare,.album-card .album-desc{background:rgba(4,6,12,.45);border-radius:6px;padding:1px 4px;display:inline-block;}

/* ————— v1.4.9 电视剧感转场 ————— */
#nodeVidWrap{transition:opacity .42s ease;}
#nodeVidWrap.out{opacity:0;}
.watch .scene,.watch .terminal,.watch .post,.watch .chat{animation:fadeUp .5s ease both;}
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.no-anim .watch .scene,.no-anim .watch .terminal,.no-anim .watch .post,.no-anim .watch .chat{animation:none;}
.no-anim #nodeVidWrap{transition:none;}
