/* ============================================================
   美高梅 · 首页
   深色沥青 + 金属金，计时塔为唯一高光，其余保持安静
   ============================================================ */

:root {
  --ink-0: #080b10;
  --ink-1: #0b0f16;
  --ink-2: #0d1219;
  --ink-3: #111823;
  --ink-4: #172030;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e9eef6;
  --text-2: #8a97a8;
  --text-3: #5d6a7c;
  --gold: #f2c14e;
  --gold-deep: #d9a227;
  --red: #ef4b5b;
  --green: #2fbf7a;
  --blue: #4a8cf7;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
svg { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }

/* ---------------------------------------------------------- 顶栏 */

.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 32px;
  background: rgba(8, 11, 16, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.hdr-brand { display: flex; align-items: center; gap: 10px; }

.hdr-mark {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.hdr-text { display: flex; flex-direction: column; line-height: 1.15; }
.hdr-name { font-size: 15px; font-weight: 600; letter-spacing: 0.3px; }
.hdr-sub { font-size: 9px; letter-spacing: 2.2px; color: var(--text-3); font-weight: 500; }

.hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.hdr-user {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
  transition: background-color 0.15s, color 0.15s;
}

.hdr-user:hover { background: var(--ink-2); color: var(--text); }

.hdr-user b {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-primary { background: var(--gold); color: #17120a; font-weight: 600; }
.btn-primary:hover { background: #f8cd68; }

.btn-quiet {
  border: 1px solid var(--line-2);
  color: var(--text-2);
  background: rgba(8, 11, 16, 0.62);
}
.btn-quiet:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); background: rgba(17, 24, 35, 0.8); }

.btn-text { color: var(--text-2); padding: 0 8px; height: 36px; }
.btn-text:hover { color: var(--text); }

.btn-block { width: 100%; height: 42px; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------------------------------------- 容器 */

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------------------------------------------- 首屏 */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  align-items: center;
  gap: 48px;
  min-height: 400px;
  padding: 44px 44px 84px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--ink-1);
  overflow: hidden;
}

.hero-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-checker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  opacity: 0.3;
  background-image:
    linear-gradient(90deg, #ffffff 50%, transparent 50%),
    linear-gradient(90deg, #ffffff 50%, transparent 50%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}

.hero-copy { position: relative; z-index: 1; max-width: 480px; }

.hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.hero-sub {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 400px;
}

.hero-actions { display: flex; gap: 10px; }
.hero-actions .btn { height: 42px; padding: 0 24px; font-size: 14px; }

.hero-facts {
  display: flex;
  gap: 28px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 400px;
}

.fact { display: flex; align-items: baseline; gap: 6px; }

.fact b {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fact span { font-size: 11.5px; color: var(--text-3); }

/* ---------------------------------------------------------- 计时塔 */

.board {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--ink-2);
  box-shadow: 0 32px 64px -40px rgba(0, 0, 0, 0.9);
}

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.board-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.board-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.board-issue {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.board-clock {
  font-family: var(--mono);
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -1.5px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.board-clock.urgent { color: var(--red); }

.board-bar {
  height: 3px;
  margin: 14px 0 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.board-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--gold);
  transition: width 0.4s linear;
}

.board-last {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.board-label { font-size: 11px; color: var(--text-3); flex-shrink: 0; }

.board-balls { display: flex; gap: 6px; flex-wrap: wrap; }

.ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--ink-4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ball.red { background: #3a1d22; border-color: rgba(239, 75, 91, 0.35); color: #ff98a2; }
.ball.blue { background: #17243c; border-color: rgba(74, 140, 247, 0.35); color: #8fb6ff; }
.ball.green { background: #12301f; border-color: rgba(47, 191, 122, 0.32); color: #6fdaa6; }
.ball.special { box-shadow: 0 0 0 1.5px var(--gold); }

.board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  font-size: 11.5px;
  color: var(--text-3);
}

.board-foot b { font-family: var(--mono); color: var(--text-2); font-weight: 500; }
.board-foot a { color: var(--gold); font-size: 12px; }
.board-foot a:hover { color: #f8cd68; }

/* 首页五分彩总和 */

.board-sum {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.board-sum b {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.board-sum-tags {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.board-sum-tags span {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 11px;
  text-align: center;
  color: var(--text-3);
}

.board-sum-tags span.on {
  color: #191203;
  border-color: transparent;
  background: linear-gradient(145deg, #ffdf8e, var(--gold) 55%, var(--gold-deep));
  font-weight: 600;
}

/* ---------------------------------------------------------- 公告 */

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-1);
}

.notice-tag {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  background: rgba(242, 193, 78, 0.1);
  border: 1px solid rgba(242, 193, 78, 0.24);
}

.notice-view {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 48px), transparent 100%);
}

.notice-run {
  display: flex;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--text-2);
  animation: marquee 56s linear infinite;
  animation-delay: 3s;
  width: max-content;
}

.notice-run > span { padding-right: 72px; }

.notice:hover .notice-run { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------- 快捷入口 */

.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-1);
  transition: background-color 0.15s, border-color 0.15s;
  text-align: left;
}

.quick-item:hover { background: var(--ink-2); border-color: var(--line-2); }

.quick-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink-3);
  color: var(--text-2);
  flex-shrink: 0;
}

.quick-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-label { display: flex; flex-direction: column; line-height: 1.3; }
.quick-label b { font-size: 13px; font-weight: 500; color: var(--text); }
.quick-label span { font-size: 11px; color: var(--text-3); }

/* ---------------------------------------------------------- 游戏专区 */

.zone { margin-top: 8px; }

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

.zone-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.zone-meta { font-size: 12px; color: var(--text-3); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.gcard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-1);
  transition: background-color 0.15s, border-color 0.15s;
}

.gcard:hover { background: var(--ink-2); border-color: var(--line-2); }

.gemblem {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--tone, var(--text-2));
  flex-shrink: 0;
}

.gemblem svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gtext {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.gname { font-size: 14px; font-weight: 500; color: var(--text); }

.gmeta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.gmeta.locked { color: var(--red); }

/* ---------------------------------------------------------- 页脚 */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.foot-links { display: flex; align-items: center; gap: 16px; }

.foot-link {
  font-size: 11.5px;
  color: var(--text-2);
  transition: color 0.15s;
}

.foot-link:hover { color: var(--gold); }

/* ---------------------------------------------------------- 底部导航 */

.tabbar { display: none; }

/* ---------------------------------------------------------- 弹层 */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 5, 8, 0.66);
  opacity: 0;
  transition: opacity 0.2s;
}

.sheet-backdrop.in { opacity: 1; }

/* 屏幕正中的对话框（不再是底部抽屉） */
.sheet {
  position: fixed;
  z-index: 81;
  left: 50%;
  top: 50%;
  bottom: auto;
  width: min(440px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, -46%);
  opacity: 0;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--ink-2);
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.96);
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0.3, 1), opacity 0.18s;
}

.sheet.in { transform: translate(-50%, -50%); opacity: 1; }

.sheet[hidden] { display: none; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sheet-head h3 { margin: 0; font-size: 16px; font-weight: 600; }

.sheet-x {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
}

.sheet-x:hover { background: var(--ink-3); color: var(--text); }

.sheet-form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--text-2); }

.field input {
  height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--ink-1);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus { border-color: rgba(242, 193, 78, 0.6); }
.field input::placeholder { color: var(--text-3); }

.sheet-err {
  margin: 0;
  font-size: 12px;
  color: var(--red);
}

.sheet-alt {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.sheet-alt button { color: var(--gold); font-size: 12px; }

.sheet-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}

.sheet-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--ink-1);
  border: 1px solid var(--line);
  font-size: 13px;
}

.sheet-row span { color: var(--text-3); font-size: 12px; }
.sheet-row b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------------------------------------------------------- 通知 */

.toasts {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  box-shadow: 0 20px 40px -24px #000;
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 320px;
  animation: toastIn 0.2s ease-out;
}

.toast.err { border-color: rgba(239, 75, 91, 0.45); }
.toast.ok { border-color: rgba(47, 191, 122, 0.4); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

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

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 40px 32px 48px; }
  .hero h1 { font-size: 34px; }
  .board-clock { font-size: 44px; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (max-width: 760px) {
  body { padding-bottom: 84px; }

  .hdr { height: 56px; padding: 0 16px; gap: 10px; }
  .hdr-name { font-size: 14px; }
  .hdr-mark { height: 21px; }
  .hdr-sub { display: none; }

  .wrap { padding: 16px 16px 24px; gap: 12px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 20px 44px;
    min-height: 0;
  }

  .hero .trails { display: none; }

  .hero h1 { font-size: 28px; letter-spacing: -0.3px; margin-bottom: 12px; }
  .hero-kicker { margin-bottom: 10px; }
  .hero-sub { font-size: 13px; margin-bottom: 22px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1; height: 44px; padding: 0 12px; }

  .board { padding: 16px; }
  .board-clock { font-size: 42px; }

  .notice { height: 42px; padding: 0 12px; gap: 10px; }
  .notice-run { gap: 40px; font-size: 12px; }

  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .quick-item {
    flex-direction: column;
    gap: 8px;
    padding: 14px 4px 12px;
    text-align: center;
    border-radius: var(--r-md);
  }
  .quick-icon { width: 30px; height: 30px; border-radius: 8px; }
  .quick-icon svg { width: 16px; height: 16px; }
  .quick-label { align-items: center; line-height: 1.3; }
  .quick-label b { font-size: 12px; }
  .quick-label span { display: none; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gcard { flex-direction: column; gap: 10px; padding: 18px 8px 16px; text-align: center; border-radius: var(--r-md); }
  .gemblem { width: 52px; height: 52px; }
  .gemblem svg { width: 28px; height: 28px; }
  .gtext { align-items: center; gap: 2px; }
  .gname { font-size: 13px; }
  .gmeta { font-size: 10px; }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(9, 12, 17, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }

  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10.5px;
    color: var(--text-3);
  }

  .tab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tab.on { color: var(--gold); }

  .toasts { top: 64px; right: 12px; left: 12px; }
  .toast { max-width: none; }

  /* 移动端弹窗同样居中，四角圆角一致 */
  .sheet {
    width: calc(100vw - 32px);
    max-height: min(84vh, 720px);
    padding: 20px 18px;
  }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 25px; }
  .gcard { padding: 16px 6px 14px; }
  .gname { font-size: 12.5px; }
}
