:root {
  --bg: #0d0e12;
  --bg-soft: #14161d;
  --panel: rgba(26, 28, 37, 0.92);
  --panel-strong: #20232e;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f2e9;
  --muted: #979aa6;
  --gold: #e5ad3e;
  --gold-light: #f6d887;
  --gold-dark: #a96e15;
  --gold-rgb: 229, 173, 62;
  --red: #f04e5d;
  --green: #26c281;
  --blue: #5c91ff;
  --purple: #9f76ff;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% -4%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 26rem),
    radial-gradient(circle at 96% 32%, color-mix(in srgb, var(--red) 10%, transparent), transparent 30rem),
    linear-gradient(
      180deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 84%, #000) 46%,
      var(--bg) 100%
    );
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.2;
}

.ambient-a {
  top: 10%;
  left: -240px;
  background: var(--gold);
}

.ambient-b {
  right: -300px;
  bottom: 10%;
  background: var(--red);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(var(--gold-rgb), 0.22);
}

.brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  overflow: hidden;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-install-icon {
  display: inline-flex;
  min-width: 66px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--gold-light);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-strong);
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    border-color 0.18s ease;
}

.button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.button-gold {
  color: #1a1407;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  box-shadow: 0 8px 24px rgba(var(--gold-rgb), 0.2);
}

.button-outline {
  background: transparent;
}

.button-danger {
  color: #fff;
  border-color: rgba(240, 78, 93, 0.28);
  background: rgba(240, 78, 93, 0.14);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.balance-pill {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid rgba(var(--gold-rgb), 0.24);
  border-radius: 11px;
  background: rgba(var(--gold-rgb), 0.08);
  cursor: pointer;
  font-size: 10px;
}

.balance-pill strong {
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
}

.user-avatar {
  width: 35px;
  height: 35px;
  overflow: hidden;
  padding: 0;
  color: #1b1405;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
  cursor: pointer;
  font-weight: 800;
}

.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice-bar {
  display: flex;
  max-width: 1132px;
  height: 36px;
  align-items: center;
  margin: 4px auto 0;
  overflow: hidden;
  border: 1px solid rgba(var(--gold-rgb), 0.14);
  border-radius: 12px;
  background: rgba(var(--gold-rgb), 0.055);
  color: #cabfa6;
  font-size: 12px;
}

.notice-label {
  height: 100%;
  padding: 0 15px;
  color: #1b1405;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  font-weight: 800;
  line-height: 36px;
}

.notice-track {
  min-width: 0;
  flex: 1;
  padding: 0 15px;
  overflow: hidden;
  white-space: nowrap;
}

.notice-track span {
  display: inline-block;
  animation: marquee 22s linear infinite;
}

.notice-live {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border-left: 1px solid var(--line);
  color: #b7baa6;
}

.notice-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.notice-bar.compact-notice {
  width: 100%;
  max-width: none;
  height: 28px;
  margin: 0 0 13px;
  border-radius: 9px;
  font-size: 9px;
}

.compact-notice .notice-label {
  padding: 0 11px;
  font-size: 9px;
  line-height: 28px;
}

.compact-notice .notice-track {
  padding: 0 10px;
}

.compact-notice .notice-live {
  gap: 5px;
  padding: 0 10px;
  font-size: 8px;
}

.compact-notice .notice-live i {
  width: 5px;
  height: 5px;
}

@keyframes marquee {
  0%,
  12% {
    transform: translateX(0);
  }
  88%,
  100% {
    transform: translateX(min(-360px, calc(-100vw + 420px)));
  }
}

.view {
  width: min(1132px, calc(100% - 32px));
  min-height: calc(100vh - 180px);
  margin: 22px auto 110px;
}

.page-enter {
  animation: page-in 0.28s ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.hero {
  position: relative;
  display: grid;
  min-height: 278px;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  align-items: center;
  overflow: hidden;
  padding: 38px 42px;
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: 28px;
  background:
    linear-gradient(
      100deg,
      color-mix(in srgb, var(--panel-strong) 98%, var(--bg)),
      color-mix(in srgb, var(--gold) 13%, var(--bg))
    ),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--gold) 24%, transparent), transparent 40%);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  top: -120px;
  right: 2%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(var(--gold-rgb), 0.025),
    0 0 0 74px rgba(var(--gold-rgb), 0.018);
  content: "";
}

.hero::after {
  position: absolute;
  top: 45px;
  right: 120px;
  width: 170px;
  height: 170px;
  border: 1px dashed rgba(var(--gold-rgb), 0.3);
  border-radius: 50%;
  content: "";
  animation: spin 28s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.hero h1 {
  max-width: 700px;
  margin: 15px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero h1 em {
  color: var(--gold-light);
  font-style: normal;
}

.hero p {
  max-width: 610px;
  margin: 0;
  color: #aaa99f;
  font-size: 14px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 10px;
}

.hero-stat {
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(12, 13, 16, 0.48);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  display: block;
  color: var(--gold-light);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.hero-stat span {
  color: var(--muted);
  font-size: 11px;
}

.section {
  margin-top: 32px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 17px;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.text-link {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(34, 36, 47, 0.96), rgba(20, 22, 29, 0.96));
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.game-card.draw-info-hidden {
  min-height: 152px;
}

.game-card.draw-info-hidden .game-history-hint {
  margin-top: 18px;
}

.game-card:hover {
  border-color: rgba(var(--gold-rgb), 0.36);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
  transform: translateY(-4px);
}

.game-card::before {
  position: absolute;
  top: -50px;
  right: -45px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: var(--game-color, var(--gold));
  content: "";
  filter: blur(1px);
  opacity: 0.12;
}

.game-card::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 72px;
  height: 72px;
  border: 1px solid color-mix(in srgb, var(--game-color, var(--gold)) 35%, transparent);
  border-radius: 50%;
  content: "";
  opacity: 0.6;
}

.game-card.gold {
  --game-color: #e5ad3e;
}

.game-card.red {
  --game-color: #f04e5d;
}

.game-card.blue {
  --game-color: #5c91ff;
}

.game-card.green {
  --game-color: #26c281;
}

.game-card.purple {
  --game-color: #9f76ff;
}

.game-card h3 {
  margin: 0 0 5px;
  font-size: 20px;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.game-draw {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #d6d3ca;
  font-size: 11px;
}

.game-draw span {
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.game-draw strong {
  color: var(--gold-light);
}

.game-last-result {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 30px;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.game-last-result > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.game-last-result em {
  color: #666b78;
  font-size: 9px;
  font-style: normal;
}

.game-last-result .result-balls {
  justify-content: flex-start;
}

.game-last-result.detail {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.game-last-result.detail > span {
  min-width: 60px;
  font-size: 11px;
}

.game-history-hint {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: #6f7480;
  font-size: 9px;
  text-align: right;
}

.draw-history {
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.draw-history summary {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  color: #d3d0c7;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.draw-history summary::-webkit-details-marker {
  display: none;
}

.draw-history summary::before {
  margin-right: 8px;
  color: var(--gold);
  content: "＋";
}

.draw-history[open] summary::before {
  content: "－";
}

.draw-history summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.draw-history-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0 13px 10px;
}

.draw-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}

.draw-history-row > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.draw-history-row strong {
  overflow: hidden;
  color: #d9d6cd;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-history-row span {
  color: var(--muted);
  font-size: 8px;
}

.draw-history-row .result-balls {
  justify-content: flex-end;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.app-install-panel {
  display: flex;
  align-items: center;
  padding: 17px 19px;
  border: 1px solid color-mix(in srgb, var(--gold) 24%, transparent);
  border-radius: 17px;
  background:
    radial-gradient(circle at 90% 20%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 38%),
    color-mix(in srgb, var(--panel) 92%, transparent);
  gap: 14px;
}

.app-install-panel > img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.28);
}

.app-install-panel > div {
  min-width: 0;
  flex: 1;
}

.app-install-panel span {
  display: block;
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-install-panel strong {
  display: block;
  margin: 5px 0 4px;
  font-size: 16px;
}

.app-install-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.install-guide {
  display: flex;
  margin-bottom: 22px;
  flex-direction: column;
  gap: 9px;
}

.install-guide div {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.12);
  gap: 12px;
}

.install-guide b {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #211805;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-size: 10px;
}

.install-guide span {
  color: #c9c6bd;
  font-size: 11px;
}

.support-modal-card {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
  flex-direction: column;
  text-align: center;
}

.support-modal-card img {
  width: 82px;
  height: 82px;
  margin-bottom: 14px;
  border-radius: 50%;
}

.support-modal-card strong {
  font-size: 16px;
}

.support-modal-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 4px 0 20px;
  gap: 16px;
}

.lottery-banner {
  overflow: hidden;
  width: 100%;
  margin-bottom: 18px;
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: 20px;
  background: #0b0e13;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
}

.lottery-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.page-title h1 {
  margin: 0 0 5px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.account-profile-head {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(var(--gold-rgb), 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 12%, rgba(var(--gold-rgb), 0.18), transparent 34%),
    linear-gradient(135deg, rgba(31, 34, 44, 0.96), rgba(18, 20, 27, 0.96));
  gap: 18px;
}

.account-profile-head::after {
  position: absolute;
  right: -45px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border: 22px solid rgba(var(--gold-rgb), 0.055);
  border-radius: 50%;
  content: "";
}

.account-profile-avatar {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: #11141a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.account-profile-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.account-profile-copy > span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.account-profile-copy h1 {
  overflow: hidden;
  margin: 5px 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-bottom-actions {
  display: flex;
  margin-top: 28px;
  flex-direction: column;
  gap: 12px;
}

.account-logout-button {
  width: 100%;
  min-height: 46px;
  color: #ff9aa4;
  border-color: rgba(240, 78, 93, 0.24);
  background: rgba(240, 78, 93, 0.08);
}

.account-center-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.identity-panel.modal-identity-panel {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.modal-identity-panel .section-head {
  align-items: flex-start;
}

.draw-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: 13px;
  background: rgba(var(--gold-rgb), 0.06);
  gap: 12px;
}

.draw-strip span {
  color: var(--muted);
  font-size: 11px;
}

.draw-strip strong {
  color: var(--gold-light);
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row span:first-child {
  color: var(--muted);
}

.history-row strong {
  color: var(--gold-light);
}

.result-balls {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.result-balls i {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 5px;
  color: #201705;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.filter-pills {
  display: flex;
  overflow-x: auto;
  margin-bottom: 18px;
  padding-bottom: 3px;
  gap: 8px;
}

.pill {
  min-height: 31px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 10px;
}

.pill.active {
  color: #211805;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 800;
}

.filter-pills .pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
}

.lottery-browser {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.category-sidebar {
  position: sticky;
  top: 88px;
  min-width: 0;
  max-width: 100%;
  padding: 15px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(var(--gold-rgb), 0.075), transparent 55%),
    var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.category-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 3px;
  gap: 8px;
}

.category-nav-head span {
  font-size: 12px;
  font-weight: 800;
}

.category-nav-head small {
  color: var(--muted);
  font-size: 8px;
}

.category-sidebar .filter-pills {
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: visible;
  margin: 0;
  padding: 0;
  gap: 7px;
}

.category-sidebar .pill {
  display: grid;
  width: 100%;
  min-height: 45px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: initial;
  padding: 0 10px;
  border-radius: 12px;
  text-align: left;
  gap: 9px;
}

.category-nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--gold-light);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 9px;
  background: rgba(var(--gold-rgb), 0.08);
  font-size: 9px;
  font-weight: 900;
}

.category-nav-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-nav-icon img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
}

.category-nav-label {
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-sidebar .pill > strong {
  display: grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  color: var(--muted);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 8px;
}

.category-sidebar .pill.active .category-nav-icon,
.category-sidebar .pill.active > strong {
  color: #211805;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.32);
}

.lottery-main {
  min-width: 0;
}

.lottery-results {
  margin-top: 20px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  align-items: start;
  gap: 18px;
}

.balance-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 244, 196, 0.2), transparent 34%),
    linear-gradient(135deg, #33250d, #b07218 52%, #e0ab43);
  box-shadow: 0 20px 50px rgba(131, 82, 13, 0.24);
}

.balance-card::after {
  position: absolute;
  right: -35px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 25px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.balance-card small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.balance-card .balance-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 22px;
}

.balance-card .balance-value span {
  font-size: 17px;
}

.balance-card .balance-value strong {
  font-size: 42px;
  letter-spacing: -0.04em;
}

.balance-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.balance-actions .button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(22, 17, 8, 0.25);
  backdrop-filter: blur(10px);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-stat {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.quick-stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 20px;
}

.quick-stat span {
  color: var(--muted);
  font-size: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #c6c4bc;
  font-size: 12px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(12, 14, 19, 0.66);
  transition: border-color 0.18s ease;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(var(--gold-rgb), 0.54);
}

.field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  gap: 10px;
}

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

.channel-card {
  display: flex;
  align-items: center;
  padding: 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.channel-card.active {
  border-color: rgba(var(--gold-rgb), 0.48);
  background: rgba(var(--gold-rgb), 0.08);
}

.channel-card img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #fff;
}

.channel-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.channel-card span {
  color: var(--muted);
  font-size: 10px;
}

.wallet-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  color: #17120a;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
  font-size: 10px;
  font-weight: 900;
}

.wallet-card-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  object-fit: contain;
}

.wallet-card > span:last-child {
  min-width: 0;
}

.qr-preview {
  display: grid;
  min-height: 290px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(var(--gold-rgb), 0.32);
  border-radius: 18px;
  background: rgba(var(--gold-rgb), 0.035);
  text-align: center;
}

.qr-preview img {
  width: min(220px, 100%);
  border-radius: 15px;
  background: white;
}

.qr-preview p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.notice-box {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #c6bba4;
  border-left: 2px solid var(--gold);
  border-radius: 0 9px 9px 0;
  background: rgba(var(--gold-rgb), 0.065);
  font-size: 11px;
  line-height: 1.7;
}

.rebate-summary-panel .form-actions {
  margin-top: 16px;
}

.agency-apply-panel {
  max-width: 720px;
  padding: 28px;
}

.agency-apply-panel h2 {
  margin: 16px 0 8px;
}

.agency-apply-panel p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.invite-code-box {
  display: flex;
  align-items: center;
  margin: 20px 0;
  padding: 15px 17px;
  border: 1px dashed rgba(var(--gold-rgb), 0.35);
  border-radius: 13px;
  background: rgba(var(--gold-rgb), 0.06);
  gap: 14px;
}

.invite-code-box small {
  color: var(--muted);
}

.invite-code-box strong {
  color: var(--gold-light);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
}

.agency-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  gap: 20px;
}

.agency-hero-panel > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agency-hero-panel small {
  color: var(--muted);
  font-size: 9px;
}

.agency-hero-panel strong {
  color: var(--gold-light);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 24px;
  letter-spacing: 0.06em;
}

.agency-rate-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agency-rate-pair span {
  padding: 8px 11px;
  color: #d9d3c6;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 9px;
}

.agency-rate-pair b {
  color: var(--gold-light);
}

.identity-panel {
  position: relative;
  overflow: hidden;
}

.identity-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
}

.identity-status.unverified {
  color: #c3c5cb;
  background: rgba(195, 197, 203, 0.1);
}

.identity-status.pending {
  color: #f2cc7a;
  background: rgba(var(--gold-rgb), 0.12);
}

.identity-status.approved {
  color: #72e3b4;
  background: rgba(38, 194, 129, 0.12);
}

.identity-status.rejected {
  color: #ff919a;
  background: rgba(240, 78, 93, 0.12);
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
}

.identity-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.13);
  gap: 15px;
}

.identity-summary > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.identity-summary > div.full {
  grid-column: 1 / -1;
}

.identity-summary span {
  color: var(--muted);
  font-size: 9px;
}

.identity-summary strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.identity-lock,
.identity-gate {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px dashed rgba(var(--gold-rgb), 0.24);
  border-radius: 14px;
  background: rgba(var(--gold-rgb), 0.035);
  flex-direction: column;
  text-align: center;
}

.identity-lock strong {
  color: var(--gold-light);
  font-size: 15px;
}

.identity-lock p,
.identity-gate p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.identity-gate h3 {
  margin: 14px 0 0;
  font-size: 18px;
}

.identity-gate .button {
  margin-top: 18px;
}

.order-list {
  display: flex;
  flex-direction: column;
}

.order-item {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.order-item:last-child {
  border-bottom: 0;
}

.order-top,
.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-top strong {
  font-size: 13px;
}

.order-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.status.pending {
  color: #f2cb76;
  background: rgba(var(--gold-rgb), 0.12);
}

.status.approved,
.status.won,
.status.refunded {
  color: #6fe2ad;
  background: rgba(38, 194, 129, 0.12);
}

.status.rejected,
.status.lost {
  color: #ff8e98;
  background: rgba(240, 78, 93, 0.12);
}

.status.cancelled {
  color: #aeb1bd;
  background: rgba(174, 177, 189, 0.1);
}

.tabs {
  display: flex;
  overflow-x: auto;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.tab {
  flex: 0 0 auto;
  padding: 11px 0;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.tab.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.empty {
  padding: 44px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.tx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.tx-row:last-child {
  border-bottom: 0;
}

.tx-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.tx-row span {
  color: var(--muted);
  font-size: 10px;
}

.tx-amount {
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.tx-amount.positive {
  color: var(--green);
}

.tx-amount.negative {
  color: var(--red);
}

.support-bubble {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  border-radius: 999px;
  background: rgba(20, 21, 27, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  gap: 7px;
}

.support-bubble img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.support-bubble::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--panel-strong);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.support-bubble span {
  padding-right: 10px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 50%;
  bottom: 16px;
  display: grid;
  width: min(530px, calc(100% - 32px));
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
  transform: translateX(50%);
}

.bottom-nav a {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #878a95;
  border-radius: 14px;
  gap: 3px;
}

.bottom-nav a.active {
  color: #211805;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.bottom-nav span {
  font-size: 18px;
  line-height: 1;
}

.bottom-nav .nav-svg-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav .nav-svg-icon img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
}

.bottom-nav em {
  font-size: 9px;
  font-style: normal;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 7, 0.76);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(var(--gold-rgb), 0.18);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.52);
  animation: modal-in 0.22s ease both;
}

.modal-panel.wide {
  width: min(760px, 100%);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.modal-head h2 {
  margin: 0 0 5px;
  font-size: 22px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #d8d5cc;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.auth-tabs button {
  min-height: 38px;
  color: var(--muted);
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #211805;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 800;
}

.bet-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.17);
  gap: 10px;
}

.bet-summary div {
  text-align: center;
}

.bet-summary small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.bet-summary strong {
  color: var(--gold-light);
  font-size: 13px;
  white-space: nowrap;
}

.profit-positive {
  color: #2ecb8a !important;
}

.profit-negative {
  color: #f05a68 !important;
}

.profit-neutral {
  color: var(--gold-light) !important;
}

.modal-last-result {
  display: flex;
  align-items: center;
  margin: -7px 0 17px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  gap: 12px;
}

.bet-last-result {
  display: flex;
  align-items: center;
  margin: -7px 0 17px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  gap: 12px;
}

.bet-last-result > span {
  color: var(--muted);
  font-size: 10px;
}

.bet-last-result em {
  color: #666b78;
  font-size: 9px;
  font-style: normal;
}

.bet-page {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.bet-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  margin: 4px 0 18px;
  gap: 18px;
}

.bet-page-back {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 13px;
  color: var(--gold-light);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: 10px;
  background: rgba(var(--gold-rgb), 0.06);
  font-size: 10px;
}

.bet-page-title > span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bet-page-title h1 {
  margin: 4px 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.bet-page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.bet-page-live {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: #8ce8bb;
  border: 1px solid rgba(46, 203, 138, 0.16);
  border-radius: 999px;
  background: rgba(46, 203, 138, 0.07);
  font-size: 9px;
  gap: 7px;
}

.bet-page-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecb8a;
  box-shadow: 0 0 0 4px rgba(46, 203, 138, 0.1);
}

.bet-page-card {
  padding: 24px;
  border: 1px solid rgba(var(--gold-rgb), 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--gold-rgb), 0.08), transparent 30%),
    linear-gradient(150deg, rgba(31, 34, 44, 0.97), rgba(18, 20, 27, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

.bet-page-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 4px 0 14px;
  gap: 16px;
}

.bet-page-section-title span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bet-page-section-title h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.bet-page-section-title small {
  color: var(--muted);
  font-size: 9px;
}

.bet-page-form .form-actions {
  justify-content: flex-end;
}

.bet-page-empty {
  max-width: 720px;
  margin: 40px auto;
}

.modal-last-result > span {
  color: var(--muted);
  font-size: 10px;
}

.modal-last-result em {
  color: #666b78;
  font-size: 9px;
  font-style: normal;
}

.bet-category-tabs {
  display: flex;
  overflow-x: auto;
  margin-bottom: 17px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  gap: 7px;
}

.bet-category-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  border: 0;
  border-radius: 10px 10px 0 0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.bet-category-tabs button small {
  margin-left: 5px;
  color: #656a77;
  font-size: 8px;
}

.bet-category-tabs button.active {
  color: #211805;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 800;
}

.bet-category-tabs button.active small {
  color: rgba(33, 24, 5, 0.62);
}

.choice-group {
  margin-bottom: 17px;
}

.choice-group h4 {
  margin: 0 0 10px;
  color: #bcb9b0;
  font-size: 11px;
  font-weight: 600;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (max-width: 560px) {
  .agency-hero-panel,
  .agency-hero-panel > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .invite-code-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-last-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .bet-last-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .bet-page-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .bet-page-back {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .bet-page-title h1 {
    font-size: 25px;
  }

  .bet-page-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

.choice {
  min-height: 46px;
  color: #d8d5cc;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 12px;
}

.choice-grid .choice:nth-child(n + 19) {
  border-color: rgba(var(--gold-rgb), 0.1);
}

.choice small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.choice.active {
  color: #211805;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  font-weight: 800;
}

.choice.active small {
  color: rgba(33, 24, 5, 0.65);
}

.amount-presets {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
  gap: 8px;
}

.amount-presets button {
  min-width: 62px;
  height: 31px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.bet-selection-summary {
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  gap: 14px;
}

.bet-selection-summary span {
  color: var(--muted);
  font-size: 10px;
}

.bet-selection-summary strong {
  color: var(--gold-light);
}

.bet-selection-summary button {
  margin-left: auto;
  color: var(--gold-light);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.loading-panel {
  display: grid;
  min-height: 55vh;
  place-items: center;
  align-content: center;
  color: var(--muted);
  font-size: 12px;
  gap: 12px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(var(--gold-rgb), 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.toast {
  position: fixed;
  z-index: 200;
  top: 76px;
  left: 50%;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(27, 29, 37, 0.96);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  border-color: rgba(240, 78, 93, 0.32);
}

.toast.success {
  border-color: rgba(38, 194, 129, 0.32);
}

.muted {
  color: var(--muted);
}

.text-green {
  color: var(--green) !important;
}

.text-red {
  color: var(--red) !important;
}

.mt-18 {
  margin-top: 18px;
}

@media (max-width: 850px) {
  .lottery-browser {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .category-sidebar {
    position: sticky;
    top: 78px;
    width: 100%;
    overflow: visible;
    padding: 9px 6px;
    border-radius: 16px;
  }

  .category-nav-head {
    justify-content: center;
    margin-bottom: 7px;
    padding: 0;
  }

  .category-nav-head span {
    font-size: 8px;
    text-align: center;
  }

  .category-nav-head small {
    display: none;
  }

  .category-sidebar .filter-pills {
    flex-direction: column;
    max-height: calc(100vh - 175px);
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .category-sidebar .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .category-sidebar .pill {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px 2px;
    text-align: center;
    gap: 3px;
  }

  .category-nav-icon {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    font-size: 8px;
  }

  .category-nav-label {
    max-width: 100%;
    font-size: 7px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .category-sidebar .pill > strong {
    min-width: 18px;
    height: 15px;
    font-size: 6px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 30px 26px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 24px;
  }

  .hero-stat {
    padding: 12px;
  }

  .hero-stat strong {
    font-size: 18px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .identity-layout {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 851px) and (max-width: 1120px) {
  .lottery-browser {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .lottery-main .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 9px 14px;
  }

  .header-actions {
    gap: 6px;
  }

  .app-install-icon {
    min-width: 58px;
    height: 31px;
    padding: 0 8px;
    font-size: 9px;
  }

  .brand img {
    width: 39px;
    height: 39px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    max-width: 160px;
    font-size: 8px;
  }

  .balance-pill span {
    display: none;
  }

  .balance-pill {
    height: 31px;
    gap: 4px;
    padding: 0 7px;
  }

  .balance-pill strong {
    font-size: 10.5px;
  }

  .user-avatar {
    width: 33px;
    height: 33px;
  }

  .notice-bar {
    margin: 3px 10px 0;
  }

  .notice-bar.compact-notice {
    height: 25px;
    margin: 0 0 10px;
    border-radius: 8px;
    font-size: 8px;
  }

  .compact-notice .notice-label {
    padding: 0 8px;
    font-size: 8px;
    line-height: 25px;
  }

  .compact-notice .notice-track {
    padding: 0 8px;
  }

  .notice-live {
    display: none;
  }

  .view {
    width: calc(100% - 22px);
    margin-top: 14px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .hero {
    min-height: auto;
    padding: 27px 20px;
    border-radius: 21px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero p {
    font-size: 12px;
  }

  .hero-stats {
    gap: 7px;
  }

  .hero-stat {
    padding: 10px;
  }

  .hero-stat strong {
    font-size: 16px;
  }

  .hero-stat span {
    font-size: 8px;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-card {
    min-height: 132px;
    padding: 13px;
    border-radius: 15px;
  }

  .game-card.draw-info-hidden {
    min-height: 104px;
  }

  .game-card.draw-info-hidden .game-history-hint {
    margin-top: 12px;
  }

  .game-card::after {
    right: 12px;
    bottom: 12px;
    width: 56px;
    height: 56px;
  }

  .game-card h3 {
    margin: 0 0 3px;
    font-size: 17px;
  }

  .game-card p {
    font-size: 9px;
    line-height: 1.45;
  }

  .game-draw {
    margin-top: 10px;
    gap: 6px;
    font-size: 9px;
  }

  .game-draw span {
    padding: 3px 6px;
  }

  .game-last-result {
    min-height: 24px;
    margin-top: 6px;
  }

  .game-last-result > span {
    font-size: 8px;
  }

  .game-card .result-balls {
    gap: 2px;
  }

  .game-card .result-balls i {
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    font-size: 7px;
  }

  .game-history-hint {
    display: none;
  }

  .form-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .lottery-page-title {
    display: block;
  }

  .lottery-banner {
    margin-bottom: 13px;
    border-radius: 16px;
  }

  .page-title h1 {
    font-size: 25px;
  }

  .account-profile-head {
    padding: 16px;
    border-radius: 20px;
    gap: 13px;
  }

  .account-profile-avatar {
    width: 66px;
    height: 66px;
    border-radius: 19px;
  }

  .account-profile-copy h1 {
    margin: 4px 0;
    font-size: 23px;
  }

  .account-profile-copy p {
    font-size: 9px;
  }

  .account-bottom-actions {
    margin-top: 20px;
  }

  .panel {
    padding: 17px;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-panel,
  .modal-panel.wide {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .bet-page-card {
    padding: 15px;
    border-radius: 18px;
  }

  .bet-page-head {
    margin-bottom: 12px;
    gap: 10px;
  }

  .bet-page-live {
    padding: 6px 9px;
    font-size: 8px;
  }

  .bet-page-form .form-actions .button {
    width: 100%;
  }

  .choice-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .bet-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bet-summary div {
    min-width: 0;
  }

  .bet-summary > div:first-child {
    grid-column: 1 / -1;
  }

  #betCurrentPeriod {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bet-selection-summary {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .bet-selection-summary button {
    margin-left: 0;
  }

  .support-bubble {
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .support-bubble span {
    display: none;
  }

  .support-bubble img {
    width: 46px;
    height: 46px;
  }

  .bottom-nav {
    bottom: max(9px, env(safe-area-inset-bottom));
    width: calc(100% - 18px);
  }

  .app-install-panel {
    align-items: flex-start;
    padding: 14px;
    flex-wrap: wrap;
  }

  .app-install-panel > img {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .app-install-panel .button {
    width: 100%;
    margin-top: 4px;
  }
}

@media (max-width: 360px) {
  .lottery-browser {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .category-sidebar {
    padding: 7px 4px;
  }

  .category-sidebar .pill {
    min-height: 45px;
  }

  .site-header {
    padding-right: 10px;
    padding-left: 10px;
    gap: 7px;
  }

  .brand {
    gap: 7px;
  }

  .brand img {
    width: 35px;
    height: 35px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    max-width: 80px;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    gap: 5px;
  }

  .app-install-icon {
    min-width: 52px;
    padding: 0 6px;
    font-size: 8.5px;
  }

  .balance-pill strong {
    font-size: 10px;
  }

  .user-avatar {
    display: none;
  }
}

@media (max-width: 560px) {
  .mobile-compact-page .page-title {
    margin: 0 0 10px;
    gap: 5px;
  }

  .mobile-compact-page .page-title h1 {
    margin-bottom: 2px;
    font-size: 21px;
  }

  .mobile-compact-page .page-title p {
    font-size: 9px;
    line-height: 1.4;
  }

  .mobile-compact-page .balance-pill {
    height: 28px;
    font-size: 9px;
  }

  .mobile-compact-page .balance-pill strong {
    font-size: 11px;
  }

  .mobile-compact-page .notice-box {
    margin-bottom: 10px;
    padding: 8px 10px;
    font-size: 9px;
    line-height: 1.5;
  }

  .mobile-compact-page .two-column {
    gap: 10px;
  }

  .mobile-compact-page .panel {
    padding: 13px;
    border-radius: 15px;
  }

  .mobile-compact-page .section {
    margin-top: 18px;
  }

  .mobile-compact-page .section-head {
    margin-bottom: 10px;
  }

  .mobile-compact-page .section-head h2 {
    font-size: 16px;
  }

  .mobile-compact-page .section-head p {
    margin-top: 3px;
    font-size: 9px;
  }

  .mobile-compact-page .button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
  }

  .mobile-compact-page .button-small {
    min-height: 33px;
    padding: 0 10px;
    font-size: 10px;
  }

  .mobile-compact-page .form-grid {
    gap: 9px;
  }

  .mobile-compact-page .field {
    gap: 5px;
  }

  .mobile-compact-page .field label {
    font-size: 10px;
  }

  .mobile-compact-page .field input,
  .mobile-compact-page .field textarea,
  .mobile-compact-page .field select {
    min-height: 39px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 16px;
  }

  .mobile-compact-page .field small {
    font-size: 8px;
  }

  .deposit-page .channel-card {
    padding: 9px;
    border-radius: 11px;
    gap: 9px;
  }

  .deposit-page .channel-card img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .deposit-page .channel-card strong {
    font-size: 11px;
  }

  .deposit-page .channel-card span {
    font-size: 8px;
  }

  .deposit-page .qr-preview {
    min-height: 190px;
    padding: 11px;
    border-radius: 13px;
  }

  .deposit-page .qr-preview img {
    width: min(160px, 100%);
    border-radius: 11px;
  }

  .deposit-page .qr-preview p {
    margin-top: 8px;
    font-size: 9px;
  }

  .withdraw-page .quick-stats {
    gap: 7px;
  }

  .withdraw-page .quick-stat {
    padding: 10px;
    border-radius: 11px;
  }

  .withdraw-page .quick-stat strong {
    margin-bottom: 2px;
    font-size: 12px;
  }

  .withdraw-page .quick-stat span {
    font-size: 8px;
    line-height: 1.4;
  }

  .withdraw-page .identity-gate {
    min-height: 120px;
    padding: 14px;
  }

  .withdraw-page .identity-gate h3 {
    margin-top: 9px;
    font-size: 15px;
  }

  .withdraw-page .identity-gate .button {
    margin-top: 12px;
  }

  .account-page .account-profile-head {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 16px;
    gap: 10px;
  }

  .account-page .account-profile-avatar {
    width: 54px;
    height: 54px;
    border-width: 2px;
    border-radius: 15px;
  }

  .account-page .account-profile-copy h1 {
    margin: 2px 0;
    font-size: 20px;
  }

  .account-page .account-profile-copy p,
  .account-page .account-profile-copy > span {
    font-size: 8px;
  }

  .account-page .balance-card {
    min-height: 122px;
    padding: 17px;
    border-radius: 18px;
  }

  .account-page .balance-card small {
    font-size: 10px;
  }

  .account-page .balance-card .balance-value {
    margin: 6px 0 13px;
  }

  .account-page .balance-card .balance-value span {
    font-size: 14px;
  }

  .account-page .balance-card .balance-value strong {
    font-size: 32px;
  }

  .account-page .balance-actions {
    gap: 7px;
  }

  .account-page .quick-stats {
    gap: 7px;
  }

  .account-page .quick-stat {
    padding: 10px;
    border-radius: 11px;
  }

  .account-page .quick-stat strong {
    font-size: 16px;
  }

  .account-page .quick-stat span {
    font-size: 8px;
  }

  .account-page .tabs {
    margin-bottom: 10px;
    gap: 16px;
  }

  .account-page .tab {
    padding: 8px 0;
    font-size: 10px;
  }

  .mobile-compact-page .order-item,
  .mobile-compact-page .tx-row {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .mobile-compact-page .order-top strong,
  .mobile-compact-page .tx-row strong {
    font-size: 11px;
  }

  .mobile-compact-page .order-meta,
  .mobile-compact-page .tx-row span {
    font-size: 8px;
  }

  .mobile-compact-page .empty {
    padding: 28px 12px;
    font-size: 10px;
  }

  .account-page .app-install-panel {
    padding: 12px;
  }

  .account-page .app-install-panel > img {
    width: 43px;
    height: 43px;
  }

  .account-page .app-install-panel strong {
    margin: 3px 0;
    font-size: 13px;
  }

  .account-page .account-logout-button {
    min-height: 40px;
  }
}

@media (display-mode: standalone) {
  .site-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .support-bubble {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .app-install-panel {
    display: none;
  }
}
