* { box-sizing: border-box; }
body:not(.tw-landing) {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 210, 138, 0.15), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(0, 153, 255, 0.08), transparent 30%),
    #090d0f;
  color: #ecf1f2;
}
body.tw-landing {
  margin: 0;
}

:root{
  --brand: #00d28a;
}
.topbar {
  padding: 10px 20px;
  border-bottom: 1px solid #1b2b2f;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(8, 12, 14, 0.92), rgba(8, 12, 14, 0.7));
  backdrop-filter: blur(10px);
}
.topbar-shell {
  max-width: 1260px;
  margin: 0 auto;
  border-radius: 14px;
  background: rgba(12, 18, 20, 0.72);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { font-weight: 800; color: #fff; text-decoration: none; font-size: 24px; }
.brand span { color: #00d28a; }
.brand--logo { font-size: 0; line-height: 0; }
.brand .topbar-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(280px, 52vw);
  object-fit: contain;
}
@media (min-width: 781px) {
  .brand .topbar-logo {
    height: 54px;
    max-width: min(400px, 32vw);
  }
}
.main-nav, .auth-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.main-nav {
  flex: 1;
  justify-content: center;
}
.main-nav a, .auth-nav a {
  color: #b6c9cf;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .2s ease, background .2s ease;
}
.main-nav a:hover, .auth-nav a:hover {
  color: #ffffff;
  background: #132127;
}
.auth-nav {
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.topbar-wallet {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 9px;
  background: rgba(0, 210, 138, 0.08);
  border: 1px solid rgba(0, 210, 138, 0.22);
  color: #c8dde3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: 100%;
}
.topbar-wallet .topbar-icon-money {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: block;
  color: #00d28a;
  opacity: 0.95;
}
.topbar-balance {
  color: #ecf1f2;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.btn-topbar-deposit {
  flex-shrink: 0;
  margin: 0;
  padding: 5px 10px !important;
  width: auto !important;
  max-width: none !important;
  border-radius: 999px !important;
  border: none !important;
  background: #00d28a !important;
  color: #04110c !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(0, 210, 138, 0.18) !important;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn-topbar-deposit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 6px 16px rgba(0, 210, 138, 0.26) !important;
}
.topbar-logout {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 9px;
  color: #94aab1 !important;
}
.topbar-logout:hover {
  color: #fff !important;
  background: #132127;
}

.deposit-modal {
  border: none;
  padding: 0;
  max-width: calc(100vw - 28px);
  width: min(440px, 100%);
  background: transparent;
  color: inherit;
}
.deposit-modal::backdrop {
  background: rgba(2, 6, 10, 0.82);
  backdrop-filter: blur(10px);
}
.deposit-modal-inner {
  position: relative;
  margin: 0;
  padding: 22px 22px 20px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(18, 28, 32, 0.97) 0%, rgba(8, 12, 14, 0.98) 55%, rgba(10, 16, 18, 0.99) 100%);
  border: 1px solid rgba(0, 210, 138, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 56px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(0, 210, 138, 0.06);
}
.deposit-modal-accent {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), rgba(56, 189, 248, 0.65), transparent);
  opacity: 0.95;
}
.deposit-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.deposit-modal-head-text {
  min-width: 0;
}
.deposit-modal-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 210, 138, 0.85);
}
.deposit-modal-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
}
.deposit-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #a8bdc4;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.deposit-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}
.deposit-modal-close:active {
  transform: scale(0.96);
}
.deposit-modal-hint {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: #8ea4ab;
}
.deposit-modal-hint strong {
  color: #c5d8de;
  font-weight: 700;
}
.deposit-section-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #7d939b;
  letter-spacing: 0.02em;
}
.deposit-amount-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}
.deposit-amt-btn {
  margin: 0 !important;
  width: 100%;
  padding: 12px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 210, 138, 0.35) !important;
  background: linear-gradient(180deg, rgba(0, 210, 138, 0.14), rgba(0, 210, 138, 0.06)) !important;
  color: #e8f7f2 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease !important;
}
.deposit-amt-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #00e399, #00d28a) !important;
  border-color: transparent !important;
  color: #04110c !important;
  box-shadow: 0 10px 28px rgba(0, 210, 138, 0.35) !important;
  filter: none !important;
}
.deposit-amt-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 210, 138, 0.35),
    0 10px 28px rgba(0, 210, 138, 0.22) !important;
}
.deposit-amt-btn:nth-child(1),
.deposit-amt-btn:nth-child(2),
.deposit-amt-btn:nth-child(3) {
  grid-column: span 4;
}
.deposit-amt-btn:nth-child(4) {
  grid-column: 3 / span 4;
}
.deposit-amt-btn:nth-child(5) {
  grid-column: 7 / span 4;
}
.deposit-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 16px;
  color: #5c727a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.deposit-divider::before,
.deposit-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}
.deposit-divider span {
  flex-shrink: 0;
  opacity: 0.92;
}
.deposit-form-custom {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.deposit-custom-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94aab1;
}
.deposit-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.deposit-input-wrap {
  position: relative;
  flex: 1;
  min-width: 140px;
}
.deposit-input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: rgba(0, 210, 138, 0.88);
  pointer-events: none;
}
.deposit-input-wrap input[type="number"] {
  width: 100%;
  margin: 0 !important;
  padding-left: 44px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  font-size: 15px !important;
  font-variant-numeric: tabular-nums;
}
.deposit-custom-submit {
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  min-width: 138px;
  padding: 12px 18px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  border: none !important;
  background: linear-gradient(180deg, #00e394, #00c97d) !important;
  color: #04110c !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(0, 210, 138, 0.32) !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}
.deposit-custom-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 32px rgba(0, 210, 138, 0.38) !important;
}
.deposit-custom-submit:active {
  transform: translateY(0);
}
.deposit-custom-submit svg {
  flex-shrink: 0;
  opacity: 0.92;
}
@media (max-width: 420px) {
  .deposit-modal-inner {
    padding: 18px 16px 16px;
    border-radius: 18px;
  }
  .deposit-custom-row {
    flex-direction: column;
  }
  .deposit-custom-submit {
    width: 100% !important;
    min-width: 0;
  }
  .deposit-amount-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .deposit-amt-btn:nth-child(n) {
    grid-column: auto;
  }
  .deposit-amt-btn:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.deposit-pix-modal .deposit-modal-hint {
  margin-bottom: 14px;
}
.deposit-pix-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06) inset;
}
.deposit-pix-qr-img,
.deposit-pix-qr-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.deposit-pix-copy-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #94aab1;
}
.deposit-pix-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.deposit-pix-copy-field {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: #e8f2f5 !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-family: ui-monospace, monospace;
  resize: vertical;
  min-height: 72px;
}
.deposit-pix-copy-btn {
  flex-shrink: 0;
  align-self: stretch;
  padding: 10px 16px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 210, 138, 0.45) !important;
  background: rgba(0, 210, 138, 0.12) !important;
  color: #00e394 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.deposit-pix-copy-btn:hover {
  background: rgba(0, 210, 138, 0.2) !important;
}
.deposit-pix-foot {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

/* Barra inferior (mobile, app autenticado ou visitante) */
.app-mobile-tabbar {
  display: none;
}
.app-mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 4px;
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #8ea7ae;
  text-decoration: none;
  border: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}
.app-mobile-tab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.88;
}
.app-mobile-tab span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.app-mobile-tab.is-active,
.app-mobile-tab:hover {
  color: #00d28a;
}
.app-mobile-tab.is-active .app-mobile-tab-icon,
.app-mobile-tab:hover .app-mobile-tab-icon {
  opacity: 1;
}
.app-mobile-tab.is-active .app-mobile-tab-icon {
  filter: drop-shadow(0 0 10px rgba(0, 210, 138, 0.35));
}
.auth-nav a.btn, .btn {
  background: #00d28a; color: #04110c; font-weight: 700;
  border-radius: 12px; padding: 11px 16px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 210, 138, 0.18);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.auth-nav a.btn:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 210, 138, 0.25);
  filter: brightness(1.02);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 11px 16px;
  border: 1px solid #4a6b78;
  background: #142128;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-secondary:hover {
  background: #1e323d;
  border-color: #5f8fa3;
  color: #ffffff;
  filter: none;
}
.container { max-width: 1200px; margin: 28px auto 40px; padding: 0 18px; }
.modern-block {
  margin-bottom: 22px;
}
.card {
  background: linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid #1f2e33;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}
h1, h2, h3 { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
input, select, button, textarea {
  width: 100%; border-radius: 10px; border: 1px solid #284047;
  background: #081013; color: #dce9ec; padding: 11px 12px;
}
input::placeholder, textarea::placeholder {
  color: rgba(182, 201, 207, 0.52);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(0, 210, 138, 0.65);
  box-shadow: 0 0 0 4px rgba(0, 210, 138, 0.12);
}
button { background: #00d28a; color: #052016; font-weight: 700; cursor: pointer; }
label { display: block; margin-bottom: 6px; font-size: 14px; color: #9db1b7; }
.alert { border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.alert.ok { background: #053822; border: 1px solid #007a4b; }
.alert.error { background: #3a1717; border: 1px solid #8a3636; }
.muted { color: #8ea4ab; font-size: 14px; }
.kpi { font-size: 30px; font-weight: 800; }
.room { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid #1f2e33; padding: 10px 6px; text-align: left; }
.canvas-wrap { background: #0f1a1e; border: 1px solid #21434b; padding: 12px; border-radius: 14px; }
.canvas-wrap canvas { width: 100%; background: #0cb46b; border-radius: 10px; display: block; }

.auth-shell {
  min-height: calc(100vh - 210px);
  display: grid;
  place-items: center;
  padding: 14px 0 22px;
}
.auth-shell--immersive {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 160px);
  padding: 28px 16px 44px;
  overflow: hidden;
}
.auth-shell--immersive::before {
  content: "";
  position: absolute;
  inset: -20% -15% auto;
  height: 55vmin;
  max-height: 420px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(0, 210, 138, 0.22), transparent 72%),
    radial-gradient(ellipse 60% 45% at 85% 15%, rgba(56, 189, 248, 0.12), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.auth-shell--immersive::after {
  content: "";
  position: absolute;
  inset: -10% -8%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 35%, black 15%, transparent 72%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.auth-card {
  width: min(520px, 100%);
  background:
    radial-gradient(circle at 22% 0%, rgba(0, 210, 138, 0.10), transparent 40%),
    linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid #20363c;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}
.auth-card--glass {
  position: relative;
  border-radius: 22px;
  padding: 28px 26px 26px;
  border: 1px solid rgba(110, 170, 188, 0.22);
  background:
    radial-gradient(ellipse 100% 85% at 100% -5%, rgba(0, 210, 138, 0.12), transparent 52%),
    radial-gradient(ellipse 90% 70% at -5% 105%, rgba(56, 189, 248, 0.07), transparent 58%),
    rgba(11, 22, 28, 0.42);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset;
}
.auth-card-shine {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.11) 0%,
    transparent 38%,
    transparent 62%,
    rgba(0, 210, 138, 0.05) 100%
  );
  opacity: 0.85;
}
.auth-card--glass > .auth-head,
.auth-card--glass > .auth-form {
  position: relative;
  z-index: 1;
}
.auth-card--glass .auth-form {
  gap: 14px;
}
.auth-card--glass .auth-input-wrap input,
.auth-card--glass .form-row:not(.auth-field) input {
  border-radius: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-color: rgba(82, 130, 142, 0.5);
  background: rgba(4, 9, 11, 0.72);
}
.auth-card-wide {
  width: min(640px, 100%);
}
.auth-head {
  margin-bottom: 18px;
}
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(72, 130, 148, 0.45);
  background: rgba(6, 14, 18, 0.65);
  color: #9dd4df;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.auth-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 14px rgba(0, 210, 138, 0.65);
  flex-shrink: 0;
}
.auth-title {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 4.2vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  background: linear-gradient(135deg, #ffffff 12%, #dff6ef 52%, #7ebfb0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  max-width: 38ch;
}
.auth-head h2:not(.auth-title) {
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.auth-head h2.auth-title {
  margin-bottom: 10px;
}
.auth-field .auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(142, 180, 192, 0.88);
  pointer-events: none;
  z-index: 1;
}
.auth-input-wrap input {
  padding-left: 44px;
}
.auth-input-wrap:focus-within .auth-input-icon {
  color: rgba(0, 210, 138, 0.92);
}
.btn-auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #00ec9f 0%, #00c980 48%, #00a86e 100%) !important;
  color: #04110c !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12) inset,
    0 14px 36px rgba(0, 210, 138, 0.32),
    0 6px 16px rgba(0, 0, 0, 0.28) !important;
}
.btn-auth-primary:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 18px 44px rgba(0, 210, 138, 0.42),
    0 8px 20px rgba(0, 0, 0, 0.32) !important;
  filter: brightness(1.03);
}
.btn-auth-arrow {
  flex-shrink: 0;
  opacity: 0.92;
  transition: transform 0.22s ease;
}
.btn-auth-primary:hover .btn-auth-arrow {
  transform: translateX(4px);
}
.btn-auth-outline {
  border-color: rgba(110, 170, 188, 0.42) !important;
  background: rgba(7, 14, 18, 0.35) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset !important;
}
.btn-auth-outline:hover {
  border-color: rgba(0, 210, 138, 0.38) !important;
  background: rgba(12, 28, 32, 0.55) !important;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.form-row {
  display: grid;
  gap: 6px;
}
.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.btn-block {
  width: 100%;
}
.auth-actions {
  margin-top: 2px;
}
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: #86a0a8;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(to right, rgba(33, 86, 97, 0.15), rgba(33, 86, 97, 0.7), rgba(33, 86, 97, 0.15));
}
.auth-alt {
  display: grid;
  gap: 10px;
}
.auth-foot {
  margin: 0;
  text-align: center;
}
.lobby-shell {
  display: grid;
  gap: 14px;
  background: transparent;
  padding-bottom: 28px;
}
.lobby-promo-banner {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(78, 128, 142, 0.35);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  line-height: 0;
}
.lobby-promo-banner img {
  width: 100%;
  height: auto;
  display: block;
}
/* Hero + toolbar do lobby: vidro (sem bloco .card escuro opaco) */
.lobby-glass-panel {
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(78, 128, 142, 0.3);
  background: rgba(10, 18, 22, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.lobby-toolbar.lobby-glass-panel {
  padding: 16px 18px;
}
.lobby-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.lobby-head-intro {
  min-width: 0;
}
.lobby-head-trailing {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lobby-head h2 {
  margin-bottom: 8px;
}
.lobby-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.lobby-head-actions--primary {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lobby-head-form {
  margin: 0;
  display: flex;
}
.lobby-head-form .btn {
  white-space: nowrap;
}
.lobby-btn-quick {
  background: linear-gradient(180deg, #0d3d2a 0%, #0a2e1f 100%) !important;
  color: #ecfdf5 !important;
  border: 1px solid rgba(0, 210, 138, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.lobby-btn-quick:hover {
  filter: brightness(1.08);
}
/* Desktop: “Criar sala” + “Jogada rápida” na mesma linha (evita width:100% global em button) */
@media (min-width: 781px) {
  .lobby-head-actions--primary {
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
  }
  .lobby-shell .lobby-head-actions--primary > button.btn {
    width: auto;
    flex: 0 0 auto;
  }
  .lobby-shell .lobby-head-actions--primary .lobby-head-form {
    flex: 0 0 auto;
    width: auto;
    display: inline-flex;
  }
  .lobby-shell .lobby-head-actions--primary .lobby-head-form button.btn {
    width: auto;
    flex: 0 0 auto;
  }
}
.lobby-toolbar {
  display: grid;
  gap: 12px;
}
.lobby-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lobby-toolbar-row input[type="search"] {
  flex: 1 1 200px;
  min-width: 0;
}
.lobby-refresh {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
}
.lobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lobby-tag {
  border-radius: 999px;
  border: 1px solid #29444c;
  background: #0c1619;
  color: #92abb1;
  font-size: 12px;
  padding: 6px 10px;
}
.lobby-tag.active {
  border-color: #00d28a;
  color: #00d28a;
  background: rgba(0, 210, 138, 0.08);
}
.lobby-count {
  margin: 0;
  color: #86a0a8;
  font-size: 13px;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 2fr minmax(290px, 1fr);
  gap: 14px;
  align-items: start;
}
/* Só há uma coluna de conteúdo no lobby: evita faixa vazia à direita. */
.lobby-grid--full {
  grid-template-columns: 1fr;
}
.lobby-rooms {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
@media (min-width: 1024px) {
  .lobby-rooms {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}
.lobby-room-card {
  background: linear-gradient(155deg, rgba(18, 32, 38, 0.95) 0%, #080f12 48%, #060a0d 100%);
  border: 1px solid rgba(42, 72, 78, 0.85);
  border-radius: 16px;
  padding: 16px 16px 14px;
  display: grid;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 210, 138, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.lobby-room-card:hover {
  border-color: rgba(0, 210, 138, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 210, 138, 0.08);
  transform: translateY(-2px);
}
.lobby-room-card--sim {
  opacity: 0.92;
}
.lobby-room-card--sim:hover {
  opacity: 1;
}
.lobby-room-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.lobby-room-head-main {
  min-width: 0;
}
.lobby-room-title {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f2f7f8;
  text-shadow: 0.5px 0 rgba(255, 90, 90, 0.35), -0.5px 0 rgba(90, 140, 255, 0.35);
}
.lobby-room-creator {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #00c57d;
}
.lobby-creator-svg {
  flex-shrink: 0;
  color: #00d28a;
  filter: drop-shadow(0 0 6px rgba(0, 210, 138, 0.35));
}
.lobby-room-creator-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby-room-players {
  margin: 6px 0 0;
  color: #9eb4bc;
  font-size: 13px;
  line-height: 1.35;
}
.lobby-room-top .lobby-room-lock {
  margin-top: 8px !important;
}
.lobby-status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #00d28a;
  border: 1px solid rgba(0, 210, 138, 0.5);
  background: rgba(0, 210, 138, 0.1);
}
.lobby-room-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lobby-room-values div {
  background: linear-gradient(180deg, rgba(12, 22, 25, 0.95), rgba(8, 14, 17, 0.98));
  border: 1px solid rgba(36, 58, 64, 0.9);
  border-radius: 12px;
  padding: 11px 12px;
}
.lobby-room-values span {
  display: block;
  color: #8ea3aa;
  font-size: 12px;
  margin-bottom: 2px;
}
.lobby-room-values strong {
  font-size: 20px;
  color: #ecf1f2;
}
.lobby-room-enter-form {
  display: grid;
  gap: 10px;
}
.lobby-room-enter-form .btn,
.lobby-room-card form .btn {
  width: 100%;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #00e894 0%, #00c470 100%);
  color: #061210 !important;
  border: 1px solid rgba(0, 255, 180, 0.35);
  box-shadow: 0 8px 22px rgba(0, 210, 138, 0.25);
}
.lobby-room-enter-form .btn:hover,
.lobby-room-card form .btn:hover {
  filter: brightness(1.06);
}
.btn-lobby-unavailable {
  width: 100%;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: not-allowed !important;
  opacity: 0.55;
  background: linear-gradient(180deg, #12241c 0%, #0a1812 100%) !important;
  color: #6a8a82 !important;
  border: 1px solid #1a3d32 !important;
  box-shadow: none !important;
}
.lobby-room-pw-label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #8ea3aa;
}
.lobby-room-pw-label input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #29444c;
  background: #0c1619;
  color: #ecf1f2;
}
.lobby-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lobby-modal-backdrop[hidden] {
  display: none !important;
}
.lobby-modal-panel {
  border: 1px solid #20363c;
  border-radius: 16px;
  background: linear-gradient(180deg, #121a1e 0%, #0a1114 100%);
  color: #e8eef0;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 640px);
  overflow: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.lobby-modal-form {
  padding: 22px 22px 20px;
  display: grid;
  gap: 14px;
}
.lobby-modal-title {
  margin: 0;
  font-size: 1.25rem;
}
.lobby-modal-lead {
  margin: -6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.lobby-modal-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #92abb1;
}
.lobby-modal-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #29444c;
  background: #0c1619;
  color: #ecf1f2;
  font-size: 14px;
}
.lobby-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 4px;
}
.lobby-modal-actions button {
  width: auto;
  flex: 0 1 auto;
}
.lobby-modal-actions .btn-secondary {
  background: #0d1620;
  color: #ffffff;
  border-color: #5a8fa0;
}
.lobby-modal-actions .btn-secondary:hover {
  background: #152a34;
  border-color: #7dc4d6;
}
/*
 * Partida (/game): moldura rotaciona 90° no celular em pé.
 * html.game-viewport-portrait é definido em layout.php (fallback Safari).
 */
@media (max-width: 1024px) and (orientation: portrait) {
  body.game-force-landscape {
    overflow: hidden;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: manipulation;
  }
  body.game-force-landscape .game-landscape-frame {
    position: fixed;
    z-index: 5;
    width: 100vh;
    width: 100svh;
    height: 100vw;
    height: 100svw;
    max-width: 100vh;
    max-height: 100vw;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%) rotate(90deg);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
    -webkit-transform-origin: center center;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
}
@media (max-width: 1024px) {
  html.game-viewport-portrait body.game-force-landscape {
    overflow: hidden;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    touch-action: manipulation;
  }
  html.game-viewport-portrait body.game-force-landscape .game-landscape-frame {
    position: fixed;
    z-index: 5;
    width: 100vh;
    width: 100svh;
    height: 100vw;
    height: 100svw;
    max-width: 100vh;
    max-height: 100vw;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%) rotate(90deg);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
    -webkit-transform-origin: center center;
    overflow: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
}
@media (max-width: 1024px) and (orientation: landscape) {
  body.game-force-landscape .game-landscape-frame {
    position: relative;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    top: auto;
    left: auto;
    -webkit-transform: none;
    transform: none;
    overflow: visible;
    max-height: none;
  }
}

.game-shell {
  display: grid;
  gap: 14px;
}
.game-stage {
  border-radius: 18px;
  padding: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
.game-play-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(58px, 72px);
  gap: 12px;
  align-items: stretch;
}
/* Quando a altura limita a mesa (aspect-ratio), a célula do meio fica mais larga que a mesa — centraliza. */
body.game-force-landscape .game-play-row > .game-frame.game-table-wrap {
  justify-self: center;
  max-width: 100%;
}

.game-pvp-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(8, 12, 22, 0.82);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  pointer-events: none;
}
.game-pvp-overlay[data-state="lobby"] {
  background: rgba(6, 10, 18, 0.88);
}
/* Aviso sem escurecer a mesa — dá para acompanhar a tacada do adversário. */
.game-pvp-overlay[data-state="watch"] {
  align-items: flex-start;
  justify-content: center;
  padding: 12px 12px 0;
  background: transparent;
  backdrop-filter: none;
}
.game-pvp-overlay[data-state="watch"] .game-pvp-overlay-inner {
  pointer-events: none;
  padding: 9px 18px;
  max-width: min(400px, 96%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
  background: rgba(15, 23, 42, 0.88);
}
/* O atributo HTML hidden perde para display:flex sem isto — overlay ficava sempre visível ("…"). */
.game-pvp-overlay[hidden] {
  display: none !important;
}

.game-end-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(8px);
}
.game-end-overlay[hidden] {
  display: none !important;
}
.game-end-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 22px 20px;
}
.game-end-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: #f8fafc;
}
.game-end-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
}
.game-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Confirmação ao sair da partida PvP (Lobby / navegação) */
.pvp-leave-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 24px);
  width: min(420px, 100%);
  background: transparent;
  color: inherit;
}
.pvp-leave-dialog::backdrop {
  background: rgba(2, 6, 10, 0.82);
  backdrop-filter: blur(8px);
}
.pvp-leave-dialog-inner {
  margin: 0;
  padding: 22px 20px 18px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(0, 210, 138, 0.18);
  background:
    linear-gradient(145deg, rgba(18, 28, 32, 0.98) 0%, rgba(8, 12, 14, 0.99) 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
}
.pvp-leave-dialog-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #f8fafc;
}
.pvp-leave-dialog-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
}
.pvp-leave-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Avisos de flash (substitui faixas .alert em modal) */
.app-flash-dialog {
  border: none;
  padding: 0;
  max-width: calc(100vw - 24px);
  width: min(420px, 100%);
  background: transparent;
  color: inherit;
  z-index: 10050;
}
.app-flash-dialog::backdrop {
  background: rgba(2, 6, 10, 0.82);
  backdrop-filter: blur(8px);
}
.app-flash-dialog-inner {
  margin: 0;
  padding: 22px 20px 18px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(145deg, rgba(18, 28, 32, 0.98) 0%, rgba(8, 12, 14, 0.99) 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
}
.app-flash-dialog--error .app-flash-dialog-inner {
  border-color: rgba(220, 80, 80, 0.45);
}
.app-flash-dialog--ok .app-flash-dialog-inner {
  border-color: rgba(0, 210, 138, 0.28);
}
.app-flash-dialog-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}
.app-flash-dialog-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #cbd5e1;
}
.app-flash-dialog-actions {
  display: flex;
  justify-content: center;
}
.app-flash-dialog-btn {
  min-width: 120px;
}

.game-pvp-overlay-inner {
  pointer-events: auto;
  padding: 20px 22px 18px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 20px 50px rgba(0, 0, 0, 0.55);
  background: linear-gradient(165deg, rgba(22, 32, 54, 0.98) 0%, rgba(15, 20, 35, 0.98) 100%);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  max-width: min(360px, 94%);
  line-height: 1.4;
}
.game-pvp-overlay-inner--plain {
  padding: 14px 22px;
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  background: rgba(15, 23, 42, 0.94);
  max-width: min(320px, 92%);
}
.game-pvp-lobby-pulse {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
}
.game-pvp-lobby-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.55);
  animation: game-pvp-pulse-ring 2s ease-out infinite;
}
.game-pvp-lobby-ring--delay {
  animation-delay: 0.65s;
  border-color: rgba(0, 230, 118, 0.35);
}
@keyframes game-pvp-pulse-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.95;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.game-pvp-lobby-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}
.game-pvp-lobby-heading {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.game-pvp-lobby-msg {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  line-height: 1.45;
}
.game-pvp-overlay-inner--plain .game-pvp-lobby-msg {
  margin-bottom: 0;
  font-weight: 600;
}
.game-pvp-lobby-extras {
  text-align: left;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.game-pvp-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.game-pvp-room-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}
.game-pvp-room-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.game-pvp-lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.game-pvp-lobby-actions .btn-secondary {
  font-size: 13px;
  padding: 8px 14px;
}
.game-pvp-lobby-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
  text-align: center;
}
.game-power-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  align-self: stretch;
  padding: 6px 2px 6px 4px;
}
.game-power {
  --power-pct: 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 12px 8px;
  min-height: 120px;
}
.game-power-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}
.game-power-track {
  flex: 1;
  width: 14px;
  min-height: 160px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.game-power-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: var(--power-pct, 0%);
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e 0%, #eab308 52%, #ef4444 100%);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
  transition: height 80ms linear, width 80ms linear;
}
.game-tray {
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-self: stretch;
  padding: 0;
  overflow: visible;
  background: linear-gradient(180deg, #0f1419 0%, #06080c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.game-tray-rack-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 10px 10px 10px;
}
/* Tubo vertical das bolas caçapadas — encosta na altura da mesa via flex. */
.game-tray-channel {
  position: relative;
  width: 56px;
  max-width: 56px;
  flex: 1 1 auto;
  min-height: 260px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse 90% 35% at 50% 8%, rgba(55, 65, 85, 0.45), transparent 58%),
    linear-gradient(165deg, #151922 0%, #080a0f 55%, #050609 100%);
  border: 1px solid rgba(55, 62, 78, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.45);
  overflow: visible;
}
.game-tray-tube-lane {
  position: absolute;
  inset: 12px 6px 7px 6px;
  border-radius: 9px 9px 7px 7px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(35, 42, 58, 0.65), transparent 52%),
    linear-gradient(180deg, rgba(12, 14, 20, 0.92) 0%, rgba(5, 6, 10, 0.98) 100%);
  box-shadow: inset 0 3px 18px rgba(0, 0, 0, 0.7);
}
/* Trilhos decorativos desativados — cobriam as bolas (z-index). */
.game-tray-chrome-svg {
  display: none;
}
.game-tray-rungs {
  display: none;
}
.game-tray-rungs span {
  display: block;
  height: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0.85;
}
.game-tray-glass-cap {
  display: none;
}
.game-tray-feed {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  /* column-reverse: main-start = fundo do tubo → flex-start ancora a 1ª bola embaixo. */
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 12px 3px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.45) transparent;
}
.game-tray-feed:empty::after {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  margin-top: auto;
  align-self: center;
  margin-bottom: 10px;
  border-radius: 50%;
  border: 2px dashed rgba(148, 163, 184, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  opacity: 0.75;
}
.tray-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  color: #0f172a;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.35);
}
.tray-ball--rack {
  width: 38px;
  height: 38px;
  font-size: 12px;
  position: relative;
  margin-top: -13px;
  box-shadow:
    inset -5px -6px 10px rgba(0, 0, 0, 0.35),
    inset 6px 8px 14px rgba(255, 255, 255, 0.55),
    0 6px 12px rgba(0, 0, 0, 0.55);
}
.tray-ball--rack:last-child {
  margin-top: 0;
}
.tray-ball--rack::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 28% 22%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0) 42%
  );
  opacity: 0.55;
  pointer-events: none;
}
.tray-ball--stripe {
  color: #0f172a;
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #f8fafc 18%,
    var(--stripe-mid, #64748b) 18%,
    var(--stripe-mid, #64748b) 82%,
    #f8fafc 82%,
    #f8fafc 100%
  );
}
.tray-ball--eight {
  background: radial-gradient(circle at 26% 20%, #64748b 0%, #0f172a 55%, #020617 100%);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
}
.game-tray-scratch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.game-tray-scratch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffffff 0%, #e2e8f0 70%);
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 2px 5px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.game-tray-fault-count {
  font-size: 15px;
  font-weight: 900;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
}
@media (max-width: 980px) {
  body:not(.game-force-landscape) .game-play-row {
    grid-template-columns: 1fr;
  }
  body:not(.game-force-landscape) .game-power-slot {
    order: 0;
    flex-direction: row;
    justify-content: center;
    padding: 10px 0 4px;
  }
  body:not(.game-force-landscape) .game-frame.game-table-wrap {
    order: 1;
  }
  body:not(.game-force-landscape) .game-power-float {
    padding: 5px 6px 6px;
  }
  body:not(.game-force-landscape) .game-power-track.game-power-track--hud {
    height: clamp(96px, 17vh, 142px);
    width: 28px;
  }
  body:not(.game-force-landscape) .game-tray {
    order: 2;
    max-width: none;
  }
  body:not(.game-force-landscape) .game-tray-rack-shell {
    flex-direction: row;
    align-items: stretch;
    padding: 10px 12px;
    gap: 12px;
    min-height: auto;
  }
  body:not(.game-force-landscape) .game-tray-channel {
    flex: 1;
    min-height: 56px;
    width: auto;
    max-width: none;
  }
  body:not(.game-force-landscape) .game-tray-chrome-svg,
  body:not(.game-force-landscape) .game-tray-glass-cap {
    display: none;
  }
  body:not(.game-force-landscape) .game-tray-rungs {
    display: none;
  }
  body:not(.game-force-landscape) .game-tray-tube-lane {
    inset: 8px 10px 8px 10px;
    border-radius: 12px;
  }
  body:not(.game-force-landscape) .game-tray-feed {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    padding: 8px 10px;
    min-height: 56px;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  body:not(.game-force-landscape) .game-tray-feed:empty::after {
    margin: 0 auto;
  }
  body:not(.game-force-landscape) .tray-ball--rack {
    margin-top: 0;
  }
  body:not(.game-force-landscape) .game-tray-scratch {
    flex-direction: column;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 12px;
    width: auto;
    min-width: 44px;
  }
}
.game-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.game-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.game-frame {
  border: 1px solid #1f2e33;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  aspect-ratio: 740 / 426;
  max-height: calc(100vh - 300px);
}
.game-table-wrap {
  position: relative;
  min-width: 0;
}
@media (max-width: 1366px) {
  body.game-force-landscape .game-frame {
    max-height: min(calc(100dvh - 40px), calc(100svh - 40px), 680px);
  }
}

/* Barra de força: só gradiente + segmentos (sem trilho metálico em U). */
.game-power-float {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  pointer-events: none;
  padding: 8px 8px 10px;
  background:
    radial-gradient(ellipse 80% 50% at 30% 0%, rgba(80, 88, 102, 0.35), transparent 55%),
    linear-gradient(165deg, rgba(42, 44, 52, 0.98) 0%, rgba(14, 15, 20, 0.99) 48%, rgba(8, 9, 12, 1) 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.45);
  --power-pct: 0%;
}
.game-power-float-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.game-power-track.game-power-track--hud {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: clamp(112px, 19vh, 176px);
  overflow: hidden;
  background: linear-gradient(180deg, #151922 0%, #06080d 100%);
  border-radius: 10px;
  border: 1px solid rgba(55, 62, 78, 0.88);
  box-shadow:
    inset 0 3px 12px rgba(0, 0, 0, 0.58),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

/* Toque na barra de força (mobile/tablet — viewport em paisagem costuma ser >1024px): o pai .game-power-float tem pointer-events:none. */
@media (max-width: 1366px), (pointer: coarse) {
  .game-power-track.game-power-track--hud {
    pointer-events: auto;
    touch-action: none;
    cursor: pointer;
  }
}

/* Preenchimento ao segurar no mobile (requestAnimationFrame): sem transição CSS para subir fluido. */
#gamePowerPanel[data-power-charging="1"] .game-power-track--hud .game-power-fill {
  transition: none;
}
.game-power-track-bg {
  position: absolute;
  inset: 3px;
  border-radius: 7px;
  z-index: 0;
  background: linear-gradient(
    180deg,
    #facc15 0%,
    #f97316 34%,
    #ea580c 58%,
    #dc2626 82%,
    #991b1b 100%
  );
  opacity: 0.2;
  pointer-events: none;
}
.game-power-track--hud .game-power-fill {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  width: auto;
  z-index: 1;
  height: var(--power-pct, 0%);
  min-height: 0;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(
    180deg,
    #fef08a 0%,
    #fbbf24 18%,
    #f97316 42%,
    #ef4444 72%,
    #b91c1c 100%
  );
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.35),
    inset 0 -4px 12px rgba(127, 29, 29, 0.45),
    0 0 18px rgba(251, 146, 60, 0.32);
  transition: height 72ms linear;
}
.game-power-track--hud .game-power-segments {
  position: absolute;
  inset: 3px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12% 0 8%;
  pointer-events: none;
}
.game-power-track--hud .game-power-segments span {
  display: block;
  margin: 0;
  height: 0;
  border-top: 2px solid rgba(0, 0, 0, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}
.game-power-meter-gleam {
  position: absolute;
  inset: 3px;
  z-index: 3;
  border-radius: 7px;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.65;
}
.game-power-cue-ico {
  display: flex;
  align-items: center;
  gap: 0;
  width: 32px;
  height: 9px;
  position: relative;
}
.game-power-cue-tip {
  flex: 0 0 9px;
  height: 7px;
  border-radius: 2px 1px 1px 2px;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 40%, #94a3b8 100%);
  box-shadow:
    inset 0 -1px 1px rgba(0, 0, 0, 0.28),
    1px 0 2px rgba(0, 0, 0, 0.35);
}
.game-power-cue-shaft {
  position: relative;
  flex: 1;
  height: 7px;
  margin-left: -1px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(
    180deg,
    #d4a574 0%,
    #a16228 38%,
    #6b3d1f 72%,
    #3f2415 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}
.game-power-cue-shaft::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.game-table-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  vertical-align: top;
  touch-action: none;
  background: transparent;
}

.match-hud {
  position: relative;
  padding: 12px 16px 14px;
  background: rgba(8, 12, 16, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
.match-hud-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 280px) minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
}
.match-hud-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.match-hud-left {
  align-items: flex-start;
}
.match-hud-right {
  align-items: flex-end;
}
.match-hud-player {
  display: flex;
  align-items: center;
  gap: 12px;
}
.match-hud-left .match-hud-player {
  justify-content: flex-start;
}
.match-hud-right .match-hud-player {
  justify-content: flex-end;
  flex-direction: row-reverse;
}
.match-hud-info {
  min-width: 0;
}
.match-hud-info-right {
  text-align: right;
}
.match-hud-handle {
  margin: 0;
  font-weight: 700;
  font-size: clamp(12px, 1.8vw, 15px);
  letter-spacing: 0.02em;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}
.match-hud-handle-active {
  color: #f87171;
}
.match-hud-tag {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.95);
}
.match-hud-tag-you {
  color: rgba(52, 211, 153, 0.95);
}
.match-hud-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: #052016;
  background: linear-gradient(145deg, #6ee7b7, #00d28a);
  box-shadow:
    0 4px 14px rgba(0, 210, 138, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.match-hud-avatar-opp {
  background: linear-gradient(145deg, #94a3b8, #475569);
  color: #f8fafc;
}
.match-hud-center {
  text-align: center;
  padding: 0 4px;
}
.match-hud-mode {
  margin: 0 0 6px;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.88);
}
.match-hud-center.is-my-turn-active .match-hud-room-meta {
  display: none !important;
}
.match-hud-turn-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.match-hud-turn-timer[hidden] {
  display: none !important;
}
.match-hud-clock-icon {
  flex-shrink: 0;
  color: rgba(226, 232, 240, 0.92);
  filter: drop-shadow(0 0 10px rgba(148, 163, 184, 0.35));
}
.match-hud-turn-timer-secs {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
}
.match-hud-turn-timer-unit {
  font-size: 14px;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.85);
  align-self: flex-end;
  padding-bottom: 4px;
}
.match-hud-turn-timer.is-urgent .match-hud-turn-timer-secs,
.match-hud-turn-timer.is-urgent .match-hud-clock-icon,
.match-hud-turn-timer.is-urgent .match-hud-turn-timer-unit {
  color: #fca5a5;
}
@keyframes matchHudTimerUrgentPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.38;
  }
}
.match-hud-turn-timer.is-urgent {
  animation: matchHudTimerUrgentPulse 0.65s ease-in-out infinite;
}
.match-hud-prize {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.match-hud-currency {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.32);
}
.match-hud-amount {
  font-size: clamp(24px, 4.2vw, 36px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fde68a 0%, #eab308 48%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(234, 179, 8, 0.22));
}
.match-hud-prize-muted .match-hud-amount {
  background: none;
  color: #64748b;
  filter: none;
  font-size: 28px;
}
.match-hud-sub {
  margin: 8px 0 0;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}
.match-hud-code {
  margin: 6px 0 0;
  font-size: 11px;
}
.match-hud-live-msg {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(52, 211, 153, 0.95);
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.25);
}
#pvpTurnLabel[hidden] {
  display: none !important;
}
/* Lobby fictício ao iniciar “Jogada rápida” (quick=1) */
.game-quick-match-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  pointer-events: none;
  background: rgba(6, 10, 18, 0.88);
  backdrop-filter: blur(6px);
}
.game-quick-match-overlay[hidden] {
  display: none !important;
}
.game-quick-match-card {
  pointer-events: auto;
  max-width: min(92vw, 340px);
  padding: 18px 22px;
  text-align: center;
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 18px 44px rgba(0, 0, 0, 0.55);
  background: linear-gradient(165deg, rgba(16, 30, 24, 0.97) 0%, rgba(8, 14, 12, 0.98) 100%);
}
.game-quick-match-line {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ecfdf5;
}
/* “Sua vez…” e dicas de turno: modal curto; controlado em game.js */
.game-turn-toast {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.game-turn-toast.is-visible {
  opacity: 1;
}
.game-turn-toast-panel {
  max-width: min(90vw, 360px);
  padding: 16px 22px;
  border-radius: 16px;
  background: linear-gradient(175deg, rgba(16, 24, 30, 0.97) 0%, rgba(6, 10, 14, 0.98) 100%);
  border: 1px solid rgba(45, 212, 191, 0.4);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 50px rgba(0, 0, 0, 0.55);
}
.game-turn-toast-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: rgba(94, 234, 212, 0.98);
  text-align: center;
}
.match-hud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.match-hud-lobby {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(236, 241, 242, 0.92);
  text-decoration: none;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.15s ease;
}
.match-hud-lobby:hover {
  color: #fff;
  border-color: rgba(0, 210, 138, 0.45);
  background: rgba(0, 210, 138, 0.1);
}
.match-hud-lobby:active {
  transform: scale(0.96);
}
.match-hud-lobby-icon {
  display: block;
  flex-shrink: 0;
}

.match-hud-ball-tracks {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: min(100%, 220px);
}
.match-hud-ball-tracks--opp {
  align-self: flex-end;
}
.match-hud-ball-tracks--opp .match-hud-ball-row {
  justify-content: flex-end;
}
.match-hud-ball-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
}
.hud-slot-empty {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, rgba(42, 48, 56, 0.95), rgba(10, 12, 16, 0.98));
  box-shadow:
    inset 0 4px 8px rgba(0, 0, 0, 0.55),
    inset 0 -1px 1px rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.45);
}
.tray-ball.hud-mini {
  width: 22px;
  height: 22px;
  font-size: 9px;
  margin: 0;
  box-shadow:
    inset -3px -4px 6px rgba(0, 0, 0, 0.38),
    inset 4px 5px 8px rgba(255, 255, 255, 0.48),
    0 3px 7px rgba(0, 0, 0, 0.42);
}

@media (max-width: 780px) {
  .match-hud-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "center center"
      "left right"
      "actions actions";
  }
  .match-hud-grid .match-hud-left {
    grid-area: left;
  }
  .match-hud-grid .match-hud-center {
    grid-area: center;
  }
  .match-hud-grid .match-hud-right {
    grid-area: right;
  }
  .match-hud-grid .match-hud-actions {
    grid-area: actions;
    justify-content: center;
    padding-top: 6px;
  }
  .match-hud-handle {
    max-width: 42vw;
  }
  .match-hud-ball-tracks {
    max-width: 100%;
  }
}

/* Partida (/game) em telas até tablet/iPad: sem header, HUD em faixa fina (viewport em paisagem costuma ser >1024px) */
@media (max-width: 1366px) {
  body.game-force-landscape .topbar {
    display: none;
  }
  body.game-force-landscape main.container {
    margin-top: 0;
    margin-bottom: 6px;
    padding-left: max(2px, env(safe-area-inset-left, 0px));
    padding-right: max(2px, env(safe-area-inset-right, 0px));
  }
  body.game-force-landscape .game-shell {
    gap: 2px;
  }
  body.game-force-landscape .game-stage {
    padding: 4px 4px 5px;
    border-radius: 11px;
  }
  /* Menos altura na coluna da força / trilho → sobra espaço pra mesa na viewport */
  body.game-force-landscape .game-power-track.game-power-track--hud {
    height: clamp(84px, 17dvh, 128px);
    width: 28px;
  }
  body.game-force-landscape .game-power-float {
    padding: 5px 5px 6px;
  }
  body.game-force-landscape .game-tray-channel {
    min-height: min(200px, 36dvh);
  }
  body.game-force-landscape .game-tray-rack-shell {
    padding: 6px 7px;
  }
  /* Uma linha: laterais + Lobby; centro ocupa toda a largura por baixo → prêmio no meio geométrico */
  body.game-force-landscape .match-hud-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-rows: auto;
    gap: 3px 4px;
    align-items: center;
    position: relative;
  }
  body.game-force-landscape .match-hud-grid .match-hud-left {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
    justify-self: start;
    min-width: 0;
    z-index: 2;
    position: relative;
  }
  body.game-force-landscape .match-hud-grid .match-hud-center {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-top: 0;
    justify-self: center;
    align-self: center;
    min-width: 0;
    width: 100%;
    max-width: none;
    z-index: 1;
    pointer-events: none;
    position: relative;
  }
  body.game-force-landscape .match-hud-grid .match-hud-right {
    grid-column: 3;
    grid-row: 1;
    padding-top: 0;
    justify-self: end;
    width: max-content;
    max-width: 42vw;
    z-index: 2;
    position: relative;
  }
  body.game-force-landscape .match-hud-grid .match-hud-actions {
    grid-column: 4;
    grid-row: 1;
    padding-top: 0;
    justify-self: end;
    width: max-content;
    margin-left: -2px;
    z-index: 2;
    position: relative;
  }
  body.game-force-landscape .match-hud-grid .match-hud-actions a {
    pointer-events: auto;
  }
  body.game-force-landscape .match-hud {
    box-sizing: border-box;
    width: 100%;
    position: relative;
    max-width: min(100%, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
    padding: 3px 5px 4px;
    border-radius: 10px;
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  body.game-force-landscape .match-hud-center {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    min-width: 0;
    text-align: center;
  }
  /* Sem rótulo de modo no HUD — só o prêmio no centro visual */
  body.game-force-landscape .match-hud-mode {
    display: none;
  }
  body.game-force-landscape .match-hud-prize {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    width: auto;
    margin: 0 auto;
  }
  body.game-force-landscape .match-hud-currency {
    font-size: 10px;
  }
  body.game-force-landscape .match-hud-amount {
    font-size: clamp(12px, 4vw, 18px);
  }
  body.game-force-landscape .match-hud-prize-muted .match-hud-amount {
    font-size: 16px;
  }
  body.game-force-landscape .match-hud-turn-timer-secs {
    font-size: clamp(14px, 4.2vw, 22px);
  }
  body.game-force-landscape .match-hud-clock-icon {
    width: 16px;
    height: 16px;
  }
  body.game-force-landscape .match-hud-sub,
  body.game-force-landscape .match-hud-code {
    display: none;
  }
  body.game-force-landscape .match-hud-handle {
    font-size: 10px;
    max-width: 22vw;
  }
  body.game-force-landscape .match-hud-tag {
    margin-top: 0;
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  body.game-force-landscape .match-hud-player {
    gap: 6px;
  }
  body.game-force-landscape .match-hud-avatar,
  body.game-force-landscape .match-hud-avatar-opp {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 11px;
    box-shadow:
      0 2px 8px rgba(0, 210, 138, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  body.game-force-landscape .match-hud-avatar-opp {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  body.game-force-landscape .match-hud-lobby {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  body.game-force-landscape .match-hud-lobby-icon {
    width: 20px;
    height: 20px;
  }
  body.game-force-landscape .match-hud-ball-tracks {
    display: none;
  }
}

.landing-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 82px 64px 56px;
  border: 1px solid rgba(56, 101, 112, 0.72);
  background:
    radial-gradient(circle at 74% 10%, rgba(0, 210, 138, 0.24), transparent 38%),
    radial-gradient(circle at 8% 0%, rgba(0, 153, 255, 0.16), transparent 42%),
    linear-gradient(130deg, rgba(5, 12, 15, 0.9), rgba(8, 15, 18, 0.76)),
    linear-gradient(180deg, #0b1215, #090f12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 36px 70px rgba(0, 0, 0, 0.42);
}
.landing-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -180px;
  border-radius: 50%;
  border: 1px solid rgba(0, 210, 138, 0.22);
  background: radial-gradient(circle, rgba(0, 210, 138, 0.17), rgba(0, 210, 138, 0.03) 55%, transparent 72%);
  pointer-events: none;
}
.hero-bg{
  position:absolute;
  inset:-20px;
  background:
    radial-gradient(circle at 50% 30%, rgba(0,0,0,0.25), rgba(0,0,0,0.85) 60%),
    radial-gradient(circle at 80% 10%, rgba(0,210,138,0.18), transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.85));
  opacity: .95;
  pointer-events:none;
}
.hero-inner{position:relative; z-index:1;}
.hero-badges{
  margin-top: 22px;
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}
.badge-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(59, 99, 109, 0.8);
  background: linear-gradient(180deg, rgba(8, 17, 20, 0.82), rgba(7, 14, 17, 0.68));
  color:#c5dbe0;
  font-weight:600;
  font-size:12px;
}
.badge-pill .dot{
  width:8px;height:8px;border-radius:99px;background:var(--brand);
  box-shadow:0 0 0 4px rgba(0,210,138,0.15);
}
.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58)),
    linear-gradient(to top, rgba(0, 0, 0, 0.26), transparent 42%);
  pointer-events: none;
}
.landing-hero > * {
  position: relative;
  z-index: 1;
}
.hero-kicker {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(64, 104, 114, 0.85);
  background: rgba(7, 17, 20, 0.82);
  color: #a8cdd4;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 18px;
}
.landing-hero h1 {
  max-width: 920px;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 0.98;
  margin-bottom: 22px;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}
.landing-hero h1 span {
  color: #0be7a0;
  text-shadow: 0 0 30px rgba(0, 210, 138, 0.3);
}
.hero-text {
  max-width: 760px;
  color: #a7bec5;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.54;
  margin-bottom: 34px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.hero-actions .btn,
.hero-actions .btn-secondary {
  min-width: 178px;
}
.hero-actions .btn-secondary {
  background: rgba(11, 20, 24, 0.82);
}
.hero-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.hero-stats div {
  border: 1px solid #2f525b;
  background: rgba(8, 20, 23, 0.82);
  border-radius: 14px;
  padding: 14px;
}
.hero-stats strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}
.hero-stats span {
  color: #8ea7ae;
  font-size: 14px;
}
.landing-section {
  padding: 14px 0;
}
.section-head {
  margin-bottom: 28px;
}
.section-head h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.section-head p {
  color: #94abb2;
  font-size: clamp(15px, 1.5vw, 19px);
  margin: 0;
}
.section-center {
  text-align: center;
}
.how-it-works {
  background: linear-gradient(180deg, rgba(10, 17, 20, 0.82), rgba(8, 13, 15, 0.58));
  border: 1px solid rgba(42, 72, 80, 0.82);
  border-radius: 24px;
  padding: 38px 28px 30px;
}

.modes-wrap{
  padding: 30px 22px 22px;
  border: 1px solid rgba(37, 66, 74, 0.84);
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 210, 138, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(10, 16, 19, 0.72), rgba(8, 12, 14, 0.52));
}
.modes-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
}
.mode-card{
  background:
    radial-gradient(circle at 30% 0%, rgba(0, 210, 138, 0.08), transparent 35%),
    linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid rgba(40, 68, 77, 0.9);
  border-radius: 18px;
  padding: 22px;
  min-height: 190px;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.mode-card:hover{
  transform: translateY(-4px);
  border-color: #3f7380;
  box-shadow: 0 16px 34px rgba(0,0,0,0.28);
}
.mode-meta{
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #93aab1;
  margin-bottom: 10px;
}
.mode-card h3{
  font-size: 28px;
  margin-bottom: 10px;
}
.mode-card p{
  margin:0;
  color:#94aab1;
  font-size:17px;
  line-height:1.55;
}
.modes-cta{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.faq-wrap{
  padding: 30px 22px 22px;
  border: 1px solid rgba(37, 66, 74, 0.84);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 153, 255, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(10, 16, 19, 0.65), rgba(8, 12, 14, 0.5));
}
.faq-grid{
  max-width: 980px;
  margin: 0 auto;
  display:grid;
  gap:12px;
}
.faq-item{
  border:1px solid rgba(40, 70, 78, 0.8);
  background: linear-gradient(180deg, rgba(8, 17, 20, 0.76), rgba(7, 15, 18, 0.66));
  border-radius: 16px;
  padding: 14px 16px;
}
.faq-item summary{
  cursor:pointer;
  font-weight: 700;
  font-size: 16px;
  list-style:none;
}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item p{
  margin: 10px 0 0;
  color:#8ea7ae;
  line-height:1.6;
}
.faq-item[open]{border-color:#31626c;}

.footer{
  margin-top: 40px;
  border-top: 1px solid #1b2b2f;
  padding: 26px 18px 18px;
  background: rgba(8, 12, 14, 0.75);
}
.footer-shell{
  max-width: 1260px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items:start;
}
.footer-links{
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap: 10px;
}
.footer-links a{
  color:#b6c9cf;
  text-decoration:none;
  padding:8px 10px;
  border-radius: 10px;
  border:1px solid transparent;
}
.footer-links a:hover{
  background:#132127;
  border-color:#2b4750;
  color:#fff;
}
.footer-bottom{
  max-width: 1260px;
  margin: 14px auto 0;
  text-align:center;
}
.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  display: grid;
  gap: 14px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  bottom: 16px;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #215661, rgba(33, 86, 97, 0.2));
}
.timeline-item {
  width: calc(50% - 32px);
  background: linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid rgba(40, 69, 78, 0.9);
  border-radius: 18px;
  padding: 18px;
  position: relative;
}
.timeline-item:nth-child(odd) {
  justify-self: start;
}
.timeline-item:nth-child(even) {
  justify-self: end;
}
.timeline-item .step-number {
  margin-bottom: 10px;
}
.timeline-item h3 {
  margin-bottom: 8px;
}
.landing-grid {
  display: grid;
  gap: 16px;
}
.steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.benefits-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.benefits-wrap {
  padding: 30px 22px 14px;
  border: 1px solid rgba(37, 66, 74, 0.84);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 210, 138, 0.08), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(0, 153, 255, 0.06), transparent 35%),
    linear-gradient(180deg, rgba(10, 16, 19, 0.75), rgba(8, 12, 14, 0.55));
}
.feature-card {
  background:
    radial-gradient(circle at 30% 0%, rgba(0, 210, 138, 0.08), transparent 35%),
    linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid rgba(40, 68, 77, 0.9);
  border-radius: 18px;
  padding: 22px;
  min-height: 176px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: #3f7380;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}
.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 210, 138, 0.12);
  border: 1px solid rgba(0, 210, 138, 0.25);
  color: #00d28a;
  font-weight: 900;
}
.feature-tag {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #93aab1;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #2b4750;
  background: rgba(7, 15, 18, 0.65);
}
.feature-card h3 {
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.feature-card p {
  margin: 0;
  color: #94aab1;
  line-height: 1.55;
  font-size: 17px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 210, 138, 0.14);
  color: #00d28a;
  font-weight: 800;
  margin-bottom: 12px;
}
.landing-cta {
  margin-top: 24px;
  text-align: center;
  border: 1px solid rgba(45, 80, 90, 0.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(0, 210, 138, 0.18), transparent 60%),
    linear-gradient(180deg, #0c1417, #0a1012);
  padding: 40px 24px;
}
.cta-split {
  text-align: left;
  border-radius: 24px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 210, 138, 0.2), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(0, 153, 255, 0.10), transparent 40%),
    linear-gradient(180deg, #0c1417, #090f12);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.cta-right {
  display: grid;
  gap: 10px;
  align-content: start;
}
.cta-mini {
  border: 1px solid rgba(44, 74, 83, 0.9);
  background: linear-gradient(180deg, rgba(8, 17, 20, 0.76), rgba(7, 15, 18, 0.66));
  border-radius: 16px;
  padding: 15px;
}
.cta-mini strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.cta-mini span {
  color: #8ea7ae;
  font-size: 13px;
}
.landing-cta h2 {
  font-size: clamp(32px, 3.8vw, 52px);
  margin-bottom: 10px;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.landing-cta p {
  color: #93abb2;
  margin-bottom: 22px;
  font-size: clamp(15px, 1.5vw, 19px);
}

@media (max-width: 780px) {
  .topbar {
    padding: 10px 10px;
  }
  .topbar-shell {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 10px;
    align-items: center;
  }
  .brand {
    font-size: clamp(17px, 4.8vw, 22px);
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 38vw;
  }
  .brand--logo {
    max-width: min(280px, 54vw);
  }
  .main-nav {
    display: none;
  }
  .auth-nav {
    margin-left: auto;
    flex: 1;
    min-width: 0;
    width: auto;
    overflow: visible;
    padding-bottom: 0;
    justify-content: flex-end;
    gap: 4px;
  }
  /* Saldo + Depositar no header (compacto); sem ícone de dinheiro no mobile */
  .auth-nav .topbar-wallet {
    padding: 5px 10px;
    gap: 0;
    border-radius: 10px;
    font-size: 11px;
    max-width: min(46vw, 148px);
    border-color: rgba(0, 210, 138, 0.35);
    background: rgba(0, 210, 138, 0.06);
  }
  .auth-nav .topbar-wallet .topbar-icon-money {
    display: none !important;
  }
  .auth-nav .topbar-balance {
    font-size: 11px;
  }
  .auth-nav .btn-topbar-deposit {
    padding: 7px 13px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    border-radius: 999px !important;
    color: #061210 !important;
    border: 1px solid rgba(164, 255, 215, 0.45) !important;
    background: linear-gradient(165deg, #34f5b5 0%, #00d28a 42%, #00ab72 100%) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 8px 20px rgba(0, 210, 138, 0.38),
      0 3px 0 rgba(0, 100, 62, 0.45) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
      transform 0.15s ease,
      box-shadow 0.15s ease,
      filter 0.15s ease !important;
  }
  .auth-nav .btn-topbar-deposit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.32) inset,
      0 10px 26px rgba(0, 210, 138, 0.45),
      0 4px 0 rgba(0, 90, 58, 0.4) !important;
  }
  .auth-nav .btn-topbar-deposit:active {
    transform: translateY(1px);
    filter: brightness(0.96);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 3px 12px rgba(0, 210, 138, 0.25),
      0 1px 0 rgba(0, 80, 52, 0.5) !important;
  }
  .auth-nav .topbar-logout {
    display: none !important;
  }
  .auth-nav a:not(.btn) {
    display: none;
  }
  .auth-nav a.btn {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 11px;
    white-space: nowrap;
  }
  body.app-logged-out:not(.tw-landing) .auth-nav {
    display: none !important;
  }
  .app-mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 160;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    margin: 0;
    list-style: none;
    background: linear-gradient(180deg, rgba(11, 16, 18, 0.97), rgba(6, 10, 12, 0.99));
    border-top: 1px solid rgba(36, 58, 66, 0.95);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
  }
  body.game-force-landscape .app-mobile-tabbar {
    display: none !important;
  }
  body:not(.tw-landing):not(.game-force-landscape) main.container {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 12px));
  }
  .landing-hero {
    padding: 40px 20px 26px;
    border-radius: 20px;
  }
  .landing-hero h1 {
    font-size: clamp(34px, 11vw, 54px);
    line-height: 1;
  }
  .section-head h2 {
    font-size: 34px;
  }
  .section-head p,
  .feature-card p,
  .hero-text {
    font-size: 15px;
  }
  .feature-card h3 {
    font-size: 24px;
  }
  .benefits-wrap {
    padding: 20px 12px 8px;
  }
  .cta-split {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }
  .timeline::before {
    left: 16px;
  }
  .timeline-item {
    width: 100%;
    justify-self: stretch !important;
    padding-left: 54px;
  }
  .modes-wrap,
  .faq-wrap{
    padding: 20px 12px 12px;
  }
  .mode-card h3{font-size:24px;}
  .footer-shell{
    grid-template-columns: 1fr;
  }
  .footer-links{justify-content:flex-start;}
  .lobby-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .lobby-shell .lobby-head.lobby-glass-panel {
    padding: 18px 16px 20px;
    border-radius: 18px;
    border-color: rgba(82, 132, 146, 0.38);
    background: rgba(11, 19, 23, 0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .lobby-head .hero-kicker {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .lobby-head h2 {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    margin-bottom: 6px;
  }
  .lobby-head .muted {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 0;
  }
  .lobby-head-trailing {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
  }
  .lobby-head-actions--primary {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: stretch;
    justify-content: stretch;
  }
  .lobby-head-actions--primary > .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    justify-content: center;
    padding: 12px 10px;
    font-size: 13px;
    border-radius: 14px;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.22) inset,
      0 10px 26px rgba(0, 210, 138, 0.28);
  }
  .lobby-head-form {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    display: flex;
  }
  .lobby-head-form .btn.lobby-btn-quick {
    width: 100%;
    flex: 1;
    justify-content: center;
    padding: 12px 10px;
    font-size: 13px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 52, 38, 0.95) 0%, rgba(8, 28, 22, 0.98) 100%) !important;
    border: 1px solid rgba(0, 210, 138, 0.55) !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06) inset,
      0 8px 22px rgba(0, 0, 0, 0.35);
  }
  .lobby-grid {
    grid-template-columns: 1fr;
  }
  .game-head {
    flex-wrap: wrap;
  }
  .game-frame {
    max-height: calc(100vh - 260px);
  }
  .auth-shell {
    min-height: auto;
    place-items: stretch;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.referral-page {
  display: grid;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.referral-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 210, 138, 0.12), transparent 42%),
    radial-gradient(circle at 88% 20%, rgba(56, 189, 248, 0.08), transparent 38%),
    linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid rgba(56, 96, 106, 0.55);
}
.referral-hero-text h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.02em;
}
.referral-kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(64, 104, 114, 0.85);
  background: rgba(7, 17, 20, 0.82);
  color: #9dc8d1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
}
.referral-hero-aside {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.referral-stat {
  min-width: 140px;
  border-radius: 14px;
  border: 1px solid #28464e;
  background: rgba(8, 16, 19, 0.75);
  padding: 12px 14px;
}
.referral-stat span {
  display: block;
  font-size: 12px;
  color: #8ea7ae;
  margin-bottom: 4px;
}
.referral-stat strong {
  font-size: 22px;
  font-weight: 800;
}
.referral-stat .referral-code {
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #00d28a;
}
.referral-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.referral-link-card h2,
.referral-steps-card h2,
.referral-table-card h2 {
  margin-top: 0;
}
.referral-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin-top: 14px;
}
.referral-url {
  flex: 1 1 220px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2f4f56;
  background: #081013;
  color: #c5dbe0;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.45;
}
.referral-copy-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.referral-copy-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: #00d28a;
}
.referral-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.referral-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #22373f;
  background: rgba(8, 16, 19, 0.55);
}
.referral-steps li span {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  background: rgba(0, 210, 138, 0.14);
  color: #00d28a;
  border: 1px solid rgba(0, 210, 138, 0.35);
}
.referral-steps li strong {
  display: block;
  margin-bottom: 4px;
}
.referral-steps li p {
  margin: 0;
  font-size: 14px;
}
.referral-table-head {
  margin-bottom: 12px;
}
.referral-table-head h2 {
  margin-bottom: 4px;
}
.referral-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #1f2e33;
}
.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}
.referral-table th,
.referral-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1f2e33;
  text-align: left;
}
.referral-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8ea7ae;
  background: #0c1619;
}
.referral-table tr:last-child td {
  border-bottom: 0;
}
.referral-empty {
  text-align: center;
  padding: 28px 16px;
}
.referral-empty p {
  margin: 0 0 16px;
  color: #8ea7ae;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Carteira (/wallet) */
.wallet-page {
  display: grid;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.wallet-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 210, 138, 0.14), transparent 42%),
    radial-gradient(circle at 92% 30%, rgba(56, 189, 248, 0.09), transparent 40%),
    linear-gradient(180deg, #0f171a, #0b1114);
  border: 1px solid rgba(56, 96, 106, 0.55);
}
.wallet-hero-main h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.02em;
}
.wallet-hero-lead {
  margin: 0;
  max-width: 460px;
  line-height: 1.5;
}
.wallet-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.wallet-stat {
  min-width: min(168px, 100%);
  flex: 1 1 140px;
  border-radius: 14px;
  border: 1px solid #28464e;
  background: rgba(8, 16, 19, 0.75);
  padding: 14px 16px;
  box-sizing: border-box;
}
.wallet-stat span {
  display: block;
  font-size: 12px;
  color: #8ea7ae;
  margin-bottom: 6px;
}
.wallet-stat strong {
  display: block;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ecf1f2;
  line-height: 1.15;
}
.wallet-stat--balance strong {
  color: #00d28a;
}
.wallet-ref-code {
  font-size: 17px !important;
  letter-spacing: 0.07em;
  color: #00d28a !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.wallet-stat--referral .wallet-foot-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #9dc8d1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.wallet-stat--referral .wallet-foot-link:hover {
  color: #00d28a;
  border-bottom-color: rgba(0, 210, 138, 0.45);
}
.wallet-actions-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: stretch;
  min-width: 0;
}
.wallet-action-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(0, 210, 138, 0.07), transparent 50%),
    radial-gradient(100% 60% at 90% 10%, rgba(56, 189, 248, 0.05), transparent 45%),
    linear-gradient(165deg, rgba(18, 28, 32, 0.95), rgba(9, 14, 17, 0.98));
  backdrop-filter: blur(8px);
}
.wallet-action-card--deposit {
  border-color: rgba(0, 210, 138, 0.28);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 210, 138, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.wallet-action-card--withdraw {
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(56, 189, 248, 0.1) inset,
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}
.wallet-action-card-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
  padding: 20px 20px 22px;
}
.wallet-action-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 2px;
}
.wallet-action-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: inherit;
}
.wallet-action-icon--in {
  background: linear-gradient(145deg, rgba(0, 210, 138, 0.22), rgba(0, 120, 80, 0.12));
  border: 1px solid rgba(0, 210, 138, 0.4);
  color: #6ee7b7;
  box-shadow: 0 8px 20px rgba(0, 210, 138, 0.12);
}
.wallet-action-icon--out {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(14, 99, 150, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #7dd3fc;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.12);
}
.wallet-action-title-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.wallet-action-title-text h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.wallet-action-head {
  margin-bottom: 0;
}
.wallet-action-desc {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.wallet-action-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 0 8px;
  min-height: 72px;
}
.wallet-action-middle--spacer {
  padding: 0;
  min-height: 0;
}
.wallet-quick-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wallet-quick-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b8a93;
}
.wallet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wallet-chip {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 9px 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(0, 210, 138, 0.35) !important;
  background: rgba(0, 210, 138, 0.06) !important;
  color: #a7f3d0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.wallet-chip:hover {
  background: rgba(0, 210, 138, 0.16) !important;
  border-color: rgba(0, 210, 138, 0.55) !important;
  transform: translateY(-1px);
}
.wallet-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 210, 138, 0.25) !important;
}
.wallet-form--panel {
  margin-top: auto;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(42, 72, 82, 0.85);
  background: rgba(5, 10, 13, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.wallet-field label {
  font-size: 12px;
  font-weight: 600;
  color: #9db6be;
  margin-bottom: 7px;
}
.wallet-action-card .wallet-field input,
.wallet-action-card .wallet-field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(56, 86, 98, 0.9);
  background: linear-gradient(180deg, #0d1519, #070c0f);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.wallet-action-card .wallet-field select {
  cursor: pointer;
  appearance: auto;
}
.wallet-action-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: fit-content;
}
.wallet-action-badge--in {
  background: rgba(0, 210, 138, 0.14);
  color: #86efac;
  border: 1px solid rgba(0, 210, 138, 0.42);
}
.wallet-action-badge--out {
  background: rgba(56, 189, 248, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(56, 189, 248, 0.38);
}
.wallet-form {
  display: grid;
  gap: 14px;
  margin-top: auto;
}
.wallet-form .form-row {
  margin: 0;
}
.wallet-form-span-all {
  grid-column: 1 / -1;
}
.wallet-form-submit {
  padding-top: 6px;
}
.wallet-btn {
  width: 100%;
  margin: 0 !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.wallet-btn svg {
  flex-shrink: 0;
  opacity: 0.92;
}
.wallet-btn--deposit {
  background: linear-gradient(180deg, #12f0a8 0%, #00c278 52%, #009962 100%) !important;
  color: #03140e !important;
  box-shadow:
    0 12px 28px rgba(0, 210, 138, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}
.wallet-btn--withdraw {
  background: linear-gradient(180deg, #5ac8fa 0%, #1ba8e8 48%, #0d7ebd 100%) !important;
  color: #031018 !important;
  box-shadow:
    0 12px 28px rgba(14, 165, 233, 0.33),
    inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}
.wallet-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}
.wallet-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.wallet-history-card h2 {
  margin-top: 0;
}
.wallet-table td {
  vertical-align: middle;
}
.wallet-tx-date {
  color: #b6c9cf;
  font-size: 13px;
  white-space: nowrap;
}
.wallet-tx-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wallet-tx-ref {
  font-size: 13px;
  color: #8ea7ae;
  word-break: break-all;
  max-width: 200px;
}
.wallet-type,
.wallet-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wallet-type--deposit {
  background: rgba(0, 210, 138, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(0, 210, 138, 0.28);
}
.wallet-type--withdraw {
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.wallet-type--prize {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.wallet-type--entry_fee {
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.22);
}
.wallet-type--bonus {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.28);
}
.wallet-status--pending {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.wallet-status--completed {
  background: rgba(0, 210, 138, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(0, 210, 138, 0.32);
}
.wallet-status--failed {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.32);
}
.wallet-empty p {
  margin-bottom: 0;
}

.wallet-result {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.wallet-result--win {
  background: rgba(0, 210, 138, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(0, 210, 138, 0.35);
}
.wallet-result--loss {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.32);
}
.wallet-result--open {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.wallet-result--forfeit,
.wallet-result--muted {
  background: rgba(142, 167, 174, 0.1);
  color: #b6c9cf;
  border: 1px solid rgba(90, 120, 130, 0.45);
}

.wallet-matches-card {
  min-width: 0;
  max-width: 100%;
}
.wallet-matches-card .referral-table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.wallet-matches-card .referral-table {
  width: 100%;
  table-layout: auto;
}

/* Histórico na carteira */
.wallet-history-card {
  min-width: 0;
  max-width: 100%;
}
.wallet-history-card .referral-table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.wallet-history-card .referral-table {
  width: 100%;
  table-layout: auto;
}
.wallet-tx-val {
  display: inline;
}

@media (max-width: 640px) {
  main.container:has(.wallet-page) {
    min-width: 0;
    overflow-x: clip;
  }
  .wallet-page {
    gap: 12px;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .wallet-hero.card {
    padding: 14px;
  }
  .wallet-hero-main {
    min-width: 0;
  }
  .wallet-hero-stats {
    flex-direction: column;
    width: 100%;
  }
  .wallet-stat {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
  .wallet-actions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .wallet-action-card-inner {
    padding: 14px 12px 16px;
  }
  .wallet-action-title-row {
    gap: 10px;
    align-items: center;
  }
  .wallet-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .wallet-action-middle {
    min-height: 0;
    padding-top: 12px;
  }
  .wallet-form--panel {
    padding: 12px;
  }
  .wallet-btn {
    padding: 13px 14px !important;
    font-size: 13px !important;
    gap: 8px;
  }
  .wallet-chip {
    min-width: 0;
    text-align: center;
    padding: 10px 10px !important;
  }
  .wallet-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .wallet-history-card.card {
    padding: 14px;
  }
  /* Histórico: um card por transação (layout legível no celular) */
  .wallet-history-card .referral-table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .wallet-history-card .referral-table {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }
  .wallet-history-card .referral-table thead {
    display: none;
  }
  .wallet-history-card .referral-table tbody {
    display: block;
  }
  .wallet-history-card .referral-table tbody tr {
    display: block;
    margin-bottom: 14px;
    padding: 14px 14px 8px;
    border-radius: 14px;
    border: 1px solid rgba(56, 96, 106, 0.65);
    background: rgba(8, 14, 18, 0.82);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  }
  .wallet-history-card .referral-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .wallet-history-card .referral-table tbody td {
    display: grid;
    grid-template-columns: minmax(76px, 38%) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(42, 72, 82, 0.5);
    vertical-align: middle;
  }
  .wallet-history-card .referral-table tbody td:last-child {
    border-bottom: none;
  }
  .wallet-history-card .referral-table tbody td::before {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8ea7ae;
  }
  .wallet-history-card .referral-table tbody td:nth-child(1)::before {
    content: 'Data';
  }
  .wallet-history-card .referral-table tbody td:nth-child(2)::before {
    content: 'Tipo';
  }
  .wallet-history-card .referral-table tbody td:nth-child(3)::before {
    content: 'Status';
  }
  .wallet-history-card .referral-table tbody td:nth-child(4)::before {
    content: 'Valor';
  }
  .wallet-history-card .referral-table tbody td:nth-child(5)::before {
    content: 'Ref.';
  }
  .wallet-history-card .referral-table tbody td .wallet-tx-val {
    display: block;
    justify-self: end;
    text-align: right;
    min-width: 0;
    font-size: 13px;
    color: #dce9ec;
  }
  .wallet-history-card .referral-table tbody td .wallet-tx-val .wallet-type,
  .wallet-history-card .referral-table tbody td .wallet-tx-val .wallet-status {
    white-space: nowrap;
    display: inline-flex;
    justify-content: flex-end;
    font-size: 12px;
    padding: 5px 10px;
  }
  .wallet-history-card .referral-table tbody td.wallet-tx-date .wallet-tx-val {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #b6c9cf;
    white-space: normal;
    line-height: 1.35;
  }
  .wallet-history-card .referral-table tbody td.wallet-tx-amount .wallet-tx-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .wallet-history-card .referral-table tbody td.wallet-tx-ref {
    align-items: flex-start;
  }
  .wallet-history-card .referral-table tbody td.wallet-tx-ref::before {
    margin-top: 3px;
  }
  .wallet-history-card .referral-table tbody td.wallet-tx-ref .wallet-tx-val {
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 12px;
    color: #8ea7ae;
    white-space: normal;
  }

  /* Partidas na carteira (6 colunas) */
  .wallet-matches-card.card {
    padding: 14px;
  }
  .wallet-matches-card .referral-table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .wallet-matches-card .referral-table {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: 13px;
  }
  .wallet-matches-card .referral-table thead {
    display: none;
  }
  .wallet-matches-card .referral-table tbody {
    display: block;
  }
  .wallet-matches-card .referral-table tbody tr {
    display: block;
    margin-bottom: 14px;
    padding: 14px 14px 8px;
    border-radius: 14px;
    border: 1px solid rgba(56, 96, 106, 0.65);
    background: rgba(8, 14, 18, 0.82);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  }
  .wallet-matches-card .referral-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .wallet-matches-card .referral-table tbody td {
    display: grid;
    grid-template-columns: minmax(88px, 38%) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(42, 72, 82, 0.5);
    vertical-align: middle;
  }
  .wallet-matches-card .referral-table tbody td:last-child {
    border-bottom: none;
  }
  .wallet-matches-card .referral-table tbody td::before {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8ea7ae;
  }
  .wallet-matches-card .referral-table tbody td:nth-child(1)::before {
    content: 'Data';
  }
  .wallet-matches-card .referral-table tbody td:nth-child(2)::before {
    content: 'Adversário';
  }
  .wallet-matches-card .referral-table tbody td:nth-child(3)::before {
    content: 'Sala';
  }
  .wallet-matches-card .referral-table tbody td:nth-child(4)::before {
    content: 'Placar';
  }
  .wallet-matches-card .referral-table tbody td:nth-child(5)::before {
    content: 'Resultado';
  }
  .wallet-matches-card .referral-table tbody td:nth-child(6)::before {
    content: 'Prêmio';
  }
  .wallet-matches-card .referral-table tbody td .wallet-tx-val {
    display: block;
    justify-self: end;
    text-align: right;
    min-width: 0;
    font-size: 13px;
    color: #dce9ec;
  }
  .wallet-matches-card .referral-table tbody td.wallet-match-date .wallet-tx-val {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #b6c9cf;
    white-space: normal;
    line-height: 1.35;
  }
  .wallet-matches-card .referral-table tbody td.wallet-match-prize .wallet-tx-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .wallet-matches-card .referral-table tbody td.wallet-match-result .wallet-tx-val {
    display: flex;
    justify-content: flex-end;
  }
  .wallet-matches-card .referral-table tbody td.wallet-match-result .wallet-result {
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .referral-link-row {
    flex-direction: column;
  }
  .referral-copy-btn {
    width: 100%;
  }
}
