/* FOW Trading Desk — estilo do jogo (usa as variáveis do styles.css). */
body[data-page="game"] {
  background: var(--ink);
  color: var(--white);
}

.g-page {
  padding-top: 120px;
  min-height: 100vh;
}

.g-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.g-px {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.g-ico { width: 18px; height: 18px; vertical-align: -3px; }
.g-ico-lg { width: 36px; height: 36px; flex-shrink: 0; }
.g-muted { color: rgba(255, 255, 255, 0.5); font-size: 0.82rem; }
.g-ok { color: var(--ok); font-size: 0.82rem; }
.g-link { background: none; border: 0; color: var(--teal-bright); cursor: pointer; font-size: 0.78rem; padding: 0; }
.g-btn { padding: 8px 12px; font-size: 0.8rem; white-space: nowrap; }
.g-price { display: inline-flex; align-items: center; gap: 4px; }
.g-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.g-tag.is-ok { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.g-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  border: 1px solid rgba(225, 167, 85, 0.4);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
}

.g-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
}

/* HUD */
.g-hud {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr 0.8fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.g-who strong { font-family: var(--font-display); font-size: 1.1rem; }
.g-who .g-link { display: block; margin-top: 2px; }
.g-stat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; }
.g-stat small { color: rgba(255, 255, 255, 0.5); }
.g-coins strong { font-family: var(--font-display); font-size: 1.4rem; color: #fde68a; }
.g-bar {
  flex: 1 1 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.g-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0f766e, #2dd4bf); }

/* Mesa */
.g-main { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.g-desk {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 16px 16px,
    #0c1a22;
  border: 1px solid rgba(45, 212, 191, 0.25);
}
.g-slot {
  position: relative;
  min-height: 150px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
}
.g-slot.is-bot { border-style: solid; border-color: rgba(45, 212, 191, 0.35); background: rgba(45, 212, 191, 0.05); }
.g-slot.is-pro { border-color: rgba(225, 167, 85, 0.5); background: rgba(225, 167, 85, 0.06); }
.g-slot.is-dim { opacity: 0.4; }
.g-slot-name { font-family: var(--font-mono); font-size: 0.72rem; color: rgba(255, 255, 255, 0.65); }
.g-monitor { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; opacity: 0.5; animation: g-blink 2.4s steps(2) infinite; }
.g-deskimg { width: 40px; height: 40px; opacity: 0.55; }
.g-bot {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  animation: g-bob 2.2s ease-in-out infinite;
}
.g-slot:nth-child(2) .g-bot { animation-delay: 0.4s; }
.g-slot:nth-child(3) .g-bot { animation-delay: 0.8s; }
.g-slot:nth-child(4) .g-bot { animation-delay: 1.2s; }
.g-slot:nth-child(5) .g-bot { animation-delay: 1.6s; }
.g-slot:nth-child(6) .g-bot { animation-delay: 2s; }
@keyframes g-bob { 50% { transform: translateY(-5px); } }
@keyframes g-blink { 50% { opacity: 0.15; } }

/* Visual dos bots */
.g-bot.skin-skin_neon { filter: drop-shadow(0 0 8px #22d3ee) drop-shadow(0 0 2px #f0abfc) saturate(1.6); }
.g-bot.skin-skin_gold { filter: sepia(1) saturate(4) hue-rotate(-12deg) drop-shadow(0 0 8px rgba(250, 204, 21, 0.7)); }

/* Temas da mesa */
.g-desk.theme-desk_neon { background-color: #170b2b; border-color: rgba(240, 171, 252, 0.5); box-shadow: 0 0 30px rgba(240, 171, 252, 0.15) inset; }
.g-desk.theme-desk_gold { background-color: #221a08; border-color: rgba(250, 204, 21, 0.55); box-shadow: 0 0 30px rgba(250, 204, 21, 0.12) inset; }
.g-desk.theme-desk_matrix { background-color: #04140a; border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 0 30px rgba(74, 222, 128, 0.12) inset; }
.g-swatch { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; background: #0c1a22; border: 1px solid rgba(255, 255, 255, 0.15); }
.sw-desk_neon { background: #170b2b; border-color: #f0abfc; }
.sw-desk_gold { background: #221a08; border-color: #facc15; }
.sw-desk_matrix { background: #04140a; border-color: #4ade80; }
.sw-skin_neon { background: radial-gradient(circle, #22d3ee, #170b2b); }
.sw-skin_gold { background: radial-gradient(circle, #facc15, #221a08); }
.sw-title_sniper, .sw-title_whale, .sw-title_diamond { background: rgba(225, 167, 85, 0.15); border-color: rgba(225, 167, 85, 0.5); }

/* Cofre */
.g-vault { text-align: center; }
.g-vault-top { display: flex; align-items: center; justify-content: center; gap: 12px; }
.g-vault-top img { width: 56px; height: 56px; }
.g-vault.is-full .g-vault-top img { animation: g-shake 0.6s ease-in-out infinite; }
@keyframes g-shake { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.g-pending { font-family: var(--font-display); font-size: 2.2rem; color: #fde68a; line-height: 1; }
.g-vault .g-bar { margin: 14px 0 8px; height: 10px; }
.g-vault.is-full .g-bar i { background: linear-gradient(90deg, #b45309, #facc15); }
.g-vault.is-full #gFullIn { color: var(--gold); }
.g-collect { width: 100%; margin-top: 12px; font-size: 1rem; padding: 14px; }

/* Abas */
.g-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 12px; }
.g-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}
.g-tabs button.is-active { background: var(--teal-bright); color: #04201d; border-color: transparent; font-weight: 600; }
.g-list { display: grid; gap: 10px; }
.g-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.g-row.is-done { opacity: 0.6; }
.g-row-text { flex: 1; display: grid; gap: 3px; min-width: 0; }
.g-row-text small { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.g-h3 { font-family: var(--font-display); font-size: 1rem; margin: 16px 0 10px; }
.g-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.g-badge {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.45;
}
.g-badge.is-on { opacity: 1; border-color: rgba(225, 167, 85, 0.45); background: rgba(225, 167, 85, 0.07); }
.g-badge small { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); }
.g-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.g-table th, .g-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; }
.g-table .g-num { text-align: right; font-family: var(--font-mono); }
.g-table tr.is-me td { background: rgba(45, 212, 191, 0.08); }

/* Snipe the Dip */
#gChart { width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.08); display: block; margin: 10px 0; }
.g-snipe-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); }
.g-buy { background: #059669; color: #fff; min-width: 140px; }
.g-sell { background: #e11d48; color: #fff; min-width: 140px; }

/* Avisos */
.g-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.g-toast {
  padding: 12px 14px;
  border-radius: 10px;
  background: #11161b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: opacity 0.5s, transform 0.5s;
}
.g-toast.is-ok { border-color: rgba(52, 211, 153, 0.5); }
.g-toast.is-gold { border-color: rgba(250, 204, 21, 0.6); color: #fde68a; }
.g-toast.is-bad { border-color: rgba(251, 113, 133, 0.6); color: #fecdd3; }
.g-toast.is-out { opacity: 0; transform: translateY(8px); }

.g-login { max-width: 560px; }
.g-credits { margin-top: 28px; text-align: center; }

@media (max-width: 900px) {
  .g-hud { grid-template-columns: 1fr 1fr; }
  .g-main { grid-template-columns: 1fr; }
  .g-desk { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .g-desk { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .g-slot { min-height: 130px; }
  .g-bot { width: 52px; height: 52px; }
  .g-row { flex-wrap: wrap; }
}
