/* ============================================================
   《金鱼冲云了》ARG — 全站样式
   三套视觉皮肤:
   · body.retro    1999 年个人主页 / 机构内页(米黄纸感 + Win98 窗体)
   · body.term     服务器维护终端(黑底绿字 + 扫描线)
   · body.night    归巢舱 / 结局(深夜天台)
   ============================================================ */

:root {
  --ink: #2b2a26;
  --paper: #ece4cc;
  --paper-dark: #ddd2b4;
  --link: #1a3fbf;
  --visited: #6b2fb3;
  --accent: #b34700;
  --gold: #f5c542;
  --tank-blue-1: #9fd4e8;
  --tank-blue-2: #2a7ba8;
  --win-face: #d4d0c8;
  --win-title-1: #000080;
  --win-title-2: #1084d0;
  --term-green: #46ff7d;
  --term-dim: #1d7a3c;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Times New Roman", "SimSun", "Songti SC", serif;
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
}

img { max-width: 100%; }

a { color: var(--link); }
a:visited { color: var(--visited); }

/* ---------------- 复古底纹 ---------------- */

body.retro {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 64% 74%, rgba(120, 90, 40, .10) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 30%, rgba(120, 90, 40, .08) 0 1.5px, transparent 3px),
    linear-gradient(160deg, rgba(160, 130, 60, .05), rgba(60, 90, 120, .06));
  background-size: 140px 140px, 90px 90px, 70px 70px, 100% 100%;
}

.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

/* ---------------- Win98 窗体 ---------------- */

.win {
  background: var(--win-face);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
  margin: 0 0 22px;
}

.win-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--win-title-1), var(--win-title-2));
  color: #fff;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 8px;
  letter-spacing: 1px;
}

.win-title .win-btns { font-family: monospace; font-weight: 400; letter-spacing: 2px; opacity: .9; }

.win-body { padding: 14px 16px; }

/* ---------------- 首页(阿云的鱼缸) ---------------- */

.home-header { text-align: center; padding: 8px 0 4px; }

.home-title {
  font-family: "SimSun", serif;
  font-size: 44px;
  letter-spacing: 10px;
  margin: 6px 0 2px;
  text-shadow: 2px 2px 0 rgba(42, 123, 168, .25);
}

.home-sub { color: #6b6350; font-size: 14px; letter-spacing: 3px; }

.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.marquee {
  overflow: hidden;
  border-top: 1px dashed #9a8f6e;
  border-bottom: 1px dashed #9a8f6e;
  padding: 4px 0;
  margin: 10px 0 18px;
  white-space: nowrap;
}
.marquee > span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}
@keyframes marquee { to { transform: translateX(-100%); } }

/* 访客计数器 */
.counter {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-weight: 700;
  background: #111;
  color: #39ff5e;
  padding: 2px 8px;
  border: 2px inset #888;
  letter-spacing: 4px;
  font-size: 16px;
}

.hr-wave {
  height: 12px;
  margin: 18px auto;
  width: 88%;
  background: repeating-linear-gradient(90deg,
    transparent 0 6px, rgba(42, 123, 168, .55) 6px 12px);
  border-radius: 6px;
  opacity: .5;
}

/* 鱼缸 */
.tank-frame {
  background: #123;
  border: 10px solid #7a5b33;
  border-radius: 6px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .7), 4px 4px 0 rgba(0, 0, 0, .3);
  line-height: 0;
}
.tank-frame canvas { width: 100%; height: auto; display: block; }
.tank-caption { text-align: center; color: #5c5540; font-size: 13px; margin-top: 8px; letter-spacing: 2px; }

/* ---------------- 门禁表单 ---------------- */

#gate { margin-top: 6px; }
#gate form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }

.gate-input {
  flex: 1 1 220px;
  font-family: inherit;
  font-size: 16px;
  padding: 6px 10px;
  border: 2px inset #9a9a9a;
  background: #fffef2;
  color: var(--ink);
}

.gate-btn, .hint-btn, .replay-btn {
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  font-size: 14px;
  padding: 6px 16px;
  background: var(--win-face);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
  color: var(--ink);
}
.gate-btn:active, .hint-btn:active { border-color: #404040 #fff #fff #404040; }

.gate-msg { min-height: 1.4em; font-size: 14px; color: #7a6a3a; }
.gate-msg-bad { color: #a02020; }

.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}

#gate-pass { display: none; }

.pass-box {
  border: 2px dashed var(--accent);
  background: rgba(245, 197, 66, .12);
  padding: 14px 16px;
  margin-top: 10px;
}
.pass-box .pass-title { font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.pass-box a.next-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
}

.gate-ok #gate form, .gate-ok .gate-msg { display: none; }

/* ---------------- 碎片栏 ---------------- */

.frag-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 6px 0;
}
.frag-label { font-size: 12px; letter-spacing: 2px; color: #7a7057; }

.frag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px dashed #a49a76;
  color: #b3aa8b;
  font-size: 16px;
  background: rgba(255, 255, 255, .35);
}
.frag-got {
  border: 1px solid #caa63a;
  color: #7a5a00;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 70%);
  box-shadow: 0 0 10px rgba(245, 197, 66, .8);
  animation: fragGlow 2.4s ease-in-out infinite;
}
@keyframes fragGlow {
  50% { box-shadow: 0 0 18px rgba(245, 197, 66, 1); }
}

/* ---------------- 提示 ---------------- */

#hints { margin-top: 16px; }
.hint-btn { font-size: 13px; }
.hint-row {
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(42, 123, 168, .08);
  border-left: 3px solid var(--tank-blue-2);
  font-size: 14px;
}

/* ---------------- 拦截页 ---------------- */

.deny-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101418;
}
.deny-box {
  text-align: center;
  color: #cdd6dd;
  border: 2px solid #3a4652;
  background: #161c22;
  padding: 34px 44px;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
  box-shadow: 0 0 40px rgba(0, 0, 0, .6);
}
.deny-icon { font-size: 40px; }
.deny-title { letter-spacing: 6px; color: #ff6b57; margin: 10px 0; }
.deny-hint { color: #77848f; font-size: 13px; }
.deny-back { color: #6fd3ff; display: inline-block; margin-top: 14px; }
.deny-back:visited { color: #6fd3ff; }

/* ---------------- 档案室 ---------------- */

.doc-list { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc-list th, .doc-list td {
  border: 1px solid #a89e7e;
  padding: 5px 10px;
  text-align: left;
}
.doc-list th { background: var(--paper-dark); letter-spacing: 1px; }
.doc-list td.num { font-family: "Courier New", monospace; }

.photo-figure { margin: 0; text-align: center; }
.photo-figure img {
  border: 12px solid #fbf6e8;
  outline: 1px solid #b5a97f;
  box-shadow: 0 4px 14px rgba(60, 45, 10, .35);
  max-width: 100%;
}
.photo-figure figcaption { font-size: 13px; color: #6b6350; margin-top: 8px; }

.guestbook { border-collapse: collapse; width: 100%; font-size: 14px; }
.guestbook td {
  border-bottom: 1px dotted #a89e7e;
  padding: 8px 10px;
  vertical-align: top;
}
.guestbook .gb-meta { white-space: nowrap; color: #6b6350; width: 150px; }
.cipher-line {
  font-family: "Courier New", monospace;
  font-size: 17px;
  letter-spacing: 4px;
  background: #f3edd7;
  padding: 2px 8px;
  border: 1px solid #c9bd92;
  display: inline-block;
}

/* ---------------- 日记(实验室) ---------------- */

.paper {
  background:
    radial-gradient(circle at 85% 8%, rgba(120, 80, 20, .08) 0 60px, transparent 90px),
    radial-gradient(circle at 10% 90%, rgba(120, 80, 20, .07) 0 40px, transparent 70px),
    linear-gradient(180deg, #f4ecd4, #efe5c6);
  border: 1px solid #c4b78d;
  box-shadow: 0 3px 10px rgba(80, 60, 20, .25);
  padding: 26px 30px;
}
.diary-entry { margin: 0 0 26px; }
.diary-entry:last-child { margin-bottom: 0; }
.diary-date {
  font-size: 13px;
  color: #8a7a4a;
  letter-spacing: 2px;
  border-bottom: 1px solid #d8cb9f;
  display: inline-block;
  padding-bottom: 2px;
}
.diary-entry p { margin: 8px 0 0; font-size: 15.5px; }
.diary-first { font-size: 1.35em; color: #443c22; font-weight: 700; }

/* ---------------- 录音室 ---------------- */

.tape-rig {
  background: linear-gradient(180deg, #3c3f44, #26282c);
  border: 2px solid #17181b;
  border-radius: 10px;
  padding: 20px;
  color: #d8dce0;
  font-family: "Microsoft YaHei", sans-serif;
}
.tape-rig audio { width: 100%; margin-top: 12px; }
.tape-label {
  display: inline-block;
  background: #f2ecdc;
  color: #333;
  border-radius: 4px;
  padding: 10px 18px;
  font-family: "Courier New", monospace;
  border: 1px solid #b9ae90;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  transform: rotate(-.6deg);
}
.tape-label b { letter-spacing: 2px; }

/* ---------------- 邮件 ---------------- */

.mail-toolbar {
  background: var(--win-face);
  border-bottom: 1px solid #888;
  padding: 5px 10px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: #444;
}
.mail-head { border-bottom: 1px solid #a89e7e; padding-bottom: 10px; font-size: 14px; }
.mail-head p { margin: 3px 0; }
.mail-head .lbl { color: #6b6350; display: inline-block; width: 74px; }
.mail-body-text { font-size: 15px; margin-top: 12px; }
.b64-line {
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
  background: #f3edd7;
  border: 1px solid #c9bd92;
  padding: 2px 8px;
  display: inline-block;
  word-break: break-all;
}

/* ---------------- 维护终端 ---------------- */

body.term {
  background: #05130a;
  color: var(--term-green);
  font-family: "Courier New", "SimSun", monospace;
}
body.term .page-wrap { max-width: 900px; }
.term-screen {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 50% 40%, rgba(30, 120, 60, .18), transparent 75%),
    #041008;
  border: 2px solid var(--term-dim);
  box-shadow: inset 0 0 60px rgba(0, 60, 20, .5);
  padding: 24px 26px 30px;
  min-height: 60vh;
  font-size: 15px;
  line-height: 1.9;
  text-shadow: 0 0 6px rgba(70, 255, 125, .45);
}
.term-screen .dim { color: var(--term-dim); }
.term-screen .warn { color: #ffd23e; }
.term-screen .err { color: #ff5f4e; }
.cursor-blink { animation: blink 1s steps(1) infinite; }
.term-titlebar {
  color: #04220f;
  background: var(--term-dim);
  padding: 4px 10px;
  font-family: "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
  font-size: 13px;
}
body.term .gate-input {
  background: #03120a;
  border: 1px solid var(--term-dim);
  color: var(--term-green);
  font-family: "Courier New", monospace;
}
body.term .gate-btn, body.term .hint-btn {
  background: transparent;
  border: 1px solid var(--term-dim);
  color: var(--term-green);
}
body.term .gate-msg-bad { color: #ff5f4e; }
body.term .pass-box { border-color: var(--term-dim); background: rgba(70, 255, 125, .06); }
body.term .pass-box .pass-title { color: var(--term-green); }
body.term .frag-label { color: var(--term-dim); }
body.term .frag { border-color: var(--term-dim); color: var(--term-dim); background: transparent; }
body.term .frag-got {
  color: #05130a;
  border-color: var(--term-green);
  background: var(--term-green);
  box-shadow: 0 0 10px rgba(70, 255, 125, .7);
}
body.term a { color: #7dffb0; }
body.term a:visited { color: #7dffb0; }
body.term .hint-row { background: rgba(70, 255, 125, .05); border-left-color: var(--term-green); color: var(--term-green); }

/* ---------------- 归巢舱 / 结局 ---------------- */

body.night {
  background: radial-gradient(ellipse at 50% 120%, #123, #060a18 65%);
  color: #dfe8f5;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
}
.night .page-wrap { max-width: 980px; }

.hatch-rig {
  border: 1px solid #2c3c5c;
  background: rgba(10, 18, 38, .75);
  box-shadow: 0 0 30px rgba(20, 40, 90, .5);
  padding: 26px 30px;
}
.slot-row { display: flex; gap: 14px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.slot {
  width: 64px; height: 64px;
  border: 1px dashed #3d5170;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: #33415c;
  background: #0a1120;
}
.slot.slot-got {
  border: 1px solid var(--gold);
  color: #231a00;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 72%);
  box-shadow: 0 0 16px rgba(245, 197, 66, .8);
  animation: fragGlow 2.4s ease-in-out infinite;
}

body.night .gate-input {
  background: #0a1120;
  border: 1px solid #3d5170;
  color: #dfe8f5;
  font-family: "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
}
body.night .gate-btn {
  background: #14213c;
  border: 1px solid #3d5170;
  color: #dfe8f5;
}
body.night .gate-btn:active { border-color: #3d5170 #14213c #14213c #3d5170; }
body.night .gate-msg { color: #8fa3c7; }
body.night .gate-msg-bad { color: #ff7a6b; }
body.night a { color: #9fc7ff; }
body.night a:visited { color: #9fc7ff; }

.sky-canvas-wrap { line-height: 0; margin: 0 0 18px; }
#sky { width: 100%; height: auto; display: block; }

.ending-credits { text-align: center; color: #9fb2d0; font-size: 14px; line-height: 2; }
.ending-title {
  text-align: center;
  font-size: 30px;
  letter-spacing: 12px;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(245, 197, 66, .55);
}
.ending-line { text-align: center; font-size: 16px; color: #cdd9ec; letter-spacing: 2px; }

/* ---------------- 其他 ---------------- */

.footer {
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: #8a8266;
  letter-spacing: 1px;
}
.footer a { color: #8a8266; }

.uc-badge {
  display: inline-block;
  border: 2px solid #c8a200;
  background: repeating-linear-gradient(45deg, #ffd84d 0 12px, #333 12px 24px);
  color: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 3px 12px;
  text-shadow: 1px 1px 0 #000;
}

.section-title {
  font-size: 20px;
  letter-spacing: 4px;
  border-left: 5px solid var(--tank-blue-2);
  padding-left: 10px;
  margin: 26px 0 12px;
}
