:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  --bg: #070b10;
  --surface: #101720;
  --surface-2: #151e2a;
  --surface-3: #1c2735;
  --line: #2a384a;
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #e8edf4;
  --muted: #8d9bad;
  --soft: #bdc7d5;
  --accent: #35c2a1;
  --accent-strong: #27a98b;
  --warning: #f3b55b;
  --danger: #f97373;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 18% -8%, rgba(53, 194, 161, 0.12), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(243, 181, 91, 0.09), transparent 30%),
    linear-gradient(145deg, #070b10 0%, #0b1017 48%, #080c12 100%);
  color: var(--text);
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  align-items: center;
  background: linear-gradient(135deg, #42d3b4, #24a88a);
  border: 1px solid rgba(134, 234, 213, 0.46);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(39, 169, 139, 0.18);
  color: #05120f;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
}

.icon-button {
  gap: 8px;
}

.icon-button i {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  display: inline-flex;
  font-size: 13px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

button:hover {
  background: linear-gradient(135deg, #55e0c3, #2bb695);
}

input,
select {
  background: rgba(9, 14, 21, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  min-height: auto;
  width: auto;
}

input[type="file"] {
  padding: 8px 10px;
}

input:disabled {
  color: var(--muted);
  opacity: 0.78;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  padding-right: 34px;
}

input::placeholder {
  color: #66758a;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(53, 194, 161, 0.14);
}

.packet-app-body {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 204, 102, 0.2), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(247, 56, 73, 0.24), transparent 32%),
    linear-gradient(165deg, #12080a 0%, #240b12 44%, #09080c 100%);
  color: var(--text);
}

.packet-app {
  margin: 0 auto;
  max-width: 520px;
  min-height: 100vh;
  padding: 16px;
}

.packet-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px 2px 18px;
}

.packet-brand {
  align-items: center;
  display: inline-flex;
  font-weight: 900;
  gap: 10px;
  letter-spacing: 0;
}

.packet-brand img {
  border-radius: 10px;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.packet-round {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #f8d68b;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.packet-stage,
.packet-history {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 24%),
    rgba(15, 12, 16, 0.86);
  border: 1px solid rgba(255, 213, 132, 0.14);
  border-radius: 22px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  position: relative;
}

.packet-stage {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 92px);
  padding: 34px 22px 26px;
  text-align: center;
}

.packet-stage::before {
  background: radial-gradient(circle, rgba(255, 220, 132, 0.22), transparent 60%);
  content: "";
  height: 280px;
  left: 50%;
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  width: 310px;
}

.packet-envelope {
  background:
    linear-gradient(145deg, rgba(255, 219, 132, 0.16), transparent 34%),
    linear-gradient(180deg, #f14842 0%, #b31228 68%, #7c1020 100%);
  border: 1px solid rgba(255, 232, 158, 0.42);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 34px 74px rgba(129, 15, 31, 0.46);
  height: 310px;
  max-width: 320px;
  overflow: hidden;
  position: relative;
  width: min(80vw, 320px);
}

.packet-envelope::before,
.packet-envelope::after {
  background: rgba(255, 238, 171, 0.12);
  content: "";
  height: 150%;
  position: absolute;
  top: -26%;
  transform: rotate(34deg);
  width: 70px;
}

.packet-envelope::before {
  left: -44px;
}

.packet-envelope::after {
  right: -44px;
}

.packet-envelope-top {
  background: linear-gradient(160deg, #ffcf67 0%, #f24e43 48%, #8d1422 100%);
  border-bottom: 1px solid rgba(255, 238, 171, 0.26);
  border-radius: 0 0 50% 50%;
  height: 120px;
  left: -8%;
  position: absolute;
  top: 0;
  width: 116%;
}

.packet-seal {
  align-items: center;
  background: linear-gradient(145deg, #ffe28d, #f4b83f);
  border: 5px solid rgba(130, 22, 22, 0.18);
  border-radius: 50%;
  box-shadow: 0 20px 38px rgba(95, 12, 20, 0.34);
  color: #8e151c;
  display: flex;
  font-size: 48px;
  font-weight: 950;
  height: 112px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 92px;
  transform: translateX(-50%);
  width: 112px;
}

.packet-envelope-light {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  height: 100%;
  left: -90%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  width: 80%;
}

.packet-stage:not([hidden]) .packet-envelope-light {
  animation: packetShine 2.8s ease-in-out infinite;
}

@keyframes packetShine {
  0% {
    left: -90%;
  }
  52%,
  100% {
    left: 120%;
  }
}

.packet-stage h1 {
  font-size: 28px;
  margin: 24px 0 8px;
  position: relative;
}

.packet-stage p {
  color: #f4c7c0;
  line-height: 1.6;
  margin: 0 auto 22px;
  max-width: 340px;
  position: relative;
}

.packet-claim-button {
  background: linear-gradient(135deg, #ffe79b, #f2b53e);
  border-color: rgba(255, 221, 139, 0.7);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(242, 181, 62, 0.25);
  color: #641018;
  font-size: 18px;
  min-height: 56px;
  min-width: 210px;
  position: relative;
}

.packet-claim-button:disabled,
.packet-refresh-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.packet-result {
  border-radius: 12px;
  font-weight: 800;
  margin-top: 18px;
  padding: 12px 14px;
  width: 100%;
}

.packet-result.is-success {
  background: rgba(53, 194, 161, 0.12);
  border: 1px solid rgba(53, 194, 161, 0.28);
  color: #83f4d8;
}

.packet-result.is-error {
  background: rgba(249, 115, 115, 0.12);
  border: 1px solid rgba(249, 115, 115, 0.28);
  color: #ffb0b0;
}

.packet-history {
  padding: 16px;
}

.packet-history-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.packet-history-head span,
.packet-log-item span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.packet-history-head strong {
  display: block;
  font-size: 18px;
  margin-top: 3px;
}

.packet-claim-summary {
  background:
    linear-gradient(135deg, rgba(255, 225, 142, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 225, 142, 0.18);
  border-radius: 14px;
  margin-top: 14px;
  padding: 16px;
  text-align: center;
}

.packet-claim-summary span,
.packet-claim-summary small {
  color: var(--muted);
  display: block;
}

.packet-claim-summary strong {
  color: #ffe08f;
  display: block;
  font-size: 34px;
  margin: 4px 0;
}

.packet-refresh-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--text);
  min-height: 36px;
  padding: 8px 14px;
}

.packet-log-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 0;
}

.packet-log-stats span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 8px;
  text-align: center;
}

.packet-log-list {
  display: grid;
  gap: 10px;
}

.packet-log-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
}

.packet-log-item.is-service {
  border-color: rgba(243, 181, 91, 0.22);
}

.packet-log-item > div:last-child {
  text-align: right;
}

.packet-empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

@media (max-width: 420px) {
  .packet-app {
    padding: 14px;
  }

  .packet-stage {
    padding: 26px 18px 22px;
  }

  .packet-envelope {
    height: 285px;
  }

  .packet-log-stats {
    grid-template-columns: 1fr;
  }
}

.packet-claim-screen,
.packet-history-screen {
  background:
    linear-gradient(180deg, #0778d4 0%, #0778d4 178px, #f3f7fb 178px, #f3f7fb 100%);
  color: #132236;
}

.packet-claim-screen .packet-app,
.packet-history-screen .packet-app {
  max-width: 430px;
  padding: 14px 16px 22px;
}

.packet-wallet-top {
  align-items: center;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
}

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

.packet-wallet-brand img {
  background: #ffffff;
  border-radius: 12px;
  height: 42px;
  object-fit: cover;
  padding: 2px;
  width: 42px;
}

.packet-wallet-brand strong,
.packet-wallet-brand span {
  display: block;
}

.packet-wallet-brand strong {
  font-size: 16px;
  font-weight: 900;
}

.packet-wallet-brand span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  margin-top: 2px;
}

.packet-tng-card,
.packet-record-panel {
  background: #ffffff;
  border: 1px solid rgba(4, 62, 110, 0.08);
  border-radius: 20px;
  box-shadow: 0 22px 58px rgba(4, 62, 110, 0.18);
  margin-top: 16px;
}

.packet-tng-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  padding: 34px 22px 26px;
  text-align: center;
}

.packet-redpacket {
  background:
    linear-gradient(145deg, rgba(255, 227, 139, 0.18), transparent 32%),
    linear-gradient(180deg, #fb4c42 0%, #d62032 58%, #a50d24 100%);
  border: 1px solid rgba(255, 215, 128, 0.52);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 24px 52px rgba(188, 22, 42, 0.34);
  height: 310px;
  max-width: 292px;
  overflow: hidden;
  position: relative;
  width: min(76vw, 292px);
}

.packet-redpacket::before,
.packet-redpacket::after {
  background: rgba(255, 241, 186, 0.12);
  content: "";
  height: 150%;
  position: absolute;
  top: -25%;
  transform: rotate(33deg);
  width: 68px;
}

.packet-redpacket::before {
  left: -40px;
}

.packet-redpacket::after {
  right: -40px;
}

.packet-flap {
  background: linear-gradient(160deg, #ffd66f 0%, #ff6a4d 46%, #ad1328 100%);
  border-bottom: 1px solid rgba(255, 232, 164, 0.42);
  border-radius: 0 0 50% 50%;
  height: 116px;
  left: -10%;
  position: absolute;
  top: 0;
  width: 120%;
}

.packet-gold-ring {
  align-items: center;
  background: linear-gradient(145deg, #fff0ad, #f2bd3f);
  border: 7px solid rgba(164, 25, 36, 0.2);
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(94, 10, 22, 0.32);
  color: #b11b26;
  display: flex;
  font-size: 46px;
  font-weight: 950;
  height: 114px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 94px;
  transform: translateX(-50%);
  width: 114px;
}

.packet-gloss {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  height: 100%;
  left: -90%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  width: 72%;
}

.packet-redpacket .packet-gloss {
  animation: packetShine 2.8s ease-in-out infinite;
}

.packet-tng-card h1 {
  color: #182b42;
  font-size: 24px;
  margin: 28px 0 8px;
}

.packet-tng-card p {
  color: #6a7d92;
  line-height: 1.55;
  margin: 0 0 24px;
}

.packet-open-button {
  background: #0677d8;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(6, 119, 216, 0.24);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  min-height: 52px;
  min-width: 220px;
}

.packet-open-button:hover {
  background: #006cc7;
}

.packet-open-button:disabled,
.packet-history-refresh:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.packet-claim-screen .packet-result {
  background: #fff2f2;
  border: 1px solid #ffd3d3;
  color: #b42334;
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 18px;
  text-align: center;
}

.packet-claim-screen .packet-result.is-success {
  background: #effcf5;
  border-color: #bcebd1;
  color: #0d8b57;
}

.packet-claim-screen .packet-result.is-warning {
  background: #fff8e8;
  border-color: #f5ddb0;
  color: #a66b12;
}

.packet-result-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: inline-flex;
  font-size: 22px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.packet-result-copy strong,
.packet-result-copy span {
  display: block;
}

.packet-result-copy strong {
  color: #15253a;
  font-size: 16px;
  margin-bottom: 4px;
}

.packet-result-copy span {
  color: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.packet-result-action {
  background: #ffffff;
  border: 1px solid rgba(8, 62, 118, 0.1);
  border-radius: 999px;
  color: #0677d8;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 14px;
  text-decoration: none;
}

.packet-history-refresh {
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  box-shadow: none;
  color: #ffffff;
  font-size: 13px;
  min-height: 34px;
  padding: 7px 14px;
}

.packet-record-panel {
  overflow: hidden;
  padding: 0;
}

.packet-record-summary {
  background:
    linear-gradient(135deg, rgba(6, 119, 216, 0.1), transparent 44%),
    #ffffff;
  border-bottom: 1px solid #e7edf4;
  padding: 20px 18px;
  text-align: center;
}

.packet-record-summary span,
.packet-record-summary small {
  color: #6a7d92;
  display: block;
  font-size: 13px;
}

.packet-record-summary strong {
  color: #0677d8;
  display: block;
  font-size: 28px;
  margin: 6px 0;
}

.packet-record-list {
  display: grid;
}

.packet-record-item {
  align-items: center;
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 14px 16px;
}

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

.packet-record-rank {
  align-items: center;
  background: #eef6ff;
  border-radius: 50%;
  color: #0677d8;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.packet-record-main,
.packet-record-amount {
  min-width: 0;
}

.packet-record-main strong,
.packet-record-amount strong {
  color: #15253a;
  display: block;
  font-size: 14px;
}

.packet-record-main span,
.packet-record-amount span {
  color: #7d8fa3;
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.packet-record-amount {
  text-align: right;
}

.packet-record-item.is-service .packet-record-rank {
  background: #fff7e8;
  color: #d48a00;
}

.packet-history-screen .packet-empty {
  border: 0;
  color: #7d8fa3;
  padding: 26px;
}

.packet-record-screen {
  background:
    linear-gradient(180deg, #0778d4 0%, #0778d4 178px, #f3f7fb 178px, #f3f7fb 100%);
  color: #132236;
}

.packet-record-screen .packet-app {
  max-width: 520px;
  padding: 14px 16px 22px;
}

.packet-history-refresh {
  text-decoration: none;
}

.packet-dealer-card {
  background:
    linear-gradient(135deg, rgba(255, 226, 148, 0.22), transparent 42%),
    #ffffff;
  border: 1px solid rgba(4, 62, 110, 0.08);
  border-radius: 20px;
  box-shadow: 0 22px 58px rgba(4, 62, 110, 0.18);
  margin-top: 16px;
  overflow: hidden;
  padding: 18px;
}

.packet-dealer-card.win {
  border-color: rgba(43, 171, 113, 0.28);
}

.packet-dealer-card.lose {
  border-color: rgba(231, 76, 60, 0.28);
}

.packet-record-section-title,
.packet-record-list-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.packet-record-section-title span,
.packet-record-list-head span,
.packet-record-grid span,
.packet-balance-flow span {
  color: #72849a;
  display: block;
  font-size: 12px;
}

.packet-record-section-title strong {
  color: #15253a;
  font-size: 20px;
}

.packet-tail-badge {
  align-items: center;
  background: linear-gradient(135deg, #fff2b8, #f2b43e);
  border: 1px solid rgba(172, 91, 12, 0.18);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(173, 91, 12, 0.16);
  color: #8f310e;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  gap: 5px;
  line-height: 1;
  margin-left: 8px;
  padding: 6px 9px;
  vertical-align: middle;
  white-space: nowrap;
}

.packet-tail-badge.tail_second {
  background: linear-gradient(135deg, #e9f5ff, #b9ddff);
  border-color: rgba(11, 112, 197, 0.16);
  box-shadow: 0 8px 18px rgba(11, 112, 197, 0.13);
  color: #0863ad;
}

.packet-tail-badge.inline {
  font-size: 10px;
  margin-left: 6px;
  padding: 5px 7px;
}

.packet-tail-legend {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dcecff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(4, 62, 110, 0.1);
  color: #53677e;
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
}

.packet-tail-legend > i {
  align-items: center;
  background: #eef6ff;
  border-radius: 50%;
  color: #0677d8;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.packet-tail-legend strong,
.packet-tail-legend span {
  display: block;
}

.packet-tail-legend strong {
  color: #15253a;
  font-size: 13px;
}

.packet-tail-legend span {
  color: #72849a;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

.packet-record-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin: 16px 0;
}

.packet-record-grid > div {
  background: #f5f8fb;
  border: 1px solid #e7edf4;
  border-radius: 14px;
  padding: 12px;
}

.packet-record-grid strong {
  color: #15253a;
  display: block;
  font-size: 15px;
  margin-top: 5px;
}

.record-points.win,
.record-net.win {
  color: #16a064 !important;
}

.record-points.lose,
.record-net.lose {
  color: #d94141 !important;
}

.record-points.tie,
.record-net.tie,
.record-points.refund,
.record-net.refund {
  color: #60758d !important;
}

.record-points.bonus,
.record-net.bonus {
  color: #0b80de !important;
}

.packet-balance-flow {
  background: #eef6ff;
  border: 1px solid #dcecff;
  border-radius: 14px;
  padding: 12px;
}

.packet-balance-flow strong {
  color: #0677d8;
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.packet-record-list-head {
  border-bottom: 1px solid #edf2f7;
  padding: 16px;
}

.packet-record-list-head strong {
  color: #15253a;
}

.packet-player-record-list {
  display: grid;
}

.packet-player-record {
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 12px;
  padding: 15px 16px;
}

.packet-player-record:last-child {
  border-bottom: 0;
}

.packet-player-record.win {
  background: linear-gradient(90deg, rgba(43, 171, 113, 0.08), transparent 40%);
}

.packet-player-record.lose {
  background: linear-gradient(90deg, rgba(231, 76, 60, 0.08), transparent 40%);
}

.packet-player-main,
.packet-player-score {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.packet-player-main strong,
.packet-player-score strong {
  color: #15253a;
  font-size: 15px;
}

.packet-player-main span,
.packet-player-score span {
  color: #7d8fa3;
  font-size: 12px;
  text-align: right;
}

@media (max-width: 420px) {
  .packet-record-screen .packet-app {
    padding: 12px;
  }

  .packet-record-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .packet-claim-screen .packet-app,
  .packet-history-screen .packet-app {
    padding: 12px;
  }

  .packet-redpacket {
    height: 286px;
  }

  .packet-tng-card {
    padding: 28px 18px 22px;
  }
}

.packet-claim-screen,
.packet-history-screen,
.packet-record-screen {
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 232, 162, 0.28), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(24, 129, 218, 0.26), transparent 34%),
    linear-gradient(180deg, #073d79 0%, #0c64b3 132px, #eef4f9 132px, #eef4f9 100%);
  color: #142238;
  min-height: 100vh;
}

.packet-claim-screen .packet-app,
.packet-history-screen .packet-app,
.packet-record-screen .packet-app {
  max-width: 480px;
  padding: 16px 16px 24px;
}

.packet-wallet-top {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(4, 38, 76, 0.18);
  backdrop-filter: blur(18px);
  min-height: 66px;
  padding: 10px 12px;
}

.packet-wallet-brand img {
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  height: 46px;
  width: 46px;
}

.packet-wallet-brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.packet-wallet-brand span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.packet-status-chip,
.packet-history-refresh {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
  padding: 8px 13px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.packet-status-chip i,
.packet-history-refresh i,
.packet-open-button i,
.packet-mini-meta i,
.packet-panel-kicker i,
.packet-record-grid span i,
.packet-balance-flow span i,
.packet-record-list-head i,
.packet-player-main i,
.packet-player-score i,
.packet-record-main span i,
.packet-record-amount span i {
  margin-right: 6px;
}

.packet-tng-card,
.packet-record-panel,
.packet-dealer-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    #fff;
  border: 1px solid rgba(8, 62, 118, 0.08);
  border-radius: 26px;
  box-shadow:
    0 24px 68px rgba(6, 61, 115, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  overflow: hidden;
  position: relative;
}

.packet-tng-card {
  margin-top: 18px;
  min-height: calc(100vh - 126px);
  padding: 32px 22px 26px;
}

.packet-player-identity {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 251, 255, 0.88)),
    #ffffff;
  border: 1px solid rgba(8, 62, 118, 0.08);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(6, 61, 115, 0.16);
  color: #132238;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  margin-top: 14px;
  padding: 13px 14px;
}

.packet-identity-icon {
  align-items: center;
  background: linear-gradient(145deg, #0d87e9, #075eb8);
  border-radius: 15px;
  box-shadow: 0 12px 24px rgba(6, 119, 216, 0.25);
  color: #ffffff;
  display: inline-flex;
  font-size: 18px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.packet-identity-copy,
.packet-identity-balance {
  min-width: 0;
}

.packet-identity-copy span,
.packet-identity-balance span {
  color: #6c8198;
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 4px;
}

.packet-identity-copy strong,
.packet-identity-balance strong {
  color: #132238;
  display: block;
  font-size: 15px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.packet-identity-copy small {
  color: #7c91a8;
  display: block;
  font-size: 11px;
  font-weight: 750;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.packet-identity-balance {
  background: #eef7ff;
  border: 1px solid #dcecff;
  border-radius: 15px;
  padding: 9px 11px;
  text-align: right;
}

.packet-identity-balance strong {
  color: #0677d8;
}

.packet-player-identity.is-loading .packet-identity-icon {
  background: linear-gradient(145deg, #a8bbce, #758ba1);
}

.packet-player-identity.is-warning .packet-identity-icon {
  background: linear-gradient(145deg, #f4bd47, #c57a12);
}

.packet-player-identity.is-error .packet-identity-icon {
  background: linear-gradient(145deg, #f26d6d, #c82f45);
}

.packet-tng-card::before,
.packet-record-panel::before,
.packet-dealer-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  content: "";
  height: 1px;
  left: 22px;
  position: absolute;
  right: 22px;
  top: 0;
}

.packet-card-ornament {
  background:
    linear-gradient(135deg, rgba(255, 219, 137, 0.72), rgba(255, 255, 255, 0)),
    rgba(255, 244, 211, 0.88);
  border-radius: 0 0 50% 50%;
  height: 96px;
  left: -15%;
  position: absolute;
  top: 0;
  width: 130%;
}

.packet-redpacket {
  border-radius: 30px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -18px 40px rgba(93, 0, 18, 0.18),
    0 30px 58px rgba(190, 18, 42, 0.34);
  height: 306px;
  margin-top: 18px;
  width: min(72vw, 286px);
}

.packet-redpacket::before,
.packet-redpacket::after {
  background: linear-gradient(180deg, rgba(255, 245, 190, 0.22), transparent);
}

.packet-gold-ring {
  background:
    radial-gradient(circle at 38% 28%, #fff8cb, #f3c043 60%, #d49221);
  color: #a91824;
  font-size: 44px;
  height: 116px;
  outline: 1px solid rgba(255, 255, 255, 0.42);
  width: 116px;
}

.packet-tng-card h1 {
  color: #132238;
  font-size: 25px;
  margin-top: 26px;
}

.packet-tng-card p {
  color: #667a91;
  font-weight: 650;
  margin-bottom: 16px;
}

.packet-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 22px;
}

.packet-mini-meta span {
  background: #f2f7fc;
  border: 1px solid #e1ebf5;
  border-radius: 999px;
  color: #55708c;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.packet-open-button {
  background: linear-gradient(135deg, #0b84e9, #065fb8);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 38px rgba(6, 119, 216, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  width: min(100%, 260px);
}

.packet-open-button:hover {
  background: linear-gradient(135deg, #138fed, #066bc8);
  box-shadow: 0 22px 44px rgba(6, 119, 216, 0.34);
  transform: translateY(-1px);
}

.packet-open-button:active,
.packet-history-refresh:active {
  transform: translateY(1px);
}

.packet-history-refresh:hover {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 26px rgba(4, 38, 76, 0.12);
}

.packet-panel-kicker {
  align-items: center;
  color: #b17d23;
  display: flex;
  font-size: 12px;
  font-weight: 950;
  gap: 7px;
  letter-spacing: 0.08em;
  padding: 16px 18px 0;
  text-transform: uppercase;
}

.packet-record-summary {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 151, 0.42), transparent 56%),
    linear-gradient(180deg, #ffffff, #f8fbff);
  border-bottom: 1px solid #e8eef5;
  padding: 18px;
  position: relative;
}

.packet-record-summary span {
  background: #edf6ff;
  border-radius: 999px;
  color: #0b78d0;
  display: inline-flex;
  font-weight: 950;
  padding: 7px 12px;
}

.packet-record-summary strong {
  color: #132238;
  font-size: 30px;
}

.packet-record-summary small {
  color: #687d93;
  font-weight: 750;
}

.packet-record-item {
  background: #fff;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 15px 16px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.packet-record-item:hover {
  background: #f8fbff;
}

.packet-record-rank {
  background: linear-gradient(145deg, #eef7ff, #dceeff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  gap: 3px;
  height: 32px;
  width: 38px;
}

.packet-record-main strong,
.packet-record-amount strong {
  font-size: 15px;
}

.packet-dealer-card {
  margin-top: 18px;
  padding: 0 18px 18px;
}

.packet-record-section-title {
  padding-top: 12px;
}

.packet-record-section-title strong {
  font-size: 22px;
}

.packet-record-grid > div,
.packet-balance-flow {
  background: linear-gradient(180deg, #f8fbff, #f1f6fb);
  border-color: #e3edf6;
}

.packet-balance-flow strong {
  color: #0a6fc5;
  font-size: 15px;
}

.packet-record-list-head {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 17px 18px;
}

.packet-player-record {
  background: #fff;
  gap: 13px;
  transition: background 0.18s ease;
}

.packet-player-record.win {
  background:
    linear-gradient(90deg, rgba(38, 178, 111, 0.11), transparent 48%),
    #fff;
}

.packet-player-record.lose {
  background:
    linear-gradient(90deg, rgba(224, 65, 65, 0.11), transparent 48%),
    #fff;
}

.packet-player-main strong,
.packet-player-score strong {
  font-size: 16px;
}

.record-points.win,
.record-net.win {
  color: #10a765 !important;
}

.record-points.lose,
.record-net.lose {
  color: #db3d3d !important;
}

@media (max-width: 420px) {
  .packet-wallet-top {
    border-radius: 16px;
  }

  .packet-tng-card,
  .packet-record-panel,
  .packet-dealer-card {
    border-radius: 22px;
  }

  .packet-redpacket {
    height: 284px;
  }

  .packet-player-identity {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .packet-identity-balance {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.auth-body {
  background:
    radial-gradient(circle at 12% 18%, rgba(53, 194, 161, 0.16), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(243, 181, 91, 0.1), transparent 24%),
    linear-gradient(145deg, #080c11 0%, #101721 52%, #0b1017 100%);
}

.auth-page {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 28px;
}

.auth-shell {
  background: rgba(11, 16, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.52);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1.08fr) 430px;
  margin: 0 auto;
  max-width: 1120px;
  overflow: hidden;
  width: 100%;
}

.auth-hero {
  background:
    linear-gradient(135deg, rgba(243, 181, 91, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(53, 194, 161, 0.1), rgba(13, 19, 27, 0.84) 46%, rgba(10, 15, 22, 0.96));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 40px;
  grid-template-rows: auto 1fr auto;
  min-height: 640px;
  padding: 34px;
}

.auth-hero-copy {
  align-self: center;
}

.auth-hero-copy h1 {
  font-size: 56px;
  line-height: 1.02;
  margin: 0 0 20px;
  max-width: 640px;
}

.auth-hero-copy p:last-child {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  max-width: 560px;
}

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

.auth-feature-grid article {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 16px;
}

.auth-feature-grid i {
  color: var(--accent);
  font-size: 17px;
  margin-bottom: 3px;
}

.auth-feature-grid strong {
  color: var(--text);
  font-size: 14px;
}

.auth-feature-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-topline,
.topbar-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.brand span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: #06120f;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-logo {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(243, 181, 91, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  overflow: hidden;
  padding: 5px;
  width: 36px;
}

.brand-logo img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.auth-brand .brand-mark,
.auth-brand .brand-logo {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
}

.auth-brand strong {
  font-size: 18px;
}

.role-pill {
  align-items: center;
  background: rgba(53, 194, 161, 0.1);
  border: 1px solid rgba(53, 194, 161, 0.22);
  border-radius: 999px;
  color: #86ead5;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  padding: 8px 12px;
}

.login-card {
  align-self: stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 140px),
    rgba(13, 19, 27, 0.96);
  display: grid;
  align-content: center;
  padding: 36px;
}

.login-card-header {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 48px minmax(0, 1fr);
  margin-bottom: 22px;
}

.login-icon {
  align-items: center;
  background: rgba(243, 181, 91, 0.12);
  border: 1px solid rgba(243, 181, 91, 0.28);
  border-radius: 10px;
  color: #ffd18d;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.login-card-header p:last-child {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.panel-header h2,
.login-card h2,
.page-header h1 {
  font-size: 30px;
  line-height: 1.16;
  margin: 0 0 10px;
}

.eyebrow {
  color: var(--warning);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.welcome-line {
  color: var(--soft);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.role-switcher {
  background: rgba(7, 11, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 6px;
}

.role-switcher a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 800;
  justify-items: center;
  min-height: 68px;
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
}

.role-switcher a.active {
  background: linear-gradient(135deg, rgba(53, 194, 161, 0.14), rgba(243, 181, 91, 0.08));
  border-color: rgba(53, 194, 161, 0.32);
  color: var(--text);
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack label {
  color: var(--soft);
  display: grid;
  font-size: 14px;
  gap: 8px;
}

.form-stack label > span {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.form-stack label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.check-row {
  align-items: center;
  background: rgba(13, 20, 29, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: flex !important;
  gap: 10px;
  padding: 11px 12px;
}

.check-row span {
  color: var(--soft);
  font-weight: 800;
}

.input-shell {
  align-items: center;
  background: #0b1118;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 48px;
}

.input-shell i {
  color: var(--muted);
  text-align: center;
}

.input-shell input {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 46px;
  padding-left: 0;
}

.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(53, 194, 161, 0.14);
}

.login-submit {
  border-radius: 8px;
  min-height: 48px;
  width: 100%;
}

.error {
  background: rgba(249, 115, 115, 0.1);
  border: 1px solid rgba(249, 115, 115, 0.28);
  border-radius: 6px;
  color: #ff9a9a;
  margin: 0;
  padding: 10px 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 170px),
    rgba(8, 12, 18, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-nav {
  display: grid;
  gap: 5px;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-section {
  color: #66758a;
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 12px 10px 4px;
  text-transform: uppercase;
}

.side-nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--soft);
  display: grid;
  gap: 9px;
  grid-template-columns: 28px minmax(0, 1fr);
  font-weight: 800;
  min-height: 42px;
  padding: 7px 9px;
  text-decoration: none;
}

.side-nav i {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 7px;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.side-nav span:not(.nav-section) {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav a.active,
.side-nav a:hover {
  background: linear-gradient(135deg, rgba(53, 194, 161, 0.11), rgba(243, 181, 91, 0.055));
  border-color: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.side-nav a.active i,
.side-nav a:hover i {
  background: rgba(53, 194, 161, 0.12);
  color: var(--accent);
}

.sidebar-footer {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 11px;
}

.session-user {
  color: var(--muted);
  font-size: 13px;
}

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

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 16, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-kicker {
  color: #ffd18d;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.085);
  color: var(--soft);
}

.ghost-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 8px;
  color: var(--soft);
  display: inline-flex;
  font-weight: 800;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

.language-toggle {
  align-items: center;
  background: linear-gradient(135deg, rgba(53, 194, 161, 0.13), rgba(243, 181, 91, 0.08));
  border: 1px solid rgba(53, 194, 161, 0.28);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 900;
  gap: 9px;
  justify-content: center;
  min-height: 42px;
  min-width: 132px;
  padding: 9px 13px;
  text-decoration: none;
}

.language-toggle span {
  display: inline-block;
  min-width: 56px;
  text-align: center;
}

.language-toggle i {
  color: #86ead5;
  font-size: 14px;
}

.language-toggle .switch-icon {
  color: var(--warning);
  font-size: 12px;
  transition: transform 180ms ease;
}

.language-toggle:hover {
  background: rgba(53, 194, 161, 0.18);
  border-color: rgba(53, 194, 161, 0.46);
}

.language-toggle:hover .switch-icon {
  transform: rotate(180deg);
}

.ghost-button:hover,
.ghost-link:hover {
  background: rgba(53, 194, 161, 0.09);
  border-color: rgba(53, 194, 161, 0.2);
}

.page {
  padding: 32px;
}

.page-header {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(243, 181, 91, 0.09), transparent 36%),
    linear-gradient(145deg, rgba(53, 194, 161, 0.075), rgba(13, 19, 27, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  background: linear-gradient(90deg, rgba(243, 181, 91, 0.62), rgba(53, 194, 161, 0.42), transparent);
  content: "";
  height: 1px;
  inset: 0 0 auto;
  position: absolute;
}

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

.stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(13, 19, 27, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  padding: 18px;
  position: relative;
}

.stat-card::after {
  background: rgba(243, 181, 91, 0.55);
  border-radius: 999px;
  content: "";
  height: 3px;
  inset: auto 18px 13px;
  opacity: 0.58;
  position: absolute;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
}

.stat-card small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
}

.agent-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 16px;
}

.agent-withdraw-form {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
}

.agent-withdrawal-layout {
  display: grid;
  gap: 16px;
}

.agent-payout-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px;
}

.agent-payout-form .form-wide {
  grid-column: 1 / -1;
}

.content-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 120px),
    rgba(13, 19, 27, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  margin-bottom: 16px;
  overflow: hidden;
}

.notice {
  border-radius: 10px;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice.success {
  background: rgba(53, 194, 161, 0.1);
  border: 1px solid rgba(53, 194, 161, 0.25);
  color: #8af0db;
}

.notice.danger {
  background: rgba(249, 115, 115, 0.1);
  border: 1px solid rgba(249, 115, 115, 0.28);
  color: #ff9a9a;
}

.panel-toolbar {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.panel-toolbar h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.panel-toolbar p {
  color: var(--muted);
  margin: 0;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-form {
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.filter-form input {
  min-width: 150px;
}

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-nav a {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 8px;
  color: var(--soft);
  display: inline-flex;
  gap: 8px;
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

.tab-nav a.active,
.tab-nav a:hover {
  background: rgba(53, 194, 161, 0.1);
  border-color: rgba(53, 194, 161, 0.22);
  color: var(--text);
}

.search-form input {
  min-width: 270px;
}

.balance-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}

.tool-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

.compact-form {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.compact-form h3 {
  margin: 0;
}

.compact-form label {
  color: var(--soft);
  display: grid;
  font-size: 14px;
  gap: 8px;
}

.review-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  min-width: 440px;
}

.review-form button {
  min-height: 42px;
  white-space: nowrap;
}

.deposit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
}

.balance-form label {
  color: var(--soft);
  display: grid;
  font-size: 14px;
  gap: 8px;
}

.balance-form button {
  align-self: end;
}

.table-wrap {
  overflow-x: auto;
}

.table-link {
  align-items: center;
  color: #86ead5;
  display: inline-flex;
  gap: 6px;
  font-weight: 800;
  text-decoration: none;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.pagination a,
.pagination span {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft);
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

table {
  border-collapse: separate;
  border-spacing: 0 7px;
  min-width: 920px;
  width: 100%;
}

.compact-table {
  min-width: 560px;
}

th,
td {
  border-bottom: 0;
  padding: 14px 18px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.026);
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 8px 0 0 8px;
}

td:last-child {
  border-radius: 0 8px 8px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
}

tbody tr:hover {
  background: rgba(53, 194, 161, 0.055);
}

tbody tr:hover td {
  background: rgba(53, 194, 161, 0.06);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.balance {
  background: rgba(243, 181, 91, 0.11);
  border: 1px solid rgba(243, 181, 91, 0.24);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #ffd18d;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 54px;
  padding: 5px 10px;
}

.empty {
  color: var(--muted);
  padding: 44px 18px;
  text-align: center;
}

.toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auto-refresh-pill {
  align-items: center;
  background: linear-gradient(135deg, rgba(83, 211, 194, 0.16), rgba(243, 181, 91, 0.12));
  border: 1px solid rgba(83, 211, 194, 0.25);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.auto-refresh-pill i {
  color: #53d3c2;
}

.auto-refresh-pill strong {
  color: #ffd18d;
  min-width: 10px;
  text-align: center;
}

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

.detail-grid > div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
}

.detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-grid strong {
  color: var(--text);
}

.game-hero {
  background:
    linear-gradient(135deg, rgba(243, 181, 91, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(53, 194, 161, 0.1), rgba(13, 19, 27, 0.78) 46%, rgba(10, 15, 22, 0.94));
  border: 1px solid rgba(243, 181, 91, 0.16);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  margin-bottom: 22px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.game-hero::before {
  background: linear-gradient(90deg, rgba(243, 181, 91, 0.72), rgba(53, 194, 161, 0.5), transparent);
  content: "";
  height: 1px;
  inset: 0 0 auto;
  position: absolute;
}

.game-hero .eyebrow {
  color: #ffd18d;
}

.game-hero h1 {
  letter-spacing: 0;
}

.game-hero .toolbar-actions .ghost-link,
.game-hero > .ghost-link {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-metrics {
  gap: 14px;
}

.game-metric {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    #101720;
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  min-height: 118px;
  position: relative;
}

.game-metric > i {
  align-items: center;
  background: rgba(243, 181, 91, 0.12);
  border: 1px solid rgba(243, 181, 91, 0.22);
  border-radius: 8px;
  color: #ffd18d;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  margin-bottom: 12px;
  width: 34px;
}

.game-metric::after {
  background: rgba(243, 181, 91, 0.72);
  border-radius: 999px;
  content: "";
  height: 3px;
  inset: auto 18px 14px;
  opacity: 0.65;
  position: absolute;
}

.game-metric span {
  color: #aab5c4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-metric strong {
  color: #f7fbff;
  font-size: 28px;
}

.status-pill {
  align-items: center;
  background: rgba(53, 194, 161, 0.13);
  border: 1px solid rgba(53, 194, 161, 0.34);
  border-radius: 999px;
  color: #8ff0d8;
  display: inline-flex;
  font-size: 16px;
  font-style: normal;
  min-height: 34px;
  padding: 5px 12px;
}

.game-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 110px),
    rgba(13, 19, 27, 0.84);
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.game-panel .panel-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  margin: -4px -4px 16px;
  padding: 4px 4px 16px;
}

.game-panel table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.game-panel thead th {
  background: transparent;
  border-bottom: 0;
  color: #9aa9ba;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-panel tbody tr {
  background: rgba(255, 255, 255, 0.035);
}

.game-panel tbody td {
  border-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.game-panel tbody td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px 0 0 8px;
}

.game-panel tbody td:last-child {
  border-radius: 0 8px 8px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.game-panel .detail-grid > div {
  background:
    linear-gradient(180deg, rgba(53, 194, 161, 0.08), transparent),
    rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
}

.round-timeline {
  display: grid;
  gap: 0;
  padding: 10px 18px 20px;
}

.round-timeline-item {
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 8px 0 8px;
  position: relative;
}

.round-timeline-item::before {
  background: rgba(255, 255, 255, 0.08);
  content: "";
  inset: 42px auto -8px 16px;
  position: absolute;
  width: 1px;
}

.round-timeline-item:last-child::before {
  display: none;
}

.round-timeline-icon {
  align-items: center;
  background: rgba(53, 194, 161, 0.12);
  border: 1px solid rgba(53, 194, 161, 0.24);
  border-radius: 50%;
  color: #8ff0d8;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.round-timeline-item.bet .round-timeline-icon {
  background: rgba(243, 181, 91, 0.12);
  border-color: rgba(243, 181, 91, 0.25);
  color: #ffd18d;
}

.round-timeline-item.claim .round-timeline-icon {
  background: rgba(11, 128, 222, 0.13);
  border-color: rgba(11, 128, 222, 0.24);
  color: #8ccfff;
}

.round-timeline-item.wallet .round-timeline-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #c9d5e3;
}

.round-timeline-item.settlement .round-timeline-icon {
  background: rgba(53, 194, 161, 0.18);
  border-color: rgba(53, 194, 161, 0.34);
}

.round-timeline-copy {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  min-width: 0;
  padding: 10px 12px;
}

.round-timeline-copy span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.round-timeline-copy strong {
  color: var(--text);
  display: block;
  font-size: 14px;
}

.round-timeline-copy p {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.game-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.72fr);
}

.game-command-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.game-command-card {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(12, 18, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  min-height: 86px;
  padding: 15px;
}

.game-command-card > i {
  align-items: center;
  background: rgba(53, 194, 161, 0.12);
  border: 1px solid rgba(53, 194, 161, 0.22);
  border-radius: 8px;
  color: #8ff0d8;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.game-command-card strong {
  color: #f7fbff;
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  margin-bottom: 4px;
}

.game-command-card span {
  color: var(--muted);
  font-size: 12px;
}

.game-primary-panel,
.game-side-panel {
  min-height: 100%;
}

.luxury-detail-grid > div {
  min-height: 112px;
  position: relative;
}

.luxury-detail-grid > div > i {
  color: #ffd18d;
  font-size: 16px;
  position: absolute;
  right: 14px;
  top: 14px;
}

.quick-link-list {
  display: grid;
  gap: 10px;
}

.quick-link-list a {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 10px 12px;
  text-decoration: none;
}

.quick-link-list a:hover {
  background: rgba(53, 194, 161, 0.08);
  border-color: rgba(53, 194, 161, 0.18);
}

.quick-link-list i {
  align-items: center;
  background: rgba(243, 181, 91, 0.1);
  border-radius: 7px;
  color: #ffd18d;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.quick-link-list strong {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .auth-hero-copy h1 {
    font-size: 40px;
  }

  .login-card {
    padding: 28px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    gap: 16px;
    position: static;
  }

  .side-nav {
    display: grid;
    gap: 8px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .game-layout,
  .game-command-grid {
    grid-template-columns: 1fr;
  }

  .side-nav a {
    min-height: 48px;
  }

  .sidebar-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
  }

  .panel-toolbar,
  .page-header {
    align-items: stretch;
    display: grid;
  }

  .search-form {
    justify-content: stretch;
  }

  .search-form input,
  .search-form select,
  .search-form button {
    width: 100%;
  }

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

  .agent-dashboard-grid,
  .agent-stats,
  .agent-payout-form,
  .agent-withdrawal-layout {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .review-form {
    grid-template-columns: 1fr;
    min-width: 260px;
  }
}

@media (max-width: 640px) {
  .auth-page,
  .page {
    padding: 18px;
  }

  .auth-hero {
    padding: 22px;
  }

  .auth-hero-copy h1 {
    font-size: 32px;
  }

  .auth-feature-grid,
  .role-switcher {
    grid-template-columns: 1fr;
  }

  .auth-topline,
  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .topbar {
    gap: 12px;
    height: auto;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .topbar-actions,
  .topbar-actions form,
  .topbar-actions button,
  .language-toggle {
    width: 100%;
  }

.stats-grid {
  grid-template-columns: 1fr;
}

  .topbar {
    padding: 0 18px;
  }
}
