/* ============================================================
   网页我的世界 · 红石电路世界
   THESIS: 整站是一块红石控制板 —— 密码是拨杆开关的组合,
   公告是红石灯屏与信号日志,版本是石质铭牌,
   「进入游戏」是唯一一颗亮起的红石灯按钮。
   拒绝品类默认的「深色游戏门户 + 大按钮」布局。
   OWN-WORLD: 深石 #232327 / 凿石灰 #6b6b68 / 红石红 #e0483c
   / 灯黄 #f0b429 / 骨白 #e8e4da;像素切角与凿石内斜面,
   红石线只走 45/90° 直角,电流脉冲沿线路流动。
   ============================================================ */

/* ---------- 令牌 ---------- */
:root {
  --deep:        #232327;   /* 深石板 */
  --deep-2:      #1b1b1e;   /* 更深凹槽 */
  --stone:       #6b6b68;   /* 凿石 */
  --stone-hi:    #8d8d88;   /* 凿石亮面 */
  --stone-lo:    #4a4a47;   /* 凿石暗面 */
  --red:         #e0483c;   /* 红石 */
  --red-dim:     #7a2720;   /* 未通电红石线 */
  --red-tint:    #ff7a6e;   /* 深底上的红字 */
  --amber:       #f0b429;   /* 红石灯 */
  --amber-dim:   #a5852e;   /* 未点亮灯(抬亮以保可读) */
  --bone:        #e8e4da;   /* 凿刻骨白 */
  --bone-mut:    #b3afa3;   /* 从骨白调淡,不用灰 */
  --px: 8px;                /* 像素切角单位 */

  --bevel-up:    inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.5);
  --bevel-down:  inset 2px 2px 0 rgba(0,0,0,.55), inset -2px -2px 0 rgba(255,255,255,.05);
  --glow-amber:  0 0 18px rgba(240,180,41,.45), 0 0 46px rgba(240,180,41,.18);
  --glow-red:    0 0 18px rgba(224,72,60,.45), 0 0 46px rgba(224,72,60,.16);
}

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'Zpix';
  src: url('/assets/fonts/Zpix.ttf') format('truetype');
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--deep); color: var(--bone); min-height: 100vh;
}
/* 石砖面板:横向错缝 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.34) 0 2px, transparent 2px 44px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.34) 0 2px, transparent 2px 66px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.34) 0 2px, transparent 2px 66px),
    var(--deep);
  background-position: 0 0, 0 0, 33px 22px;
}
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.25; }

/* 浏览器自带表面也要属于这个世界 */
::selection { background: var(--red); color: var(--bone); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--deep-2); }
::-webkit-scrollbar-thumb { background: var(--stone); border: 3px solid var(--deep-2); }
::-webkit-scrollbar-thumb:hover { background: var(--stone-hi); }

/* ---------- 通用材料 ---------- */
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--bone); }
code { font-family: 'Zpix', Consolas, monospace; font-size: 24px; }

/* 像素切角(12 点) */
.cut {
  clip-path: polygon(
    0 var(--px), var(--px) var(--px), var(--px) 0,
    calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%,
    var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px))
  );
}
/* 凿石框:骨白描线 + 内斜面 */
.stone-frame {
  position: relative;
  background: var(--deep-2);
  box-shadow: var(--bevel-up), inset 0 0 0 1px var(--stone-lo);
  border: 1px solid var(--bone-mut);
}

/* 像素按钮:凿石内斜面 + 4px 底脸(Minecraft 按钮深度) */
.btn {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  display: inline-block; padding: 8px 22px 12px; margin: 6px 6px 6px 0;
  background: var(--stone); color: var(--bone);
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2);
  font-size: 24px; line-height: 1.2; cursor: pointer;
  transform: translateY(0);
  transition: transform .05s ease, box-shadow .05s ease, background .12s ease;
}
.btn:hover { background: var(--stone-hi); }
.btn:active { transform: translateY(4px); box-shadow: var(--bevel-down), 0 0 0 var(--deep-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--amber); color: #2b2105; border-color: #d8a21f; }
.btn-primary:hover { background: #ffc94d; }
.btn-danger { background: var(--red); color: #fff; border-color: #b9372e; }
.btn-danger:hover { background: #f05a4e; }
.btn-big { font-size: 30px; padding: 12px 30px 16px; }
.btn-plain { background: var(--deep-2); color: var(--bone-mut); }

/* 红石灯按钮:点亮态带光晕 */
.lamp-on {
  background: var(--amber);
  color: #2b2105;
  border-color: #d8a21f;
  box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2), var(--glow-amber);
  animation: lamp-breathe 2.6s ease-in-out infinite;
}
@keyframes lamp-breathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.12); }
}
/* 灯闪烁 */
@keyframes lamp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
/* 电流脉冲沿红石线 */
@keyframes wire-run { to { stroke-dashoffset: -28; } }
/* 灯屏滚动 */
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .lamp-on, .wire.on, .lamp-blink, .ticker-track, .pulse,
  .board-main > .pw-rig-wires path.on,
  body.boot .board-main > .pw-rig-wires path, .games-wires path, .games-wires .lamp-lit {
    animation: none !important;
  }
}

/* 总闸状态灯:服务在线=琥珀呼吸,已停止=红闪 */
.svc-lamp {
  display: inline-flex; align-items: center; gap: 10px; align-self: center;
  background: var(--deep-2); border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down);
  padding: 6px 16px 10px;
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px;
  color: var(--bone-mut); white-space: nowrap;
}
.svc-lamp-dot { width: 12px; height: 12px; flex: 0 0 12px; background: var(--stone-lo); }
.svc-lamp.on { color: var(--amber); border-color: var(--amber-dim); }
.svc-lamp.on .svc-lamp-dot { background: var(--amber); box-shadow: var(--glow-amber); animation: lamp-breathe 2.6s ease-in-out infinite; }
.svc-lamp.off { color: var(--red-tint); border-color: var(--red-dim); }
.svc-lamp.off .svc-lamp-dot { background: var(--red); box-shadow: var(--glow-red); animation: lamp-blink 1.2s ease-in-out infinite; }

/* ---------- 头部 ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
}
.nameplate {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 30px; color: var(--bone);
  background: var(--deep-2);
  padding: 8px 18px 12px;
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-down), inset 0 0 12px rgba(0,0,0,.5);
  letter-spacing: .08em;
  white-space: nowrap;
}
.head-actions { display: flex; gap: 14px; align-items: center; }
.logout-link, .back-link, .admin-link {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 24px; color: var(--bone-mut);
  padding: 4px 10px 8px;
}
.logout-link:hover { color: var(--red-tint); background: var(--deep-2); box-shadow: var(--bevel-down); }

/* 通用布局 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 8px 24px 56px; }
.hint { color: var(--bone-mut); font-size: 14px; margin: .4em 0 1em; }
.empty { color: var(--bone-mut); font-family: 'Zpix', sans-serif; font-size: 24px; }

/* ---------- 提示条(灯屏文字) ---------- */
.notice {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 24px; line-height: 1.5;
  background: var(--deep-2); color: var(--red-tint);
  border: 1px solid var(--red-dim);
  box-shadow: var(--bevel-down), inset 0 0 14px rgba(224,72,60,.12);
  padding: 10px 16px 14px; margin: 0 0 18px;
}
.notice-warn { color: var(--amber); border-color: var(--amber-dim); }

/* ---------- 表单 ---------- */
input[type="text"], input[type="password"], textarea {
  width: 100%; padding: 10px 12px; margin: 6px 0;
  background: var(--deep-2); color: var(--bone);
  border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down);
  font-size: 15px; font-family: inherit;
  caret-color: var(--amber);
}
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-right: 18px; font-size: 14px; color: var(--bone-mut); }
input[type="checkbox"] { accent-color: var(--amber); }
.form-msg { color: var(--red-tint); font-size: 14px; min-height: 1.4em; font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px; line-height: 1.5; }

/* ---------- 登录页核心 ---------- */
.board {
  position: relative; max-width: 1180px; margin: 0 auto;
  padding: 14px 22px 18px; min-height: 100vh;
  display: flex; flex-direction: column;
}
.board-wires {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.board-wires path { fill: none; stroke: var(--red-dim); stroke-width: 3; vector-effect: non-scaling-stroke; }
.board-wires path.on { stroke: var(--red); stroke-dasharray: 6 10; animation: wire-run 1.1s linear infinite; filter: drop-shadow(0 0 6px rgba(224,72,60,.7)); }

.board-head { position: relative; z-index: 1; display: flex; gap: 18px; align-items: stretch; }
/* 灯屏跑马灯 */
.ticker {
  flex: 1; position: relative; overflow: hidden;
  background: var(--deep-2);
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-down), inset 0 0 16px rgba(0,0,0,.6);
  display: flex; align-items: center; min-height: 56px;
}
.ticker::before, .ticker::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; background: var(--amber);
  box-shadow: var(--glow-amber);
  animation: lamp-blink 1.6s ease-in-out infinite;
  z-index: 2;
}
.ticker::before { left: 10px; }
.ticker::after { right: 10px; animation-delay: .8s; }
.ticker-view { flex: 1; overflow: hidden; margin: 0 36px; }
.ticker-track {
  display: inline-block; white-space: nowrap;
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 26px; color: var(--amber); line-height: 56px;
  padding-left: 8px;
  animation: ticker-scroll 22s linear infinite;
}
.ticker-track span { margin-right: 48px; }

.board-main { position: relative; z-index: 1; flex: 1; display: flex; gap: 20px; margin-top: 20px; align-items: stretch; }
/* 红石线层在整行之下,内容列浮于其上 */
.board-main > *:not(.pw-rig-wires) { position: relative; z-index: 1; }
.board-main > .pw-rig-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
/* 未通电:红色虚线;六位拨满通电后:实线 + 光晕脉冲 */
.board-main > .pw-rig-wires path { fill: none; stroke: var(--red-dim); stroke-width: 3; stroke-dasharray: 7 9; vector-effect: non-scaling-stroke; }
.board-main > .pw-rig-wires path.on { stroke: var(--red); stroke-dasharray: none; animation: wire-glow 1.1s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(224,72,60,.7)); }
@keyframes wire-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(224,72,60,.55)); }
  50%      { filter: drop-shadow(0 0 10px rgba(224,72,60,.9)); }
}
/* 开机通电:电流依次流过支线与干线 */
body.boot .board-main > .pw-rig-wires path { animation: boot-signal .45s ease forwards; }
body.boot .board-main > .pw-rig-wires path[data-i="1"] { animation-delay: .1s; }
body.boot .board-main > .pw-rig-wires path[data-i="2"] { animation-delay: .2s; }
body.boot .board-main > .pw-rig-wires path[data-i="3"] { animation-delay: .3s; }
body.boot .board-main > .pw-rig-wires path[data-i="4"] { animation-delay: .4s; }
body.boot .board-main > .pw-rig-wires path[data-i="5"] { animation-delay: .5s; }
body.boot .board-main > .pw-rig-wires path[data-i="6"] { animation-delay: .6s; }
@keyframes boot-signal { from { stroke: var(--red); } to { stroke: var(--red-dim); } }

/* 信号日志(公告编号与日期对齐) */
.ann-log { flex: 1 1 46%; min-width: 300px; }
.ann-log .panel { height: 100%; }
.log-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.log-item {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline;
  padding: 8px 6px; border-bottom: 1px dashed var(--stone-lo);
}
.log-num { font-family: 'Zpix', monospace; font-size: 22px; color: var(--stone-hi); min-width: 64px; }
.log-date { font-family: 'Zpix', monospace; font-size: 22px; color: var(--bone-mut); min-width: 120px; }
.log-body { flex: 1 1 220px; min-width: 0; font-size: 14px; line-height: 1.55; }
.log-item.pinned .log-num { color: var(--amber); text-shadow: 0 0 8px rgba(240,180,41,.5); }
.log-title { font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 24px; color: var(--bone); }
.log-item.pinned .log-title::after { content: " · 置顶"; color: var(--amber); font-size: 22px; }

/* 密码装置:六个拨杆开关 */
.pw-rig { flex: 1 1 50%; }

.pw-label { font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 26px; color: var(--bone-mut); margin-bottom: 10px; }
.pw-slots { display: flex; gap: 14px; margin-bottom: 4px; }
.slot {
  width: 52px; height: 56px;
  background: var(--deep-2);
  border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down), inset 0 0 10px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Zpix', monospace; font-size: 34px; color: var(--stone-hi);
  transition: color .12s ease;
}
.slot.filled { color: var(--amber); text-shadow: var(--glow-amber); }
.slot.flash { animation: lamp-blink .5s ease; }
.pw-levers { display: flex; gap: 14px; margin: 10px 0 4px; }
.lever { width: 52px; height: 82px; position: relative; cursor: pointer; background: none; border: 0; padding: 0; }
.lever-base {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: var(--stone); border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up), 0 3px 0 var(--deep-2);
}
.lever-arm {
  position: absolute; left: 50%; bottom: 20px; width: 10px; height: 50px;
  margin-left: -5px;
  background: var(--stone-hi);
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up);
  transform-origin: 50% 100%;
  transform: rotate(35deg);
  transition: transform .18s cubic-bezier(.22, 1, .36, 1);
}
.lever-arm::after {
  content: ""; position: absolute; top: -8px; left: 50%; margin-left: -9px;
  width: 18px; height: 12px; background: var(--bone);
  border: 1px solid var(--bone-mut); box-shadow: var(--bevel-up);
}
.lever.on .lever-arm { transform: rotate(-35deg); }
.lever.on .lever-base {
  box-shadow: var(--bevel-up), 0 3px 0 var(--deep-2), 0 0 14px rgba(224,72,60,.55);
  border-color: var(--red);
}
.lever.on::before {
  content: ""; position: absolute; left: 50%; top: 30%; margin-left: -6px;
  width: 12px; height: 12px; background: var(--red);
  box-shadow: var(--glow-red); animation: lamp-blink 1.6s ease-in-out infinite;
}
.pw-hint-line { font-size: 13px; color: var(--bone-mut); margin: 10px 0 0; }

/* 进入游戏大灯按钮 */
.enter-col { flex: 0 0 24%; display: flex; flex-direction: column; justify-content: flex-start; padding-top: 96px; position: relative; z-index: 1; }
.enter-lamp {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 34px; line-height: 1.35;
  padding: 30px 16px 34px; width: 100%;
  background: var(--amber-dim); color: #241a05;
  border: 1px solid var(--stone-hi);
  box-shadow: var(--bevel-up), 0 6px 0 var(--deep-2);
  cursor: not-allowed;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.enter-lamp.ready {
  background: var(--amber); color: #2b2105; border-color: #d8a21f;
  box-shadow: var(--bevel-up), 0 6px 0 var(--deep-2), var(--glow-amber);
  cursor: pointer;
  animation: lamp-breathe 2.6s ease-in-out infinite;
}
.enter-lamp:active { transform: translateY(4px); box-shadow: var(--bevel-down), 0 0 0 var(--deep-2), var(--glow-amber); }

/* 底部版本铭牌 */
.board-foot { position: relative; z-index: 1; margin-top: 22px; }
.ver-tags { display: flex; gap: 14px; flex-wrap: wrap; }
.ver-tag {
  font-family: 'Zpix', monospace; font-size: 26px;
  color: var(--bone); padding: 6px 16px 10px;
  background: var(--deep-2); border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down);
  position: relative;
}
.ver-tag.lit { color: var(--amber); text-shadow: 0 0 10px rgba(240,180,41,.55); border-color: var(--amber-dim); }
.ver-tag.lit::before {
  content: ""; position: absolute; left: 50%; top: -8px; margin-left: -5px;
  width: 10px; height: 10px; background: var(--amber);
  box-shadow: var(--glow-amber); animation: lamp-blink 2.2s ease-in-out infinite;
}
.ver-tag.locked { color: var(--stone); }
.ver-tag .lock-ico { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; }
.site-foot {
  position: relative; z-index: 1; margin-top: 18px;
  display: flex; gap: 24px; justify-content: space-between; align-items: center;
  color: var(--bone-mut); font-size: 13px;
  border-top: 1px solid var(--stone-lo); padding-top: 12px;
}

/* ---------- 面板(通用凿石容器) ---------- */
.panel {
  position: relative;
  background: rgba(27,27,30,.72);
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up), inset 0 0 0 1px var(--stone-lo);
  padding: 20px 22px 22px; margin-bottom: 20px;
}
.panel h2 {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 30px; color: var(--bone); margin: 0 0 12px;
  letter-spacing: .05em;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.panel-login { max-width: 460px; margin: 56px auto; }

/* ---------- 版本选择页 ---------- */
.games-wrap h1 {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 44px; letter-spacing: .1em; text-align: center; margin: 10px 0 4px;
  color: var(--bone); text-shadow: 0 0 16px rgba(232,228,218,.15);
}
.ver-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; margin-top: 28px; position: relative; }
.ver-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  background: var(--deep-2);
  border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up), 0 5px 0 var(--deep-2);
  padding: 26px 16px 22px; text-align: center; color: var(--bone);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ver-card:hover { transform: translateY(-3px); }
.ver-card.lit { border-color: var(--amber-dim); }
.ver-num { font-family: 'Zpix', monospace; font-size: 40px; color: var(--amber); text-shadow: 0 0 12px rgba(240,180,41,.5); }
.ver-meta { color: var(--bone-mut); font-size: 13px; margin: 12px 0 16px; }
.ver-cta {
  display: inline-block; font-family: 'Zpix', "PingFang SC", sans-serif;
  font-size: 26px; padding: 8px 24px 12px;
  background: var(--amber-dim); color: #1a1304;
  border: 1px solid var(--stone-hi);
  box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2);
}
.ver-card.lit:hover .ver-cta { background: var(--amber); color: #2b2105; box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2), var(--glow-amber); }
.ver-card.locked { opacity: .55; border-color: var(--stone-lo); cursor: not-allowed; }
.ver-card.locked:hover { transform: none; }
.ver-card.locked .ver-num { color: var(--stone); text-shadow: none; }
.ver-lock { width: 44px; height: 44px; margin-bottom: 8px; color: var(--stone); }
/* 总线:固定 18px 高的横带,悬在卡片上方;灯与线同图绘制(JS 按卡片中心实测),永不错位 */
.games-wires { position: absolute; left: 0; top: -14px; width: 100%; height: 18px; pointer-events: none; }
.games-wires path { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 6 10; animation: wire-run 1.1s linear infinite; filter: drop-shadow(0 0 6px rgba(224,72,60,.7)); }
.games-wires .lamp-lit { fill: var(--amber); filter: drop-shadow(0 0 5px rgba(240,180,41,.7)); animation: lamp-blink 2.4s ease-in-out infinite; }
.games-wires .lamp-off { fill: var(--stone-lo); opacity: .65; }

/* ---------- 管理面板 ---------- */
.admin-head { border-bottom: 1px solid var(--stone-lo); background: rgba(27,27,30,.5); }
.stats-bar {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  padding: 16px 20px; max-width: 1080px; margin: 0 auto;
}
.stat {
  min-width: 130px; text-align: center;
  background: var(--deep-2);
  border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down), inset 0 0 10px rgba(0,0,0,.45);
  padding: 10px 14px 12px;
}
.stat-label { display: block; font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px; color: var(--bone-mut); }
.stat-value { display: block; font-family: 'Zpix', monospace; font-size: 34px; margin-top: 4px; color: var(--amber); text-shadow: 0 0 10px rgba(240,180,41,.45); }
.stat-value.good { color: #7fd47f; text-shadow: 0 0 10px rgba(127,212,127,.4); }
.stat-value.bad { color: var(--red-tint); text-shadow: 0 0 10px rgba(224,72,60,.45); }

.tabs { display: flex; gap: 10px; justify-content: center; padding: 20px 0 0; flex-wrap: wrap; }
.tab {
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 26px;
  padding: 8px 30px 12px; background: var(--deep-2); color: var(--bone-mut);
  border: 1px solid var(--stone-lo); box-shadow: var(--bevel-up);
  cursor: pointer;
}
.tab.active { background: var(--stone); color: var(--bone); border-color: var(--amber); box-shadow: var(--bevel-up), 0 0 14px rgba(240,180,41,.25); }
.admin-body { max-width: 880px; margin: 0 auto; padding: 22px 24px 64px; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* 总闸拉杆 */
.master-lever-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin: 12px 0 4px; }
.master-lever {
  position: relative; width: 180px; height: 150px; cursor: pointer;
  background: none; border: 0; padding: 0;
}
.master-base {
  position: absolute; left: 20px; right: 20px; bottom: 0; height: 40px;
  background: var(--stone); border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 26px; color: var(--bone-mut);
  white-space: nowrap;
}
.master-arm {
  position: absolute; left: 50%; bottom: 26px; width: 14px; height: 100px; margin-left: -7px;
  background: var(--stone-hi); border: 1px solid var(--bone-mut);
  box-shadow: var(--bevel-up);
  transform-origin: 50% 100%;
  transform: rotate(-30deg);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}
.master-arm::after {
  content: ""; position: absolute; top: -8px; left: 50%; margin-left: -11px;
  width: 22px; height: 16px; background: var(--bone);
  border: 1px solid var(--bone-mut); box-shadow: var(--bevel-up);
}
.master-lever.off .master-arm { transform: rotate(30deg); }
.master-lever.on .master-base { border-color: var(--red); box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2), 0 0 16px rgba(224,72,60,.5); color: var(--red-tint); }
.master-lever.on::before {
  content: ""; position: absolute; left: 50%; top: 6px; margin-left: -8px;
  width: 16px; height: 16px; background: var(--red);
  box-shadow: var(--glow-red); animation: lamp-blink 1.6s ease-in-out infinite;
}

/* 公告编辑器 */
.ann-editor {
  background: var(--deep-2);
  border: 1px dashed var(--stone);
  box-shadow: var(--bevel-down);
  padding: 16px; margin-bottom: 18px;
}
.editor-actions { margin-top: 10px; }
.ann-admin-list { list-style: none; margin: 0; padding: 0; }
.ann-admin-item {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start;
  background: var(--deep-2); border: 1px solid var(--stone-lo);
  box-shadow: var(--bevel-down);
  padding: 12px 16px; margin-bottom: 12px;
}
.ann-admin-item.pinned { border-color: var(--amber-dim); }
.ann-admin-main { flex: 1 1 240px; min-width: 0; }
.ann-admin-item h3 { font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 26px; color: var(--bone); margin-bottom: 4px; }
.ann-admin-body { font-size: 14px; line-height: 1.6; color: var(--bone); }
.ann-admin-main time { color: var(--bone-mut); font-family: 'Zpix', monospace; font-size: 22px; }
.ann-admin-actions { display: flex; gap: 8px; }
.pin-tag {
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px;
  background: var(--amber); color: #2b2105; padding: 1px 8px 4px;
  box-shadow: var(--glow-amber); vertical-align: middle;
}
.hidden-tag { font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px; background: var(--stone); color: var(--deep-2); padding: 1px 8px 4px; vertical-align: middle; }
.hidden-ann { opacity: .5; }

/* 密码页 */
.pw-row { display: flex; align-items: center; gap: 16px; margin: 12px 0 6px; flex-wrap: wrap; }
.pw-mode-badge {
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 22px;
  background: var(--stone); color: var(--deep-2); padding: 2px 12px 6px;
}
/* 每日密码六位灯显示:与登录页同款拨杆灯槽 */
.pw-lamps { display: flex; gap: 10px; }
.pw-slot { width: 46px; height: 52px; }
.pw-manual-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.pw-manual-form input { flex: 1 1 220px; margin: 0; }

/* 管理登录页 */
.admin-auth-wrap { max-width: 520px; margin: 0 auto; padding: 40px 20px; }
.admin-auth-wrap .panel-login h1 {
  font-family: 'Zpix', "PingFang SC", sans-serif; font-size: 40px;
  color: var(--bone); margin-bottom: 20px; letter-spacing: .06em;
}
.back-link { font-size: 14px; }

/* 管理登录灯按钮:与管理面板同世界语 */
.admin-auth-wrap #auth-btn {
  font-family: 'Zpix', "PingFang SC", sans-serif;
  box-shadow: var(--bevel-up), 0 4px 0 var(--deep-2), var(--glow-amber);
  animation: lamp-breathe 2.6s ease-in-out infinite;
}

/* ---------- 响应式 ---------- */

/* PC 宽屏 ≥1280px:适当拉宽最大宽度,留出更多呼吸 */
@media (min-width: 1280px) {
  .board { max-width: 1340px; }
  .wrap  { max-width: 1200px; }
  .admin-body { max-width: 980px; }
  .log-list { max-height: 420px; }
  .games-wrap h1 { font-size: 52px; }
}

/* iPad 横屏 / 小 PC 1024–1279px:布局收紧但保持双栏 */
@media (max-width: 1279px) and (min-width: 861px) {
  .board { padding: 12px 16px 14px; }
  .enter-col { flex: 0 0 22%; padding-top: 72px; }
  .enter-lamp { font-size: 30px; }
  .ann-log { flex: 1 1 42%; }
  .pw-rig { flex: 1 1 46%; }
  .admin-body { max-width: 820px; padding: 18px 18px 56px; }
  .stats-bar { gap: 10px; }
  .stat { min-width: 110px; }
}

/* iPad 竖屏 / 平板 768–860px:折叠为单栏,保留关键元素 */
@media (max-width: 860px) {
  .board { padding: 10px 14px 12px; }
  .board-head { flex-direction: column; gap: 10px; }
  .ticker { min-height: 48px; }
  .ticker-track { font-size: 22px; line-height: 48px; }
  .board-main { flex-direction: column; gap: 14px; }
  .board-main > .pw-rig-wires { display: none; }
  .enter-col { flex: none; padding-top: 0; order: -1; } /* 进入游戏按钮上移至最前 */
  .enter-lamp { padding: 14px 16px 18px; font-size: 30px; }
  .ann-log { min-width: 0; }
  .log-list { max-height: none; }
  .pw-rig { flex: none; }
  .ver-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ver-card { padding: 20px 12px 18px; }
  .ver-num { font-size: 34px; }
  .games-wrap h1 { font-size: 36px; }
  .stat { min-width: 96px; }
  .stats-bar { gap: 10px; padding: 12px 14px; }
  .stat-value { font-size: 28px; }
  .tabs { gap: 8px; padding: 14px 0 0; }
  .tab { font-size: 22px; padding: 6px 18px 10px; }
  .admin-body { padding: 16px 14px 56px; }
  .pw-slots, .pw-levers { gap: 10px; }
  .slot, .lever { width: 46px; }
  .slot { height: 50px; font-size: 30px; }
  .lever { height: 74px; }
  .svc-lamp { align-self: flex-start; }
  .nameplate { font-size: 24px; }
  .master-lever { width: 140px; height: 120px; }
  .master-base { left: 14px; right: 14px; height: 34px; font-size: 22px; }
  .master-arm { height: 80px; }
  .ann-admin-item { flex-direction: column; gap: 10px; }
  .ann-admin-actions { flex-wrap: wrap; }
  .pw-manual-form input { flex: 1 1 160px; }
}

/* 手机 ≤480px:全单栏,字号与间距最小化 */
@media (max-width: 480px) {
  .board { padding: 8px 10px 10px; }
  .ver-grid { grid-template-columns: 1fr; gap: 12px; }
  .ver-card { flex-direction: row; align-items: center; padding: 14px 14px; gap: 14px; text-align: left; }
  .ver-num { font-size: 30px; min-width: 80px; }
  .ver-cta { font-size: 22px; padding: 6px 14px 10px; white-space: nowrap; }
  .ver-lock { width: 36px; height: 36px; margin-bottom: 0; }
  .wrap { padding: 8px 10px 40px; }
  .site-foot { flex-direction: column; gap: 8px; font-size: 12px; }
  .site-head { flex-wrap: wrap; gap: 8px; padding: 10px 10px; }
  .nameplate { font-size: 18px; white-space: normal; padding: 6px 12px 10px; }
  .head-actions { flex-wrap: wrap; gap: 6px; }
  .logout-link, .back-link, .admin-link { font-size: 18px; padding: 4px 8px 6px; }
  .games-wrap h1 { font-size: 28px; margin-bottom: 2px; }
  .ticker-track { font-size: 20px; }
  .pw-label { font-size: 22px; }
  .pw-slots { gap: 8px; }
  .pw-levers { gap: 8px; }
  .slot { width: 40px; height: 44px; font-size: 26px; }
  .lever { width: 40px; height: 66px; }
  .svc-lamp { font-size: 18px; padding: 4px 12px 8px; }
  .panel { padding: 14px 12px 16px; }
  .panel h2 { font-size: 24px; }
  .enter-lamp { font-size: 26px; padding: 12px 12px 16px; }
  .btn { font-size: 20px; padding: 6px 14px 10px; }
  .btn-big { font-size: 24px; padding: 10px 20px 14px; }
  .log-num, .log-date { font-size: 18px; min-width: auto; }
  .log-title { font-size: 20px; }
  .stat-label { font-size: 18px; }
  .stat-value { font-size: 24px; }
  .stats-bar { gap: 8px; padding: 10px 10px; }
  .tab { font-size: 18px; padding: 5px 12px 8px; }
  .admin-body { padding: 12px 10px 48px; }
  .ann-admin-item h3 { font-size: 20px; }
  .ann-admin-main time { font-size: 18px; }
  .pw-lamps { gap: 6px; }
  .pw-slot { width: 36px; height: 42px; }
  .master-lever { width: 110px; height: 100px; }
  .master-base { left: 10px; right: 10px; height: 28px; font-size: 18px; }
  .master-arm { width: 10px; height: 64px; }
  .master-lever-wrap { gap: 16px; }
  .admin-auth-wrap { padding: 24px 12px; }
  .admin-auth-wrap .panel-login h1 { font-size: 28px; }
  .notice { font-size: 18px; padding: 8px 12px 10px; }
  .hint { font-size: 13px; }
  .log-item { gap: 8px; padding: 6px 4px; }
  .board-head { gap: 8px; }
}
