:root {
  --bg-a: #421019;
  --bg-b: #150712;
  --gold: #ffd36a;
  --gold2: #ffab35;
  --red: #e82f56;
  --green: #2ed573;
  --blue: #54a0ff;
  --text: #fff4d6;
  --muted: rgba(255, 244, 214, .68);
  --line: rgba(255,255,255,.2);
  --panel: rgba(255,255,255,.11);
  --dark: rgba(0,0,0,.34);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 211, 106, .22), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(232, 47, 86, .25), transparent 26%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 17px;
  color: #3b2300;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
  box-shadow: 0 6px 0 #935607, 0 12px 26px rgba(0,0,0,.28);
  cursor: pointer;
}
button:active { transform: translateY(3px); box-shadow: 0 3px 0 #935607, 0 8px 20px rgba(0,0,0,.22); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
button.blue { color: #fff; background: linear-gradient(180deg, #75b8ff, #2e86de); box-shadow: 0 6px 0 #155698, 0 12px 26px rgba(0,0,0,.28); }
button.green { color: #fff; background: linear-gradient(180deg, #55ef9b, #12a85e); box-shadow: 0 6px 0 #09663a, 0 12px 26px rgba(0,0,0,.28); }
button.red { color: #fff; background: linear-gradient(180deg, #ff6b81, #d92d4d); box-shadow: 0 6px 0 #80152d, 0 12px 26px rgba(0,0,0,.28); }
button.ghost { color: var(--text); background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px var(--line); }
button.playing { color: #3b2300; background: linear-gradient(180deg, #ffe888, #f6b83f); box-shadow: 0 6px 0 #8f5a05, 0 12px 26px rgba(0,0,0,.28); }
button.mini { padding: 5px 9px; font-size: 12px; box-shadow: none; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(0,0,0,.28);
  outline: none;
}
textarea { min-height: 86px; resize: vertical; }
select option { color: #111; }
label { color: var(--muted); font-size: 13px; }
h1, h2, h3 { color: var(--gold); margin: 0 0 14px; }
.hidden { display: none !important; }

.page-bg {
  min-height: 100vh;
  padding: 18px;
  padding-bottom: 82px;
}
.page-card {
  width: min(560px, calc(100vw - 28px));
  margin: 8vh auto 0;
  border-radius: 30px;
  padding: 26px;
  background: radial-gradient(circle at 50% 0, rgba(255,211,106,.25), transparent 36%), linear-gradient(145deg, rgba(83, 16, 32, .98), rgba(24, 8, 20, .98));
  border: 1px solid var(--line);
  box-shadow: 0 26px 90px rgba(0,0,0,.46);
}
.page-card.wide {
  width: 100%;
  margin: 0 0 16px;
}
.page-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(4px);
}
.page-modal.hidden { display: none; }
.modal-card {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
}
.announcement-card {
  width: min(460px, calc(100vw - 32px));
  text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(255,211,106,.24), transparent 42%), linear-gradient(145deg, rgba(83, 16, 32, .98), rgba(24, 8, 20, .98));
  border: 1px solid rgba(255,211,106,.48);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 28px 90px rgba(0,0,0,.62), inset 0 0 36px rgba(255,211,106,.08);
}
.announcement-card h2 {
  color: var(--gold);
  font-size: 26px;
  text-shadow: 0 0 16px rgba(255,211,106,.36);
}
.announcement-content {
  max-height: min(44vh, 300px);
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text);
  text-align: left;
  line-height: 1.75;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.1);
}
.announcement-img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  margin: 8px 0;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}
.announcement-check {
  justify-content: center;
}
.announcement-admin-form {
  grid-template-columns: 1fr;
}
.announcement-admin-form textarea {
  min-height: 180px;
}
.page-form {
  display: grid;
  gap: 12px;
}
.lobby-page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding-bottom: 96px;
}
.lobby-home {
  padding-top: 10px;
}
.site-brand-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.site-brand-card img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,211,106,.78);
  box-shadow: 0 0 16px rgba(255,211,106,.28);
}
.site-brand-card span {
  color: var(--gold);
  font-weight: 1000;
  letter-spacing: .5px;
}
.account-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin: 0 0 14px;
  border-radius: 22px;
  background: radial-gradient(circle at 0 0, rgba(255,211,106,.24), transparent 40%), rgba(0,0,0,.28);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(0,0,0,.28);
}
.account-card.large { margin-top: 12px; }
.account-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.account-meta b { color: var(--gold); font-size: 18px; }
.account-meta span { color: var(--muted); font-size: 13px; }
.account-meta em { color: var(--text); font-style: normal; font-weight: 900; }
.vip-progress {
  width: min(360px, 100%);
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.36);
  border: 1px solid rgba(255,211,106,.25);
}
.vip-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd36a, #2ed573);
  transition: width .35s ease;
}
.home-hero {
  width: 100%;
  margin-left: 0;
  margin-bottom: 16px;
  border-radius: 28px;
  padding: 0;
  background: linear-gradient(145deg, rgba(83,16,32,.96), rgba(24,8,20,.96));
  border: 1px solid var(--line);
  box-shadow: 0 22px 70px rgba(0,0,0,.34);
  overflow: hidden;
}
.carousel {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 950 / 533;
  overflow: hidden;
  border-radius: 28px;
  background: radial-gradient(circle at 70% 20%, rgba(255,211,106,.35), transparent 30%), linear-gradient(135deg, #782036, #220b1b);
}
.slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .45s ease, transform .45s ease;
  color: var(--gold);
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 1000;
  text-align: center;
  padding: 18px;
}
.slide.image-slide {
  padding: 0;
}
.slide.active {
  opacity: 1;
  transform: scale(1);
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: inherit;
  background: #160812;
}
.game-tabs, .level-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px 0;
  scrollbar-width: none;
}
.lobby-game-tabs {
  margin: -4px 0 12px;
  padding: 0 2px;
}
.game-tabs::-webkit-scrollbar, .level-tabs::-webkit-scrollbar { display: none; }
.game-tabs button, .level-tabs button {
  flex: 0 0 auto;
  box-shadow: none;
  background: rgba(255,255,255,.12);
  color: var(--text);
  border: 1px solid var(--line);
}
.game-tabs button.active, .level-tabs button.active {
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
  color: #3b2300;
}
.admin-page {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head p, .hint {
  color: var(--muted);
}
.page-actions, .lobby-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}
.lobby-tools {
  flex-wrap: nowrap;
}
.lobby-tools > * {
  flex: 1 1 0;
}
.lobby-play-card {
  padding: 12px 14px;
  border-radius: 20px;
}
.lobby-play-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.lobby-tool-card {
  min-width: 0;
  min-height: 38px;
  padding: 6px 4px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.26), transparent 44%),
    linear-gradient(180deg, #fff0a0, var(--gold2));
}
.lobby-tool-card i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff7d1;
  font-size: 11px;
  font-style: normal;
  background: rgba(59,35,0,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.lobby-tool-card b {
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}
.lobby-tool-card span {
  font-size: 11px;
  line-height: 1.25;
  color: rgba(59,35,0,.72);
  font-weight: 800;
}
.wide-action {
  width: 100%;
  margin: 2px 0 12px;
}
.lobby-home button.blue, .lobby-home button.green {
  color: #3b2300;
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
  box-shadow: 0 6px 0 #935607, 0 12px 26px rgba(0,0,0,.28);
}
.gift-dock {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  top: 56%;
  transform: translateY(-50%);
  z-index: 42;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.gift-main, .gift-option {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
}
.gift-main {
  background: linear-gradient(180deg, #fff6be, #ffb43e);
}
.gift-menu {
  display: grid;
  gap: 10px;
}
.gift-option {
  color: var(--text);
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  font-size: 13px;
}
.activity-page {
  min-height: 100vh;
  color: var(--text);
  padding: 18px 14px 26px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 211, 106, .22), transparent 28%),
    radial-gradient(circle at 18% 18%, rgba(232, 47, 86, .25), transparent 26%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
}
.activity-top {
  margin: 0 0 14px;
  display: grid;
  place-items: center;
}
.activity-top h1 { margin: 0; color: var(--gold); text-align: center; font-size: 30px; }
.activity-list { display: grid; gap: 14px; }
.activity-card {
  border-radius: 28px;
  background: radial-gradient(circle at 50% 0, rgba(255,211,106,.25), transparent 36%), linear-gradient(145deg, rgba(83, 16, 32, .98), rgba(24, 8, 20, .98));
  padding: 18px;
  min-height: 210px;
  border: 1px solid var(--line);
  box-shadow: 0 26px 90px rgba(0,0,0,.46);
}
.activity-card h2 { color: var(--gold); font-size: 20px; }
.activity-card img { width: 100%; max-height: 170px; object-fit: cover; border-radius: 12px; margin: 8px 0 12px; }
.activity-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 18px; }
.activity-actions button { flex: 1 1 auto; }
.activity-actions button.primary { color: #3b2300; }
.rebate-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.rebate-card > div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
}
.rebate-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.rebate-card b {
  color: var(--gold);
  font-size: 24px;
}
.rebate-card em {
  font-style: normal;
}
.rebate-card button {
  grid-column: 1 / -1;
}
.captcha-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; align-items: center; }
.captcha-row img { width: 132px; height: 46px; border-radius: 12px; cursor: pointer; }
.remember-line {
  justify-self: start;
  margin-top: -4px;
  font-size: 13px;
}
.login-extra { display: flex; justify-content: flex-end; margin-top: 8px; }
.login-extra a { color: var(--gold); font-weight: 900; text-decoration: none; }
.room-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px max(10px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  border-radius: 24px 24px 0 0;
  background: rgba(15,5,14,.92);
  border: 1px solid var(--line);
  border-bottom: 0;
  backdrop-filter: blur(8px);
}
.bottom-nav button {
  position: relative;
  box-shadow: none;
  padding: 10px 8px;
}
.red-dot {
  position: absolute;
  top: 7px;
  right: 18%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff304f;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.bottom-nav button.active {
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
  color: #3b2300;
}
.match-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-weight: 900;
}
.match-loading span {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.chat-card { width: min(560px, calc(100vw - 30px)); }
.chat-messages {
  height: 300px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--line);
}
.chat-msg {
  max-width: 82%;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  color: var(--text);
}
.chat-msg.me {
  justify-self: end;
  background: rgba(255,211,106,.22);
}
.chat-msg img { max-width: 180px; border-radius: 12px; display: block; }
.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.2);
}
.avatar.big {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: rgba(255,255,255,.14);
}
.avatar.big img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}
.sub-head {
  display: grid;
  grid-template-columns: 82px 1fr 82px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sub-head h1 {
  text-align: center;
  margin: 0;
}
.sub-head.inline {
  grid-template-columns: 74px 1fr 34px;
}
.menu-list {
  display: grid;
  gap: 12px;
}
.setting-text {
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
}
.wechat-shell {
  width: min(760px, 100%);
  height: calc(100vh - 28px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}
.wechat-messages {
  overflow-y: auto;
  padding: 12px;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0, rgba(255,211,106,.16), transparent 34%), rgba(0,0,0,.22);
  border: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 10px;
}
.wechat-msg {
  display: grid;
  justify-items: start;
  gap: 3px;
}
.wechat-msg.me { justify-items: end; }
.wechat-msg .bubble {
  max-width: min(76vw, 420px);
  padding: 10px 12px;
  border-radius: 18px 18px 18px 5px;
  background: rgba(255,255,255,.13);
  border: 1px solid var(--line);
  color: var(--text);
  word-break: break-word;
}
.wechat-msg.me .bubble {
  border-radius: 18px 18px 5px 18px;
  background: linear-gradient(135deg, rgba(255,211,106,.34), rgba(255,171,53,.22));
}
.wechat-msg span {
  color: var(--muted);
  font-size: 11px;
}
.wechat-msg img {
  display: block;
  max-width: min(62vw, 240px);
  border-radius: 12px;
}
.wechat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(0,0,0,.34);
  border: 1px solid var(--line);
}
.image-btn {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,.12);
  border: 1px solid var(--line);
  font-weight: 900;
}
.center { text-align: center; }
@media (max-width: 720px) {
  .page-bg { padding: 10px; padding-bottom: 76px; }
  .page-card { padding: 18px; border-radius: 24px; }
  .account-card { border-radius: 18px; padding: 10px; }
  .avatar.big { width: 58px; height: 58px; font-size: 28px; }
  .carousel { height: auto; aspect-ratio: 950 / 533; }
  .room-card { align-items: flex-start; }
  .room-card button { min-width: 72px; padding: 9px 12px; }
  .bottom-nav button { font-size: 13px; padding: 9px 4px; }
  .wechat-shell { height: calc(100vh - 20px); }
  .wechat-input { grid-template-columns: minmax(0, 1fr) 58px 58px; gap: 6px; padding: 8px; }
  .wechat-input input { padding: 10px; }
  .wechat-input button, .image-btn { padding: 0 8px; font-size: 13px; }
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.admin-form button { min-width: max-content; }
.admin-search {
  width: min(420px, 100%);
  margin: 0 0 12px;
}
.admin-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.admin-sidebar {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
}
.side-tab {
  width: 100%;
  color: var(--text);
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.side-tab.active {
  color: #3b2300;
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
  box-shadow: 0 6px 0 #935607, 0 12px 26px rgba(0,0,0,.28);
}
.admin-panel { display: none; margin-top: 0; }
.admin-panel.active { display: block; }
.admin-content { min-width: 0; }
.checkline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.checkline input { width: auto; }
.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 400px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.data-table th, .data-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.data-table input {
  min-width: 96px;
  padding: 8px 10px;
}
.device-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-actions {
  display: flex;
  gap: 8px;
}
.row-actions button {
  padding: 7px 12px;
}
.admin-list {
  display: grid;
  gap: 12px;
}
.admin-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
}
.admin-item h3 {
  margin: 0 0 8px;
  color: var(--gold);
}
.support-admin {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 14px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.stats-range-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.stats-range-tabs button {
  padding: 8px 12px;
  box-shadow: none;
  background: rgba(255,255,255,.12);
  color: var(--text);
}
.stats-range-tabs button.active {
  color: #3b2300;
  background: linear-gradient(180deg, #fff0a0, var(--gold2));
}
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.bulk-bar input {
  max-width: 160px;
}
.switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.switch-card {
  min-height: 70px;
  border-radius: 20px;
  box-shadow: 0 0 0 3px rgba(255,48,79,.35), 0 16px 38px rgba(0,0,0,.25);
}
.switch-card.on {
  background: linear-gradient(180deg, #7dff9a, #2ed573);
  color: #062d18;
  box-shadow: 0 0 0 4px rgba(46,213,115,.45), 0 0 28px rgba(46,213,115,.55), 0 16px 38px rgba(0,0,0,.25);
}
.switch-card.off {
  background: linear-gradient(180deg, #ff6b81, #d92d4d);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255,48,79,.38), 0 0 24px rgba(255,48,79,.42), 0 16px 38px rgba(0,0,0,.25);
}
.stat-card {
  cursor: pointer;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid var(--line);
}
.stat-card.active {
  box-shadow: 0 0 0 4px rgba(255,211,106,.3), 0 0 28px rgba(255,211,106,.32);
}
.robot-stats-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.robot-stats-card > div {
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
}
.robot-stats-card b {
  display: block;
  color: var(--gold);
  font-size: 22px;
}
.stat-card b {
  display: block;
  color: var(--gold);
  font-size: 26px;
}
.chart-box {
  margin-top: 14px;
  height: 320px;
  min-height: 320px;
  padding: 0;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  color: var(--muted);
  overflow: hidden;
  display: flex;
  transition: transform .22s ease, opacity .22s ease;
}
.chart-box.chart-switching {
  opacity: .55;
  transform: translateY(5px) scale(.992);
}
.stats-svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: chartFadeIn .25s ease both;
}
.stats-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawStatsLine .75s ease forwards;
}
@keyframes chartFadeIn {
  from { opacity: .45; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawStatsLine {
  to { stroke-dashoffset: 0; }
}
.support-tab { position: relative; }
.support-tab .red-dot { right: 12px; top: 10px; }
@media (max-width: 720px) {
  .support-admin { grid-template-columns: 1fr; }
}
.admin-item p {
  margin: 0 0 10px;
  color: var(--muted);
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.mini-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.mini-card span {
  color: var(--muted);
  font-size: 13px;
}
.mini-card.winner {
  border-color: rgba(255,211,106,.65);
  box-shadow: 0 0 22px rgba(255,211,106,.15);
}

.console-log {
  max-height: 420px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 14px;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,.12);
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #b0b0b0;
}
.console-log .log-entry {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  word-break: break-all;
}
.console-log .log-time { color: #666; }
.console-log .log-room { color: #54a0ff; }
.console-log .log-win { color: #2ed573; }
.console-log .log-lose { color: #e82f56; }
.console-log .log-hand { color: #ffd36a; }
.console-log .log-nick { color: #fff4d6; font-weight: 700; }
.console-log .log-amount { color: #ffab35; font-weight: 700; }
.toggle-arrow { font-size: 12px; color: var(--muted); transition: transform .2s; cursor: pointer; user-select: none; }
.toggle-arrow.open { transform: rotate(90deg); }

.admin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.admin-item-header h3 {
  margin: 0;
}
.admin-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-item-body {
  margin-top: 10px;
}

.match-pool-actions {
  margin: 10px 0 14px;
}
.match-pool-room {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.match-room-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.match-room-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.match-room-meta b {
  color: var(--gold);
  font-size: 16px;
}
.match-room-meta span {
  color: var(--muted);
  font-size: 13px;
}
.match-pool-player-actions {
  flex-shrink: 0;
}
.risk-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.risk-tag.normal { background: rgba(46,213,115,.15); color: #2ed573; }
.risk-tag.risk { background: rgba(255,165,53,.15); color: #ffa535; }
.risk-tag.violation { background: rgba(232,47,86,.15); color: #e82f56; }
.player-row-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--card); margin-bottom: 6px; }
.player-row-card img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.player-row-card .player-info { flex: 1; min-width: 0; }
.player-row-card .player-info b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row-card .player-info span { font-size: 12px; color: var(--muted); }
.player-row-card .player-actions { display: flex; gap: 6px; flex-shrink: 0; }
.player-row-card .player-actions button { padding: 4px 10px; border-radius: 6px; border: none; cursor: pointer; font-size: 12px; font-weight: 600; }
.btn-lose { background: rgba(232,47,86,.15); color: #e82f56; }
.btn-lose.active { background: #e82f56; color: #fff; }
.btn-win { background: rgba(46,213,115,.15); color: #2ed573; }
.btn-win.active { background: #2ed573; color: #fff; }
.btn-balance { background: rgba(84,160,255,.15); color: #54a0ff; }
.btn-balance.active { background: #54a0ff; color: #fff; }
.btn-card-type {
  background: rgba(255, 200, 0, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 200, 0, 0.4);
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-card-type:hover { opacity: 0.7; }
.btn-card-type.active { opacity: 0; pointer-events: none; }
.switch-card.danger-red { border-color: #e82f56; color: #fff; background: #e82f56; }
.switch-card.danger-green { border-color: #2ed573; color: #fff; background: #2ed573; }
.switch-card.danger-red[data-enabled="1"] { background: #e82f56; color: #fff; border-color: #e82f56; }
.switch-card.danger-green[data-enabled="1"] { background: #2ed573; color: #fff; border-color: #2ed573; }
#spotKillInputs { align-items: center; gap: 8px; flex-wrap: wrap; }
.match-level-filters { display:flex; gap:6px; flex-wrap:wrap; }
.match-level-filters .mini.active { background:var(--accent); color:#fff; }
.match-countdown { font-size:14px; }
.match-status-fade { animation: fadeOut 3s forwards; }
@keyframes fadeOut { 0%{opacity:1} 70%{opacity:1} 100%{opacity:0} }
.match-room-controls { display:flex; gap:10px; flex-wrap:wrap; }
.match-room-actions { display:flex; gap:6px; }

.room-countdown-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 9999;
  display: none; align-items: center; justify-content: center;
}
.room-countdown-modal {
  background: #1a1a2e; border-radius: 16px; padding: 40px 60px;
  text-align: center; border: 1px solid #333;
}
.countdown-spinner {
  width: 50px; height: 50px; border: 4px solid #333;
  border-top-color: #4f4; border-radius: 50%;
  animation: spin 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.countdown-text { color: #ccc; font-size: 16px; margin-bottom: 12px; }
.countdown-number { color: #4f4; font-size: 48px; font-weight: bold; }

@media (max-width: 720px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-card { margin-top: 3vh; padding: 20px; }
  .lobby-play-card { padding: 10px 12px; }
  .lobby-tools { flex-wrap: nowrap; gap: 6px; }
  .lobby-tools > * { flex: 1 1 0; flex-basis: 0; }
  .lobby-tool-card { min-height: 36px; padding: 5px 3px; border-radius: 12px; }
  .lobby-tool-card i { width: 16px; height: 16px; font-size: 10px; border-radius: 6px; }
  .lobby-tool-card b { font-size: 10px; }
  .admin-form { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; gap: 10px; }
  .admin-shell { grid-template-columns: 1fr; gap: 10px; }
  .admin-sidebar {
    position: static;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  .side-tab { padding: 9px 8px; font-size: 12px; }
}

.app { min-height: 100vh; padding: 16px; }
.center-card {
  width: min(520px, calc(100vw - 28px));
  margin: 8vh auto 0;
  border-radius: 30px;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle at 50% 0, rgba(255,211,106,.25), transparent 36%), linear-gradient(145deg, rgba(83, 16, 32, .98), rgba(24, 8, 20, .98));
  border: 1px solid var(--line);
  box-shadow: 0 26px 90px rgba(0,0,0,.46);
}
.logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #861126;
  font-size: 32px;
  background: linear-gradient(135deg, #fff4b8, #ffb833);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 9px 22px rgba(0,0,0,.26);
}
.logo.small { width: 42px; height: 42px; margin: 0; font-size: 22px; }
.logo.auth-logo { width: 88px; height: 88px; }
.logo.site-logo {
  overflow: hidden;
  border-radius: 50%;
  padding: 0;
}
.logo.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.form, .grid-form, .admin-form { display: grid; gap: 12px; }
.hint, p { color: var(--muted); line-height: 1.65; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.brand, .userbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 1000; }
.layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
}
.panel.wide { grid-column: 1 / -1; }
.grid-form { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.join-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 18px; }
.room-list { display: grid; gap: 10px; }
.room-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
}

.game { width: min(1180px, 100%); margin: 0 auto; }
.game-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--dark);
}
.message {
  margin: 12px auto;
  max-width: 680px;
  padding: 10px 16px;
  border-radius: 999px;
  text-align: center;
  color: #fff;
  background: rgba(0,0,0,.48);
}
.table {
  min-height: 430px;
  border-radius: 48px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 58%), linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid var(--line);
  box-shadow: inset 0 0 55px rgba(255,255,255,.04), 0 30px 80px rgba(0,0,0,.32);
}
.player {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: rgba(0,0,0,.24);
}
.player.me { outline: 2px solid rgba(255,211,106,.55); }
.player.turn { box-shadow: 0 0 0 4px rgba(255,211,106,.25), 0 0 42px rgba(255,211,106,.25); }
.player.folded { opacity: .48; filter: grayscale(.6); }
.player-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cards { min-height: 72px; display: flex; gap: 7px; flex-wrap: wrap; }
.card {
  width: 48px;
  height: 68px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #1f2430;
  font-weight: 1000;
  background: #fff6e9;
  box-shadow: 0 8px 16px rgba(0,0,0,.24);
}
.card.red { color: #d92d4d; }
.card.back {
  color: #fff4d6;
  background: repeating-linear-gradient(45deg, #861126 0 8px, #b01e3e 8px 16px);
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-form { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; margin-bottom: 16px; }
.check { display: flex; align-items: center; gap: 6px; }
.check input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
td input { width: 120px; padding: 8px; }

.pay-qr {
  display: block;
  width: 220px;
  height: 220px;
  max-width: 100%;
  object-fit: contain;
  margin: 14px auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}
@media (max-width: 720px) {
  .pay-qr { width: 180px; height: 180px; }
}

.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%) translateY(-10px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0,0,0,.74);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 大厅胜利战报跑马灯 */
.marquee-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255, 198, 100, 0.16), rgba(140, 26, 35, 0.55));
  border: 1px solid rgba(255, 198, 100, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 215, 130, 0.18);
  overflow: hidden;
}
.marquee-card .marquee-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #ffd877, #c98a1a 70%, #6c3a07);
  color: #2a0c0c;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.marquee-card .marquee-viewport {
  position: relative;
  flex: 1;
  height: 28px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-card .marquee-track {
  display: inline-flex;
  gap: 48px;
  white-space: nowrap;
  line-height: 28px;
  padding-left: 100%;
  color: #ffe6a8;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  will-change: transform;
}
.marquee-card .marquee-item { letter-spacing: 0.4px; }
.marquee-card .marquee-empty { color: #f1c97c; opacity: 0.9; }
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 760px) {
  .layout, .table, .admin-form { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .userbar { justify-content: flex-end; }
  .center-card { margin-top: 3vh; padding: 22px; }
}
.ai-strategy-card { background: #1a1a2e; border: 1px solid #333; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.ai-strategy-card h3 { color: #4f4; font-size: 18px; margin: 0 0 16px; }
.ai-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.ai-stat-item { background: #12122a; border-radius: 8px; padding: 12px; text-align: center; }
.ai-stat-label { color: #888; font-size: 12px; margin-bottom: 4px; }
.ai-stat-value { color: #fff; font-size: 20px; font-weight: bold; }
.ai-stat-value.green { color: #4f4; }
.ai-stat-value.red { color: #f44; }
.ai-realtime-section h4 { color: #aaa; font-size: 14px; margin: 0 0 10px; }
.ai-realtime-list { max-height: 400px; overflow-y: auto; }
.ai-robot-row { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid #222; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.ai-robot-row:last-child { border-bottom: none; }
.ai-robot-name { color: #fff; min-width: 80px; }
.ai-robot-room { color: #4af; min-width: 70px; }
.ai-robot-hand { color: #fa4; min-width: 60px; }
.ai-robot-wv { min-width: 50px; }
.ai-robot-balance { color: #ccc; min-width: 120px; }
.ai-robot-actions { margin-left: auto; display: flex; gap: 4px; }
.ai-robot-actions button { padding: 3px 8px; font-size: 11px; border: none; border-radius: 4px; cursor: pointer; }
.ai-robot-actions .ai-btn-see { background: #4a4a2a; color: #ff4; }
.ai-robot-actions .ai-btn-call { background: #2a5a2a; color: #4f4; }
.ai-robot-actions .ai-btn-raise { background: #2a4a5a; color: #4af; }
.ai-robot-actions .ai-btn-fold { background: #5a2a2a; color: #f44; }
.ai-robot-actions button:disabled { opacity: 0.3; cursor: not-allowed; }
