/* ============================================================
   游戏开始页 start.html
   ------------------------------------------------------------
   风格：2012 年校园论坛的门面。不是黑屏恐怖页 ——
   这一页要像「那时候的一个站」，玩家点进来以为自己在看论坛。
   所以用论坛的蓝白配色、宋体标题、细边框卡片。

   改动提示：
   · 换个颜色改 :root 里的变量
   · 想整体变黑改 body.st-body 的 background 和 --ink / --line
   ============================================================ */

:root {
  --blue: #1d5fb8;
  --blue-dark: #17488c;
  --blue-light: #eaf2fe;
  --ink: #2c3038;
  --ink-2: #5b6478;
  --ink-3: #9aa1ad;
  --line: #e2e6ee;
  --bg: #eef1f6;
  --card: #ffffff;
  --red: #a3141b;
  --green: #2f7a45;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.st-body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.75 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ---------- 背景水印 ---------- */
.st-bg {
  position: fixed;
  left: -6%;
  top: 0;
  width: 112%;
  height: 200%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  font-family: "Courier New", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: .18em;
  color: rgba(29, 95, 184, .045);
  white-space: pre-wrap;
  word-break: break-all;
  animation: stDrift 62s linear infinite;
}

@keyframes stDrift {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* ---------- 主体 ---------- */
.st-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
}

/* ---------- 标题 ---------- */
.st-head {
  text-align: center;
  padding: 8px 0 26px;
}

.st-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  font-size: 32px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(29, 95, 184, .22);
  user-select: none;
}

.st-title {
  margin: 0;
  font-family: "Songti SC", SimSun, "宋体", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--blue-dark);
  text-indent: .1em;
}

.st-year {
  margin: 6px 0 0;
  font-family: "Songti SC", SimSun, "宋体", serif;
  font-size: 13px;
  letter-spacing: .34em;
  color: var(--ink-3);
  text-indent: .34em;
}

.st-sub {
  margin: 14px 0 0;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--ink-2);
}

/* ---------- 主按钮 ---------- */
.st-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.st-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 4px;
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}

.st-btn:hover {
  color: var(--blue);
  border-color: #bcd2ef;
  background: #fafcff;
}

.st-btn:active {
  transform: translateY(1px);
}

.st-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(29, 95, 184, .2);
}

.st-btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.st-btn-ghost {
  background: transparent;
  color: var(--ink-2);
}

.st-btn[hidden] { display: none; }

/* ---------- 存档区 ---------- */
.st-saves {
  margin-top: 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 20px 18px;
}

.st-h2 {
  margin: 0;
  font-family: "Songti SC", SimSun, "宋体", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue-dark);
}

.st-note {
  margin: 6px 0 16px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.st-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 一个存档位 */
.st-slot {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  background: #fafbfd;
  display: flex;
  align-items: center;
  gap: 14px;
}

.st-slot.is-empty {
  background: #fbfcfd;
  border-style: dashed;
}

/* 左边那圈 —— 存过档亮蓝，空的灰 */
.st-slot-dot {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef0f4;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

.st-slot.is-used .st-slot-dot {
  background: var(--blue-light);
  color: var(--blue);
}

.st-slot-main {
  flex: 1 1 auto;
  min-width: 0;
}

.st-slot-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-slot.is-empty .st-slot-name {
  font-weight: 400;
  color: var(--ink-3);
}

.st-slot-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

/* 进度小条 */
.st-slot-bar {
  margin-top: 7px;
  height: 4px;
  background: #e8ebf1;
  border-radius: 2px;
  overflow: hidden;
}

.st-slot-fill {
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 2px;
  transition: width .4s ease;
}

.st-slot-ops {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.st-op {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 3px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}

.st-op:hover {
  color: var(--blue);
  border-color: #bcd2ef;
  background: #fafcff;
}

.st-op.st-op-load {
  color: var(--blue-dark);
  border-color: #c7daf3;
  font-weight: 600;
}

.st-op.st-op-load:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

/* ---------- 页脚 ---------- */
.st-foot {
  margin-top: 28px;
  text-align: center;
}

.st-foot-line {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: .04em;
}

.st-foot-dim {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

/* ---------- 确认框 ---------- */
.st-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 26, 36, .48);
}

.st-mask[hidden] { display: none; }

.st-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 6px;
  border-top: 3px solid var(--blue);
  box-shadow: 0 20px 50px rgba(20, 30, 50, .28);
  padding: 22px 22px 18px;
}

.st-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.st-card-text {
  margin: 10px 0 18px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.st-card-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.st-card-btns .st-btn {
  min-width: 88px;
  padding: 8px 16px;
  font-size: 13px;
}

/* ---------- 状态条 ---------- */
.st-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  padding: 9px 16px;
  border-radius: 4px;
  background: #1f2b3d;
  color: #fff;
  font-size: 12.5px;
  letter-spacing: .04em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .26);
}

.st-toast[hidden] { display: none; }

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  body.st-body { padding: 26px 14px; align-items: flex-start; }
  .st-title { font-size: 27px; }
  .st-mark { width: 54px; height: 54px; font-size: 27px; }
  .st-saves { padding: 16px 14px 14px; }
  .st-slot { gap: 10px; padding: 10px 11px; }
  .st-slot-dot { width: 28px; height: 28px; font-size: 12px; }
  .st-slot-ops { flex-direction: row; }
  .st-op { padding: 5px 9px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-bg { animation: none; }
  .st-slot-fill { transition: none; }
}

/* 访客模式/黑红主题下（如果以后要接 keeper.css）不至于爆掉 */
.st-body.is-dark {
  background: #08070a;
  color: #e2413f;
}
.st-body.is-dark .st-saves,
.st-body.is-dark .st-btn,
.st-body.is-dark .st-slot,
.st-body.is-dark .st-card {
  background: #100a0c;
  border-color: #33090d;
  color: #e2413f;
}
.st-body.is-dark .st-title { color: #d01020; }
.st-body.is-dark .st-slot-fill { background: #a3141b; }

/* ---------- 开场自述 ----------
   第一次进来弹一次，关掉之后记在本机，不再打扰。
   免责声明钉在卡片最底下，不跟着正文滚。 */
.st-intro-mask {
  background: rgba(16, 21, 30, .72);
  backdrop-filter: blur(2px);
}

.st-intro-card {
  max-width: 440px;
  padding: 26px 26px 20px;
  display: flex;
  flex-direction: column;
  animation: stIntroIn .42s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes stIntroIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.st-intro-kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink-3);
}

.st-intro-body {
  font-size: 13.5px;
  line-height: 2.05;
  color: var(--ink-2);
  letter-spacing: .02em;
}

.st-intro-body p {
  margin: 0 0 10px;
}

.st-intro-body p:last-child {
  margin-bottom: 0;
}

.st-intro-body .st-intro-hi {
  color: var(--ink);
}

.st-intro-body .st-intro-gap {
  height: 8px;
}

.st-intro-btn {
  align-self: flex-end;
  margin-top: 20px;
  min-width: 96px;
  padding: 8px 18px;
  font-size: 13px;
}

.st-disclaimer {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  line-height: 1.85;
  letter-spacing: .02em;
  color: var(--ink-3);
  text-align: justify;
}
