:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #e8ecf1;
  --muted: #94a0af;
  --primary: #3aa8ff;
  --danger: #ff6060;
  --line: #242a35;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #0e121a 0%, #0a0d13 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft Yahei", sans-serif;
}
.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 12px;
}
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 20, 0.88);
  backdrop-filter: blur(8px);
}
.header-inner {
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.3px;
}
.hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 150px;
  margin-bottom: 12px;
  background: linear-gradient(120deg, #1c2a41, #0d1625);
}
.hero-bg {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.15));
}
.hero-content {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
}
.hero-content h1 {
  margin: 0;
  font-size: 18px;
}
.hero-content p {
  margin: 6px 0 0;
  color: #d8deea;
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 8px;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1a1f29;
  color: var(--text);
  cursor: pointer;
  padding: 8px 12px;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px;
}
.notice {
  margin-bottom: 12px;
}
.notice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notice-row::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd98d, #d19f43);
  box-shadow: 0 0 10px rgba(255, 215, 133, 0.4);
  flex: 0 0 16px;
}
.notice-label {
  flex: 0 0 auto;
  font-size: 12px;
  color: #f2cf83;
}
.notice-track {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.notice-content {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.panel-title {
  font-size: 15px;
  margin-bottom: 8px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.hot-row {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid #333a49;
  background: #161b25;
  border-radius: 999px;
  padding: 4px 10px;
  color: #ffcd66;
  font-size: 12px;
}
.main-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.main-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  background: #171c27;
  cursor: pointer;
}
.main-tab.active {
  color: #fff;
  border-color: var(--primary);
  background: rgba(58, 168, 255, 0.2);
}
.tab {
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  cursor: pointer;
}
.tab.active {
  color: #fff;
  border-color: var(--primary);
  background: rgba(58, 168, 255, 0.2);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #111621;
  cursor: pointer;
}
.game-cover-gloss {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.game-cover {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #1b2130;
}
.game-info {
  padding: 8px;
}
.game-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.game-name {
  font-size: 14px;
  font-weight: 600;
}
.game-tag {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1;
  color: #111;
  background: linear-gradient(180deg, #ffd98d, #d6a74f);
  border: 1px solid #e6bf73;
  font-weight: 700;
}
.game-corner-badge {
  display: none;
}
.game-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.game-enter-row {
  margin-top: 8px;
}
.game-enter-btn {
  width: 100%;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #2e3f60;
  background: #16233a;
  color: #dbe7ff;
  font-size: 12px;
  cursor: pointer;
}
.maintain-mask {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(235, 240, 246, 0.5);
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  padding: 10px;
}
.maintain-text {
  background: rgba(255, 255, 255, 0.8);
  color: #111;
  border-radius: 8px;
  padding: 6px 8px;
}
.game-card.maintain .maintain-mask {
  display: flex;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #3ad29f;
  margin-right: 6px;
}
.dot.off {
  background: var(--danger);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.84);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
}
.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(9, 12, 17, 0.98);
  border-top: 1px solid #252c39;
}
.mobile-item {
  border: 0;
  background: transparent;
  color: #7f8ea5;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.mobile-item.active {
  color: #5cb8ff;
}
.hidden {
  display: none !important;
}
.mobile-only {
  display: none;
}
.mt8 {
  margin-top: 8px;
}
.mt12 {
  margin-top: 12px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.wallet-box {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #141922;
}
.wallet-balance {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
}
.wallet-record-wrap {
  width: 100%;
  overflow-x: auto;
}
.wallet-record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.wallet-record-table th,
.wallet-record-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
  text-align: left;
  white-space: nowrap;
}
.wallet-record-table th {
  color: var(--muted);
  font-weight: 600;
}
.promo-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.promo-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #121722;
}
.promo-item img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  display: block;
  background: #1a2130;
}
.promo-info {
  padding: 8px 10px;
}
.promo-title {
  font-size: 14px;
  font-weight: 600;
}
.promo-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.promo-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.promo-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111824;
  padding: 14px;
}
.promo-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 8px;
  background: #1c2535;
  color: #dce8ff;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.promo-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #eef4ff;
  padding-right: 30px;
}
.promo-modal-cover {
  width: 100%;
  border-radius: 8px;
  display: block;
}
.promo-modal-content {
  line-height: 1.7;
  color: #cdd9ee;
}
.wallet-form {
  max-width: 520px;
}
.wallet-form-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.wallet-input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1520;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}
.wallet-input:focus {
  border-color: rgba(58, 168, 255, 0.7);
}
.mine-modal-panel {
  width: min(520px, calc(100vw - 24px));
}
@media (min-width: 768px) {
  .container {
    padding: 16px;
  }
  .hero-bg {
    height: 220px;
  }
  .hero-content h1 {
    font-size: 24px;
  }
  .layout {
    grid-template-columns: 300px 1fr;
  }
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .game-cover {
    height: 132px;
  }
  .mobile-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}
@media (max-width: 767px) {
  body {
    padding-bottom: 70px;
  }
}
