/* ============ 天龙八部·寒霜归来 —— 冰凉·轻量版 ============ */
/* 设计原则：学参考站的克制——干净卡片布局 + 极少动画。
   冰凉感来自亮色冰蓝配色，而非重特效，所以流畅不卡。 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #eaf7fc;      /* 页面冷白底 */
  --bg-card:   #ffffff;      /* 卡片白 */
  --bg-item:   #f3fafe;      /* 内层浅冰蓝 */
  --bg-head:   #e3f3fb;      /* 卡片标题条 */
  --ice:       #2a9fc9;      /* 主冰蓝（替代参考站的金色） */
  --ice-deep:  #0d6b8c;      /* 深冰蓝，标题/重点文字 */
  --ice-soft:  #d4eefa;      /* 浅冰蓝 */
  --border:    #cfe7f2;      /* 冷色描边 */
  --text:      #1c4456;      /* 正文冷蓝灰 */
  --text-dim:  #5d8298;      /* 次要文字 */
  --ok:        #1f9d57;      /* 已开放绿 */
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--ice); text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ============ 轻量飘雪（少量 + 纯 transform，几乎零开销） ============ */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.snow span {
  position: absolute; top: -16px; color: #bfe6f5;
  will-change: transform; animation: fall linear infinite;
}
@keyframes fall { to { transform: translateY(102vh); } }

/* ============ 顶部实时数据条 ============ */
.top-stat-bar {
  background: linear-gradient(90deg, var(--ice-deep), var(--ice));
  color: #fff; text-align: center; font-size: 13.5px; font-weight: 500;
  padding: 9px 0; letter-spacing: 0.5px;
}
.top-stat-bar b { color: #fff6c4; margin: 0 3px; font-variant-numeric: tabular-nums; }
.top-stat-bar .sep { opacity: 0.5; margin: 0 8px; }

/* ============ 滚动公告 ============ */
.marquee {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; margin: 14px 0; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px; overflow: hidden;
}
.marquee .fire { flex: 0 0 auto; }
.marquee-track { flex: 1; overflow: hidden; white-space: nowrap; }
.marquee-content {
  display: inline-block; padding-left: 100%;
  color: var(--ice-deep); font-weight: 500;
  animation: marquee 28s linear infinite; will-change: transform;
}
.marquee-content b { color: #d9821f; margin: 0 3px; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ============ 头图 / 标题区 ============ */
#header {
  height: 150px; border-radius: 14px; margin-bottom: 16px;
  background:
    radial-gradient(600px 200px at 70% -20%, rgba(255,255,255,0.9), transparent 70%),
    linear-gradient(135deg, #7fd0ec, #2a9fc9 60%, #0d6b8c);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
#header .game-name {
  font-size: 38px; font-weight: 800; color: #fff; letter-spacing: 6px;
  text-shadow: 0 2px 8px rgba(13,107,140,0.6);
}
#header .game-name .flake { font-size: 30px; vertical-align: middle; margin: 0 6px; }
#header .sub { color: #eafaff; font-size: 14px; letter-spacing: 2px; margin-top: 8px; }
.beta-pill {
  position: absolute; top: 12px; right: 14px;
  background: rgba(255,255,255,0.9); color: var(--ice-deep);
  font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.beta-pill.public { color: var(--ok); }

/* ============ 倒计时区 ============ */
.countdown-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
}
.countdown-row .cd-label { color: var(--ice-deep); font-weight: 700; letter-spacing: 2px; }
.countdown { display: flex; gap: 10px; }
.cd-cell {
  min-width: 62px; padding: 8px 4px; border-radius: 8px; text-align: center;
  background: var(--bg-item); border: 1px solid var(--border);
}
.cd-cell span { display: block; font-size: 26px; font-weight: 800; color: var(--ice-deep); font-variant-numeric: tabular-nums; }
.cd-cell small { color: var(--text-dim); font-size: 12px; }
.open-time { width: 100%; text-align: center; color: var(--text-dim); font-size: 13px; }

/* 行动按钮 */
.actions { display: flex; gap: 10px; }
.btn {
  cursor: pointer; border-radius: 8px; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border: 1px solid var(--border); font-family: inherit;
  transition: 0.15s; background: var(--bg-item); color: var(--ice-deep);
}
.btn:hover { background: var(--ice-soft); }
.btn-primary { background: linear-gradient(135deg, #4fc3e8, var(--ice)); color: #fff; border: none; }
.btn-primary:hover { background: linear-gradient(135deg, #3fb6dd, var(--ice-deep)); }
.btn.full { width: 100%; }

/* ============ 导航 ============ */
.nav-bar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 8px; margin-bottom: 16px;
  position: sticky; top: 8px; z-index: 40; text-align: center;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.nav-bar a {
  display: inline-block; padding: 7px 14px; border-radius: 8px;
  background: var(--bg-item); color: var(--ice-deep); font-weight: 500; font-size: 13.5px;
  border: 1px solid var(--border); transition: 0.15s;
}
.nav-bar a:hover { background: var(--ice); color: #fff; }
.nav-bar .nav-account { margin-left: auto; }

/* ============ 内容卡片（参考站的核心：item + title + content） ============ */
.item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(120,180,210,0.12);
  scroll-margin-top: 70px;
}
.item .title {
  background: var(--bg-head); padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 17px; font-weight: 700; color: var(--ice-deep);
  display: flex; align-items: center; justify-content: space-between;
}
.item .content { padding: 16px; }

/* ============ 分区表格 ============ */
/* 注册横幅（显眼） */
.reg-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 16px; padding: 16px 22px; border-radius: 12px;
  background: linear-gradient(135deg, #6fe0f5, var(--ice) 55%, var(--ice-deep));
  box-shadow: 0 6px 22px rgba(42,159,201,0.4);
}
.reg-banner-title { font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,60,90,0.5); }
.reg-banner-sub { font-size: 13.5px; color: #eafaff; margin-top: 2px; }
.reg-banner-btn {
  background: #fff; color: var(--ice-deep); font-size: 16px; font-weight: 800;
  padding: 12px 32px; border: none; box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  animation: reg-pulse 1.8s ease-in-out infinite;
}
.reg-banner-btn:hover { background: #fff; transform: translateY(-2px); }
@keyframes reg-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.zone-table { width: 100%; border-collapse: collapse; }
.zone-table th, .zone-table td {
  padding: 11px 10px; text-align: center; border: 1px solid var(--border); font-size: 13.5px;
}
.zone-table th { background: var(--bg-item); color: var(--ice-deep); font-weight: 700; }
.zone-table td { color: var(--text); }
.zone-table .zname { color: var(--ice-deep); font-weight: 700; }
.zone-table .ztime { color: #d9821f; font-weight: 600; }
.status-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; }
.status-tag.open { color: var(--ok); background: rgba(31,157,87,0.12); }
.status-tag.upcoming { color: var(--ice); background: var(--ice-soft); }

/* ============ 版本介绍 ============ */
.feature-list { list-style: none; display: grid; gap: 10px; }
.feature-list li {
  position: relative; padding: 11px 14px 11px 38px; border-radius: 8px;
  background: var(--bg-item); border: 1px solid var(--border); color: var(--text);
}
.feature-list li::before { content: "❄"; position: absolute; left: 14px; color: var(--ice); }
.version-meta { margin-bottom: 14px; }
.version-meta .vn { font-size: 18px; font-weight: 800; color: var(--ice-deep); margin-right: 10px; }
.version-meta .vt { color: var(--text-dim); }

/* ============ 爆率表 ============ */
.drop-table { width: 100%; border-collapse: collapse; }
.drop-table th, .drop-table td { padding: 10px 12px; text-align: left; border: 1px solid var(--border); font-size: 13.5px; }
.drop-table th { background: var(--bg-item); color: var(--ice-deep); font-weight: 700; }
.drop-table tr:hover td { background: var(--bg-item); }
.drop-table .rate { color: var(--ice); font-weight: 700; text-align: center; }

/* ============ 账号 / CDK ============ */
.cdk-box {
  margin-top: 14px; padding: 18px; border-radius: 10px; text-align: center;
  background: var(--bg-item); border: 1px dashed var(--ice);
}
.cdk-code {
  font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--ice-deep);
  margin: 8px 0; font-family: "Consolas", monospace; word-break: break-all;
}
.cdk-hint { color: var(--text-dim); font-size: 13px; }
.account-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.account-welcome { font-size: 16px; font-weight: 700; color: var(--ice-deep); }
.logout-link { color: var(--text-dim); cursor: pointer; font-size: 13px; margin-left: auto; }
.logout-link:hover { color: var(--ice); }

/* ============ 弹幕（全屏随机高度飘，不遮挡点击） ============ */
.danmaku-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.dm-item {
  position: absolute; right: -40%; white-space: nowrap; font-size: 17px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35); will-change: transform;
  animation: dm-move linear forwards;
}
@keyframes dm-move { to { transform: translateX(-160vw); } }

/* 鼠标滑动雪花效果层：覆盖全屏、不挡点击、置于弹幕之上 */
#snowCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 45;
}

.danmaku-send {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; gap: 8px; align-items: center;
  padding: 8px 12px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(120,180,210,0.3);
}
.danmaku-send input[type="text"] {
  width: 240px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-item);
  color: var(--text); font-size: 13.5px; outline: none; font-family: inherit;
}
.danmaku-send button {
  padding: 8px 18px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #4fc3e8, var(--ice)); color: #fff; font-weight: 600; font-family: inherit;
}

/* 静音/音乐开关浮动按钮 */
.mute-btn {
  position: fixed; right: 16px; bottom: 70px; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 20px; line-height: 1; box-shadow: 0 4px 14px rgba(120,180,210,0.35);
  display: flex; align-items: center; justify-content: center;
}
.mute-btn:hover { background: var(--ice-soft); }

/* ============ 登录/注册弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; background: rgba(40,90,110,0.35);
}
.modal-mask.show { display: flex; }
.modal {
  position: relative; width: 360px; max-width: 92vw; padding: 26px;
  border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 16px 50px rgba(40,90,110,0.3);
}
.modal-close { position: absolute; top: 14px; right: 16px; cursor: pointer; color: var(--text-dim); font-size: 18px; }
.modal-close:hover { color: var(--ice-deep); }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.modal-tabs .tab { flex: 1; text-align: center; padding: 9px; cursor: pointer; border-radius: 8px; color: var(--text-dim); border: 1px solid transparent; }
.modal-tabs .tab.active { color: var(--ice-deep); font-weight: 700; background: var(--bg-item); border-color: var(--border); }
.modal-body input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-item);
  color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
.modal-body input:focus { border-color: var(--ice); }
.modal-select {
  width: 100%; padding: 12px 14px; margin-bottom: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-item);
  color: var(--text); font-size: 14px; outline: none; font-family: inherit; cursor: pointer;
}
.modal-select:focus { border-color: var(--ice); }
.captcha-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.captcha-row input { flex: 1; margin-bottom: 0; }
.captcha-img {
  width: 120px; height: 40px; flex: 0 0 auto; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; background: var(--bg-item);
}
.captcha-img svg { display: block; }
.modal-msg { min-height: 18px; font-size: 13px; margin-bottom: 8px; }
.modal-msg.err { color: #d9534f; }
.modal-msg.ok { color: var(--ok); }
.modal-tip { text-align: center; color: var(--text-dim); font-size: 12.5px; margin-top: 12px; }

/* ============ 页脚 ============ */
.footer { text-align: center; padding: 30px 16px; color: var(--text-dim); font-size: 13px; }

/* ============ 轻量提示条 ============ */
.toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%) translateY(-20px);
  z-index: 200; padding: 12px 24px; border-radius: 999px;
  background: var(--ice-deep); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(13,107,140,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 760px) {
  #header .game-name { font-size: 26px; letter-spacing: 3px; }
  .nav-bar .nav-account { margin-left: 0; }
  .countdown-row { flex-direction: column; }
  .danmaku-send input[type="text"] { width: 150px; }
  .zone-table, .drop-table { font-size: 12.5px; }
}
