/* ============================================================
   GLOF.L1FE.world — 论坛页 / 关卡通用样式
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #05070a;
  color: #8a9299;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", "STSong", "Times New Roman", serif;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

/* ===== 全局氛围层 ===== */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseShift 0.5s steps(2) infinite;
  mix-blend-mode: overlay;
}
@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 2px
  );
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* ===== 黑屏加载层 ===== */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.boot-screen.boot-out {
  opacity: 0;
}

.boot-hidden {
  opacity: 0 !important;
  filter: blur(8px);
  transform: translateY(10px);
}

.forum-header,
.search-bar,
.search-info,
.post {
  transition: opacity 0.9s ease, filter 0.9s ease, transform 0.9s ease;
}

/* ===== 隐藏帖浮现 ===== */
.post.reveal {
  animation: revealIn 1.2s ease;
}

@keyframes revealIn {
  0%   { opacity: 0; filter: blur(10px); transform: translateY(14px); }
  50%  { opacity: 1; filter: blur(3px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* ===== 布局 ===== */
.forum {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 22px 100px;
  position: relative;
  filter: contrast(0.95) brightness(0.95);
}

/* ===== 顶部 ===== */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 34px 0 18px;
  border-bottom: 1px solid #0c1015;
}

.logo {
  font-size: 22px;
  letter-spacing: 0.15em;
  color: #cfd6dd;
  text-shadow:
    1px 0 rgba(164, 90, 106, 0.35),
    -1px 0 rgba(126, 224, 192, 0.28);
}

.status {
  font-size: 12px;
  color: #3d454d;
  letter-spacing: 0.12em;
}

/* ===== 搜索 ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin: 24px 0 6px;
}

.search-bar input {
  flex: 1;
  background: #06090d;
  border: 1px solid #141a20;
  border-radius: 0;
  color: #9aa3ad;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.search-bar input:focus {
  border-color: #2c4a44;
  box-shadow: 0 0 14px rgba(126, 224, 192, 0.06);
}

.search-bar button {
  background: #06090d;
  color: #5f676f;
  border: 1px solid #141a20;
  border-radius: 0;
  padding: 10px 22px;
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.4s;
}
.search-bar button:hover {
  color: #9aa3ad;
  border-color: #2c4a44;
  box-shadow: 0 0 14px rgba(126, 224, 192, 0.08);
}

.search-info {
  font-size: 12px;
  color: #3d454d;
  min-height: 18px;
  margin-bottom: 14px;
  letter-spacing: 0.1em;
}

/* ===== 帖子 ===== */
.post {
  position: relative;
  padding: 30px 0;
  border-bottom: 1px solid #0c1015;
  overflow: hidden;
  transition: filter 0.4s;
}

.post.pinned {
  border-left: 2px solid #16302b;
  padding-left: 18px;
}

.pin-mark {
  display: inline-block;
  font-size: 10px;
  color: #4e8a7c;
  border: 1px solid #16302b;
  border-radius: 0;
  padding: 1px 9px;
  margin-bottom: 12px;
  letter-spacing: 0.3em;
  opacity: 0.75;
}

.post-head {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 16px;
}

.post-user {
  color: #6f9e91;
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.post-time {
  color: #3d454d;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.post-body p {
  margin: 0 0 1.2em;
  color: #8a9299;
}

.post-body strong {
  color: #c8d2dc;
  font-weight: 700;
}

.tibetan {
  font-family: 'Microsoft Himalaya', 'Kailasa', 'Noto Sans Tibetan', serif;
  font-weight: 700;
  line-height: 2.2;
  color: #8e979f;
  letter-spacing: 0;
}

.translation {
  color: #4f585f;
  font-size: 13px;
  margin-top: -0.8em;
}

.signal {
  font-family: "Courier New", monospace;
  font-weight: 700;
  word-break: break-all;
  color: #8ee8c8;
  background: none;
  border: none;
  padding: 6px 0;
  border-radius: 0;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.signal a {
  color: #8ee8c8;
  text-decoration: none;
  border-bottom: 1px solid #2c4a44;
  transition: color 0.3s, border-color 0.3s;
}
.signal a:hover {
  color: #c8f5e5;
  border-color: #4e8a7c;
}

/* 隐藏汉字：不可见，但可被复制 / 出现在 URL 里 */
.hidden-cn {
  font-size: 0;
  color: transparent;
  user-select: text;
  -webkit-user-select: text;
}

.mystic {
  margin: 1.8em 0;
  padding: 18px 22px;
  border-left: 3px solid #2c4a44;
  color: #a9b3bd;
  background: rgba(8, 12, 16, 0.5);
}

.scripture {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 700;
  color: #e2eaf2;
  letter-spacing: 0.28em;
  line-height: 2.4;
  font-size: 16px;
  text-shadow: none;
}

#scriptureGlitch {
  line-height: 2.4;
  letter-spacing: 0.28em;
}

#scriptureGlitch span {
  display: inline;
}

.hint {
  color: #c8d2dc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.cry {
  color: #f0f6fb;
  font-weight: 700;
  letter-spacing: 0.4em;
  font-size: 16px;
}

/* ===== 互动栏 ===== */
.post-actions {
  display: flex;
  gap: 40px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #0c1015;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #3d454d;
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 0.15em;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.4s, transform 0.2s;
}
.action-btn:hover { color: #6f7a82; }

.action-btn .ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s, transform 0.3s, filter 0.3s;
}

.action-btn.liked { color: #a45a6a; }
.action-btn.liked .ico {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(164, 90, 106, 0.5));
}

.action-btn.reposted { color: #4e8a7c; }
.action-btn.reposted .ico {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(78, 138, 124, 0.5));
}

/* ===== 回复 ===== */
.reply-box {
  display: none;
  gap: 8px;
  margin-top: 14px;
}
.reply-box.open { display: flex; }

.reply-input {
  flex: 1;
  background: #06090d;
  border: 1px solid #141a20;
  border-radius: 0;
  color: #9aa3ad;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.05em;
  outline: none;
}
.reply-input:focus {
  border-color: #2c4a44;
  box-shadow: 0 0 12px rgba(126, 224, 192, 0.06);
}

.reply-send {
  background: #06090d;
  color: #5f676f;
  border: 1px solid #141a20;
  border-radius: 0;
  padding: 9px 18px;
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all 0.4s;
}
.reply-send:hover {
  color: #9aa3ad;
  border-color: #2c4a44;
}

.reply-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-item {
  padding: 10px 14px;
  background: rgba(8, 12, 16, 0.6);
  border-left: 2px solid #16302b;
  border-radius: 0;
  animation: replyIn 0.6s ease;
}

@keyframes replyIn {
  0%   { opacity: 0; transform: translateY(-6px); filter: blur(5px); }
  60%  { opacity: 1; filter: blur(1px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.reply-meta { display: flex; gap: 12px; margin-bottom: 4px; }
.reply-user { color: #6f9e91; font-size: 12px; letter-spacing: 0.1em; font-weight: 700; }
.reply-time { color: #3d454d; font-size: 11px; letter-spacing: 0.08em; }
.reply-text { color: #8a9299; font-size: 13px; }

/* ===== 乱码帖 ===== */
.glitch-post {
  cursor: pointer;
}

.glitch-post .glitch-loop {
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.glitch-post .action-btn,
.glitch-post .reply-send,
.glitch-post .reply-input {
  pointer-events: none;
}

/* ===== 帖子失真 ===== */
.post.distort {
  animation: distortPulse 1.6s steps(4);
}

@keyframes distortPulse {
  0%   { filter: none; transform: none; }
  10%  { filter: blur(0.6px) hue-rotate(30deg); transform: translateX(-3px) skewX(1deg); }
  25%  { filter: blur(1px) hue-rotate(-20deg); transform: translateX(3px) skewX(-1deg); }
  45%  { filter: blur(0) hue-rotate(10deg); transform: translateX(-2px); }
  65%  { filter: blur(1px) hue-rotate(-5deg); transform: translateX(2px) skewX(0.5deg); }
  100% { filter: none; transform: none; }
}

/* ===== 视频占位 ===== */
.video-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06090d;
  border: 1px solid #141a20;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-noise {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseShift 0.4s steps(2) infinite;
  mix-blend-mode: overlay;
}

.video-text {
  position: relative;
  z-index: 2;
  color: #6f7a82;
  font-size: 13px;
  letter-spacing: 0.15em;
  line-height: 2.2;
  text-align: center;
}

/* ===== 解锁帖出现 ===== */
.boot-appear {
  animation: unlockIn 1.2s ease;
}

@keyframes unlockIn {
  0%   { opacity: 0; filter: blur(10px); transform: translateY(12px); }
  60%  { opacity: 1; filter: blur(2px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* ===== 禁止选中 ===== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.post-body {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.glitch-post .post-body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ===== 禁止打印 ===== */
@media print {
  body { display: none; }
}

/* ===== 弹窗 ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(2, 3, 5, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.show {
  display: flex;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.warn-box,
.error-box {
  width: 360px;
  max-width: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(120, 20, 30, 0.08) 0px,
      rgba(120, 20, 30, 0.08) 1px,
      transparent 1px,
      transparent 3px
    ),
    #1a0608;
  border: 1px solid #7a2028;
  box-shadow:
    inset 1px 1px 0 rgba(255, 80, 90, 0.18),
    inset -1px -1px 0 rgba(0,0,0,0.7),
    0 0 0 1px #2a0a0e,
    0 0 50px rgba(200, 30, 45, 0.55),
    0 0 120px rgba(200, 30, 45, 0.25);
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 13px;
  color: #c9cdd2;
  position: relative;
}

.warn-titlebar,
.error-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  padding: 0 4px 0 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  user-select: none;
  background: linear-gradient(to right, #7a2028, #3a0c10);
  border-bottom: 1px solid #a02a34;
}

.warn-title,
.error-title {
  color: #ffd8dc;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 60, 80, 0.8);
}

.warn-x,
.error-x {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a0c10;
  border: 1px solid #a02a34;
  color: #ffb8be;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  font-family: "Courier New", monospace;
  padding: 0;
  box-sizing: border-box;
}
.warn-x:hover,
.error-x:hover {
  background: #a02a34;
  color: #fff;
}

.warn-content,
.error-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 20px;
}

.warn-icon,
.error-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
  font-size: 22px;
  font-weight: 700;
  box-sizing: border-box;
  border: 1px solid #a02a34;
  color: #ff4a5a;
  background: #2a0a0e;
  text-shadow: 0 0 12px rgba(255, 60, 80, 0.9);
  box-shadow: inset 0 0 12px rgba(255, 40, 60, 0.25);
}

.warn-text {
  font-size: 15px;
  color: #ffd0d5;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.7;
  text-shadow:
    0 0 8px rgba(255, 60, 80, 0.6),
    0 0 20px rgba(255, 60, 80, 0.3);
}

.error-msg { flex: 1; }

.error-code {
  font-family: "Courier New", monospace;
  font-size: 28px;
  font-weight: 700;
  color: #ff4a5a;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin-bottom: 2px;
  text-shadow:
    0 0 10px rgba(255, 60, 80, 0.8),
    0 0 24px rgba(255, 60, 80, 0.35);
}

.error-text {
  font-size: 13px;
  color: #ffb8be;
  letter-spacing: 0.2em;
  text-shadow: 0 0 8px rgba(255, 60, 80, 0.5);
}

.warn-buttons,
.error-buttons {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
}

.overlay-close {
  min-width: 76px;
  background: #3a0c10;
  border: 1px solid #a02a34;
  color: #ffd8dc;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.15em;
  padding: 5px 18px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow:
    inset 1px 1px 0 rgba(255, 80, 90, 0.15),
    inset -1px -1px 0 rgba(0,0,0,0.6),
    0 0 12px rgba(200, 30, 45, 0.3);
}
.overlay-close:hover {
  background: #5a1218;
  border-color: #c03a46;
  color: #fff;
}

/* ===== 弹窗叠加容器 ===== */
.overlay-stack {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.overlay-instance {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: auto;
  background: transparent;
  transition: transform 0.25s ease;
}

.overlay-instance::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 5, 0.6);
  pointer-events: none;
}

.overlay-instance:last-child::before {
  background: rgba(2, 3, 5, 0.78);
}

.overlay-instance > .warn-box,
.overlay-instance > .error-box {
  position: relative;
  z-index: 2;
}
/* ============================================================
   特殊隐藏帖：冲向生命的天穹
   ============================================================ */
#revivePost .post-user {
  color: #7bc0ff;
  text-shadow: 0 0 8px rgba(120, 180, 255, 0.5);
}

.revive-img-wrap {
  margin: 1.8em 0;
  padding: 0;
  text-align: center;
}

.revive-link {
  display: inline-block;
  position: relative;
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
}

.revive-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  filter: contrast(0.95) brightness(0.9);
  transition: filter 0.5s ease, transform 0.5s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.revive-link:hover .revive-img {
  filter: contrast(1.05) brightness(1) drop-shadow(0 0 20px rgba(120, 180, 255, 0.5));
  transform: scale(1.01);
}