/* ============================================================
   Pega Galinha - Stylesheet
   ============================================================ */
:root {
  --pg-purple: #6c63ff;
  --pg-pink:   #e040fb;
  --pg-yellow: #ffd700;
  --pg-dark:   #0f0e17;
  --pg-card:   #1a1a2e;
  --pg-border: #2d2d4e;
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--pg-dark);
  color: #e8e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Navbar ---- */
.pg-navbar {
  background: rgba(15,14,23,.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pg-border);
}
.pg-navbar .navbar-brand { font-size: 1.3rem; letter-spacing: -0.5px; }
.coins-badge {
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.4);
  border-radius: 20px;
  color: #ffd700;
  font-size: .9rem;
}
.pg-avatar-btn { background: rgba(108,99,255,.2); border: 1px solid rgba(108,99,255,.5); border-radius: 20px; }
.avatar-circle-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.avatar-circle-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: #fff;
}

/* ---- Offcanvas ---- */
.pg-offcanvas { background: var(--pg-card); border-right: 1px solid var(--pg-border); }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  color: #ccc; text-decoration: none;
  padding: 12px 16px; border-radius: 10px;
  font-weight: 600; transition: all .2s;
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(108,99,255,.2); color: #fff; }
.sidebar-link.highlight { background: linear-gradient(135deg,var(--pg-purple),var(--pg-pink)); color: #fff !important; }
.sidebar-link i { font-size: 1.1rem; }

/* ---- Cards ---- */
.pg-card {
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 16px;
  transition: transform .2s, box-shadow .2s;
}
.pg-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(108,99,255,.2); }

/* ---- Buttons ---- */
.pg-btn-primary {
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  border: none; color: #fff; font-weight: 700; border-radius: 10px;
  transition: opacity .2s, transform .1s;
}
.pg-btn-primary:hover { opacity: .92; transform: translateY(-1px); color: #fff; }
.pg-btn-primary:active { transform: translateY(0); }

.pg-btn-yellow {
  background: linear-gradient(135deg, #f7b731, #ffd700);
  border: none; color: #1a1200; font-weight: 800; border-radius: 10px;
  letter-spacing: .3px;
  box-shadow: 0 4px 18px rgba(247,183,49,.35);
  transition: opacity .2s, transform .15s, box-shadow .2s;
}
/* min-width apenas no botão JOGAR AGORA da home */
.pg-card .text-center .pg-btn-yellow {
  min-width: 220px;
}
.pg-btn-yellow:hover {
  opacity: .92; color: #1a1200;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(247,183,49,.5);
}
.pg-btn-yellow:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(247,183,49,.3); }

/* ---- Forms ---- */
.pg-form-control {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--pg-border);
  border-radius: 10px; color: #fff;
  padding: 12px 16px; font-size: 1rem;
}
.pg-form-control:focus {
  background: rgba(255,255,255,.08);
  border-color: var(--pg-purple);
  box-shadow: 0 0 0 3px rgba(108,99,255,.25);
  color: #fff;
}
.pg-form-control::placeholder { color: #666; }
.form-label { font-weight: 600; color: #bbb; margin-bottom: 6px; }

/* ---- Auth pages ---- */
.auth-wrap {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, rgba(108,99,255,.15) 0%, transparent 60%),
              radial-gradient(ellipse at bottom, rgba(224,64,251,.1) 0%, transparent 60%),
              var(--pg-dark);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 20px;
  padding: 40px; width: 100%; max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.auth-logo { font-size: 3rem; text-align: center; margin-bottom: 8px; }
.auth-title { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-subtitle { color: #888; text-align: center; margin-bottom: 28px; font-size: .95rem; }

/* ---- Hero ---- */
.pg-hero {
  background: radial-gradient(ellipse at top, rgba(108,99,255,.2) 0%, transparent 60%),
              radial-gradient(ellipse at bottom right, rgba(224,64,251,.15) 0%, transparent 60%),
              var(--pg-dark);
  padding: 80px 0 60px;
  text-align: center;
}
.pg-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
.pg-hero .lead { font-size: 1.15rem; color: #aaa; max-width: 600px; margin: 0 auto 32px; }
.hero-emoji { font-size: clamp(3rem, 8vw, 6rem); line-height: 1; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ---- Stats ---- */
.stat-card {
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 16px; padding: 24px;
  text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 900; }
.stat-card .stat-label { color: #888; font-size: .875rem; margin-top: 4px; }

/* ---- Characters ---- */
.char-card {
  background: var(--pg-card);
  border: 2px solid var(--pg-border);
  border-radius: 16px;
  padding: 16px 12px 12px;
  text-align: center;
  transition: all .25s;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.char-card-btn {
  margin-top: auto;
  padding-top: 10px;
}
.char-card-btn .btn {
  width: 100%;
  font-size: .82rem;
  padding: .48rem .5rem;
  border-radius: 8px;
}
.char-card-btn form {
  width: 100%;
  margin: 0;
  padding: 0;
}
.char-card-btn form .btn {
  width: 100%;
  font-size: .82rem;
  padding: .48rem .5rem;
  border-radius: 8px;
}
.char-card:hover { border-color: var(--pg-purple); transform: translateY(-4px); }
.char-card.selected { border-color: #ffd700; box-shadow: 0 0 20px rgba(255,215,0,.3); }
.char-card.locked { opacity: .7; }
.char-emoji { font-size: 3rem; line-height: 1.2; margin-bottom: 8px; }
.char-name { font-weight: 700; font-size: .95rem; }
.char-price { font-size: .85rem; color: #ffd700; }
.char-badge {
  position: absolute; top: -8px; right: -8px;
  background: linear-gradient(135deg,var(--pg-purple),var(--pg-pink));
  color: #fff; font-size: .7rem; font-weight: 800;
  padding: 3px 8px; border-radius: 12px;
}

/* ---- Game page ---- */
.game-wrap {
  background: var(--pg-dark);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.game-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: linear-gradient(180deg, rgba(8,6,18,.95) 0%, rgba(8,6,18,.75) 65%, transparent 100%);
  border-bottom: none;
  padding: 10px 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  backdrop-filter: blur(2px);
}
.hud-item {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px; padding: 5px 14px;
  font-weight: 800; font-size: .95rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hud-item.timer { color: #ffd700; }
.hud-item.score { color: #6c63ff; }
#gameCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  border: none;
  cursor: crosshair;
}
.game-container {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  background: #000;
}
.game-controls-info {
  display: none;
}

/* ---- Virtual Joystick (Mobile) - Subway Surfers style ---- */
#joystickWrap {
  position: fixed; bottom: 28px;
  left: 50%; transform: translateX(-50%);
  display: none; z-index: 150;
  align-items: flex-end; gap: 18px;
}
#jumpBtn {
  width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255,200,80,1) 0%, rgba(220,100,0,.95) 100%);
  border: 3px solid rgba(255,255,255,.35);
  box-shadow: 0 4px 18px rgba(220,100,0,.5);
  color: #fff; font-size: 1.1rem; font-weight: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; touch-action: manipulation; user-select: none;
  line-height: 1.1; gap: 0;
  transition: transform .1s, box-shadow .1s;
}
#jumpBtn span { font-size: .55rem; letter-spacing: .5px; }
#jumpBtn:active { transform: scale(.92); box-shadow: 0 2px 8px rgba(220,100,0,.4); }
#joystickBase {
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.18);
  position: relative; touch-action: none;
}
#joystickKnob {
  width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(170,155,255,1) 0%, rgba(108,63,255,.95) 100%);
  box-shadow: 0 0 28px rgba(108,99,255,.65), inset 0 1px 0 rgba(255,255,255,.35);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: none; pointer-events: none;
}
@media (max-width: 768px) {
  #joystickWrap { display: flex; }
}

/* ---- Lobby ---- */
.lobby-card {
  background: var(--pg-card);
  border: 2px solid var(--pg-border);
  border-radius: 20px; padding: 32px;
  max-width: 560px; margin: 0 auto;
}
.lobby-player {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--pg-border);
  border-radius: 12px; padding: 12px 16px;
}

/* ---- Shop ---- */
.plan-card {
  background: var(--pg-card);
  border: 2px solid var(--pg-border);
  border-radius: 20px; padding: 32px 24px;
  text-align: center; position: relative;
  transition: all .25s;
}
.plan-card:hover { border-color: var(--pg-purple); transform: translateY(-6px); }
.plan-card.popular { border-color: var(--pg-yellow); }
.plan-card .plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,#f7b731,#ffd700);
  color: #1a1200; font-size: .75rem; font-weight: 800;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}
.plan-price { font-size: 2.4rem; font-weight: 900; }
.plan-price sup { font-size: 1rem; vertical-align: super; }
.plan-coins { font-size: 1.4rem; color: #ffd700; font-weight: 800; }

/* ---- Groups / Chat ---- */
.group-card {
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 16px; padding: 20px;
  cursor: pointer; transition: all .2s;
}
.group-card:hover { border-color: var(--pg-purple); transform: translateY(-3px); }
.group-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  flex-shrink: 0;
}
.chat-wrap {
  height: calc(100vh - 200px);
  min-height: 400px;
  display: flex; flex-direction: column;
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 16px; overflow: hidden;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: var(--pg-border) transparent;
}
.chat-msg { display: flex; gap: 10px; align-items: flex-end; }
.chat-msg.own { flex-direction: row-reverse; }
.chat-bubble {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--pg-border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px; max-width: 75%; font-size: .92rem;
}
.chat-msg.own .chat-bubble {
  background: rgba(108,99,255,.25);
  border-color: rgba(108,99,255,.4);
  border-radius: 14px 14px 4px 14px;
}
.chat-time { font-size: .7rem; color: #666; margin-top: 3px; }
.chat-input-wrap {
  padding: 12px; border-top: 1px solid var(--pg-border);
  display: flex; gap: 8px;
}

/* ---- Admin ---- */
.admin-sidebar {
  width: 240px; min-height: 100vh;
  background: var(--pg-card);
  border-right: 1px solid var(--pg-border);
  padding: 24px 0; flex-shrink: 0;
}
.admin-sidebar .admin-logo { padding: 0 20px 20px; border-bottom: 1px solid var(--pg-border); }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: #aaa; text-decoration: none;
  font-weight: 600; transition: all .2s;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(108,99,255,.15); color: #fff;
  border-left: 3px solid var(--pg-purple);
}
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }
.admin-wrap { display: flex; min-height: 100vh; }

/* ---- Tables ---- */
.pg-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.pg-table th {
  background: rgba(108,99,255,.1);
  color: #bbb; font-weight: 700; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 16px;
}
.pg-table td { padding: 12px 16px; border-top: 1px solid var(--pg-border); vertical-align: middle; }
.pg-table tr:hover td { background: rgba(255,255,255,.02); }

/* ---- Badges ---- */
.badge-status-pending  { background: rgba(255,193,7,.15); color: #ffc107; border: 1px solid rgba(255,193,7,.3); }
.badge-status-active   { background: rgba(40,167,69,.15); color: #28a745; border: 1px solid rgba(40,167,69,.3); }
.badge-status-cancelled{ background: rgba(220,53,69,.15); color: #dc3545; border: 1px solid rgba(220,53,69,.3); }
.badge-status-failed   { background: rgba(220,53,69,.15); color: #dc3545; border: 1px solid rgba(220,53,69,.3); }
.badge-admin { background: rgba(224,64,251,.15); color: #e040fb; border: 1px solid rgba(224,64,251,.3); }

/* ---- Dropdown overrides ---- */
.dropdown-menu {
  background: #1e1e35; border: 1px solid var(--pg-border);
  border-radius: 12px; overflow: hidden;
}
.dropdown-item { color: #ccc; padding: 10px 16px; font-weight: 600; }
.dropdown-item:hover { background: rgba(108,99,255,.2); color: #fff; }
.dropdown-divider { border-color: var(--pg-border); }

/* ---- Footer ---- */
.pg-footer {
  background: var(--pg-card);
  border-top: 1px solid var(--pg-border);
  color: #888;
}

/* ---- Utilities ---- */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.text-purple { color: var(--pg-purple); }
.bg-purple { background: var(--pg-purple); }
.gradient-text {
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.section-sub { color: #888; margin-bottom: 28px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pg-border); border-radius: 3px; }

/* ---- Loading spinner ---- */
.pg-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid var(--pg-border);
  border-top-color: var(--pg-purple);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Game end modal ---- */
#gameEndModal .modal-content {
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 20px;
}
#gameEndModal .modal-header { border-bottom-color: var(--pg-border); }

/* ---- Responsive tweaks ---- */
@media (max-width: 576px) {
  .auth-card { padding: 28px 20px; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 16px; }
  .plan-card { padding: 24px 16px; }
}

/* ---- Game 3D Canvas Enhancements ---- */
#gameCanvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---- Coins animation (shop) ---- */
.coins-anim { animation: coinFloat 3s ease-in-out infinite; }
@keyframes coinFloat {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}
.plan-card { transition: all .3s cubic-bezier(.175,.885,.32,1.275); }
.plan-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 24px 60px rgba(108,99,255,.25); }
.plan-card.popular:hover { box-shadow: 0 24px 60px rgba(255,215,0,.25); }

/* ---- PIX QR animation ---- */
.pix-qr-wrapper { animation: pixPulse 2s ease-in-out infinite; }
@keyframes pixPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(50,187,170,.4); }
  50%      { box-shadow: 0 0 0 12px rgba(50,187,170,0); }
}

/* ---- Particle canvas overlay ---- */
#gameCanvas { border-radius: 0; }

/* ---- HUD animation ---- */
.hud-item { transition: transform .1s; }
.hud-item.score.bump { animation: hudBump .3s ease; }
@keyframes hudBump {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.3); color: #ffd700; }
}

/* ---- Character select active glow ---- */
.char-card.selected {
  box-shadow: 0 0 0 3px #ffd700, 0 0 30px rgba(255,215,0,.4) !important;
}

/* ---- Scenario badge (game) ---- */
.scenario-badge {
  position: fixed; bottom: 200px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.6); backdrop-filter: blur(8px);
  color: #fff; padding: 6px 20px; border-radius: 20px;
  font-size: .8rem; font-weight: 700; pointer-events: none;
  animation: sceneBadge 3s ease forwards;
  z-index: 50;
}
@keyframes sceneBadge {
  0%  { opacity:0; transform:translateX(-50%) translateY(10px); }
  15% { opacity:1; transform:translateX(-50%) translateY(0); }
  80% { opacity:1; }
  100%{ opacity:0; }
}

/* ---- Mobile game buttons ---- */
.mobile-catch-btn {
  position: fixed; bottom: 30px; right: 30px;
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg,var(--pg-purple),var(--pg-pink));
  border: none; color: #fff; font-size: 2rem;
  box-shadow: 0 8px 30px rgba(108,99,255,.5);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
}
@media (max-width: 768px) {
  .mobile-catch-btn { display: flex; }
}

/* ---- Scrollbar improvements ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: rgba(108,99,255,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108,99,255,.7); }

/* ---- Milestone Overlay ---- */
#milestoneOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  pointer-events: none;
  opacity: 0;
}
#milestoneOverlay.show {
  animation: milestoneAnim 2.6s ease forwards;
}
@keyframes milestoneAnim {
  0%   { opacity:0; }
  10%  { opacity:1; }
  75%  { opacity:1; }
  100% { opacity:0; }
}
.milestone-glow {
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px #ffd700, 0 0 60px #ff8c00, 0 2px 4px rgba(0,0,0,.8);
  text-align: center;
  padding: 0 1rem;
  line-height: 1.2;
}
.milestone-sub {
  font-size: clamp(1rem, 4vw, 1.6rem);
  color: #ffd700;
  font-weight: 800;
  margin-top: .5rem;
  text-shadow: 0 0 20px rgba(255,215,0,.8);
  text-align: center;
}
.milestone-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,180,0,.18) 0%, transparent 70%);
}

/* ---- Wave Event Banner ---- */
#waveBanner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1250;
  background: linear-gradient(135deg, #ff6b00, #ff0057);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  padding: 10px 28px;
  border-radius: 30px;
  box-shadow: 0 8px 30px rgba(255,80,0,.5);
  pointer-events: none;
  display: none;
  white-space: nowrap;
}
#waveBanner.show {
  display: block;
  animation: waveBannerAnim 2.5s ease forwards;
}
@keyframes waveBannerAnim {
  0%   { opacity:0; transform:translateX(-50%) translateY(-12px); }
  12%  { opacity:1; transform:translateX(-50%) translateY(0); }
  80%  { opacity:1; }
  100% { opacity:0; transform:translateX(-50%) translateY(-8px); }
}

/* ---- Mute Button ---- */
#muteBtn {
  position: fixed;
  bottom: 200px;
  right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18);
  background: rgba(20,18,40,.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: transform .15s;
}
#muteBtn:hover { transform: scale(1.12); }

/* ---- Reaction Bar ---- */
#reactionBar {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.react-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18);
  background: rgba(20,18,40,.75);
  backdrop-filter: blur(8px);
  font-size: 1.55rem;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), border-color .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.react-btn:hover  { transform: scale(1.18); border-color: rgba(255,255,255,.45); }
.react-btn:active { transform: scale(.92); }
.react-btn.fired  { animation: reactPop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes reactPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ---- Reaction Feed (mensagens flutuantes) ---- */
#reactionFeed {
  position: fixed;
  bottom: 210px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1210;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}
.react-toast {
  background: rgba(20,18,40,.88);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) forwards, toastOut .4s ease 2.2s forwards;
  display: flex; align-items: center; gap: 8px;
}
.react-toast .toast-name {
  color: #a78bfa;
  font-size: .78rem;
  font-weight: 800;
}
@keyframes toastIn {
  from { opacity:0; transform: translateY(16px) scale(.85); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity:1; }
  to   { opacity:0; transform: translateY(-10px); }
}

/* ============================================================
   Level Map
   ============================================================ */
.level-map-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(108,99,255,.3) transparent;
}
.level-map-track {
  display: flex;
  align-items: center;
  min-width: max-content;
  padding: 16px 8px 8px;
  gap: 0;
}

/* Connectors */
.lm-connector {
  flex-shrink: 0;
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  position: relative;
  top: -10px;
}
.lm-connector-done {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  box-shadow: 0 0 8px rgba(255,200,0,.35);
}

/* Nodes */
.lm-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
}

/* Circle */
.lm-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid transparent;
  transition: transform .2s;
}
.lm-node:hover .lm-circle { transform: scale(1.1); }

.lm-done .lm-circle {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border-color: rgba(255,215,0,.5);
  box-shadow: 0 4px 16px rgba(255,180,0,.35);
}
.lm-current .lm-circle {
  background: linear-gradient(135deg, var(--pg-purple), var(--pg-pink));
  border-color: rgba(224,64,251,.6);
  box-shadow: 0 0 0 0 rgba(108,99,255,.6);
  animation: lvlPulse 1.8s ease-in-out infinite;
}
.lm-future .lm-circle {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
@keyframes lvlPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(108,99,255,.6); }
  50%      { box-shadow: 0 0 0 10px rgba(108,99,255,0); }
}

.lm-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.lm-future .lm-icon { opacity: .35; filter: grayscale(1); }

/* Player pin */
.lm-player-pin {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
  animation: pinBounce 1.2s ease-in-out infinite;
}
@keyframes pinBounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-5px); }
}

/* Labels */
.lm-label { text-align: center; }
.lm-level-num {
  font-size: .7rem;
  font-weight: 900;
  color: rgba(255,255,255,.5);
  line-height: 1;
}
.lm-done .lm-level-num   { color: #ffd700; }
.lm-current .lm-level-num{ color: #c084fc; }
.lm-level-name {
  font-size: .65rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lm-done .lm-level-name    { color: rgba(255,215,0,.7); }
.lm-current .lm-level-name { color: rgba(192,132,252,.9); font-weight: 700; }

/* ============================================================
   Farm Map – Mobile Vertical
   ============================================================ */
.farm-map-card {
  border-radius: 20px;
  overflow: hidden;
  background: #0d1b0a;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* Header */
.fmc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  background: linear-gradient(135deg,rgba(108,99,255,.25),rgba(224,64,251,.15));
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-wrap: wrap;
  gap: 6px;
}
.fmc-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
}
.fmc-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
}
.fmc-badge {
  font-size: .85rem;
  font-weight: 800;
  color: #ffd700;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.fmc-lvname {
  font-size: .7rem;
  color: rgba(255,215,0,.65);
  font-weight: 600;
}

/* Scene */
.fmc-scene {
  position: relative;
  width: 100%;
  /* gradient: sky → mountains → mid-grass → ground */
  background:
    linear-gradient(180deg,
      #0d1b4a  0%,
      #1a3a6b  8%,
      #2d5a3d 28%,
      #1e4228 42%,
      #2a6b30 55%,
      #33803a 68%,
      #3d9040 80%,
      #4aaa48 100%
    );
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

/* SVG path overlay */
.fmc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Decorações */
.fmc-deco {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
  line-height: 1;
}

/* Nodes */
.fmc-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: default;
}

.fmn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 3px solid transparent;
  transition: transform .2s;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.fmc-node:hover .fmn-circle { transform: scale(1.12); }

.fmn-done .fmn-circle {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border-color: rgba(255,215,0,.6);
  box-shadow: 0 4px 16px rgba(255,180,0,.45);
}
.fmn-current .fmn-circle {
  background: linear-gradient(135deg, #6c63ff, #e040fb);
  border-color: rgba(224,64,251,.7);
  animation: fmnPulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(108,99,255,.7);
}
.fmn-future .fmn-circle {
  background: rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.1);
  opacity: .55;
  filter: grayscale(.7);
}
@keyframes fmnPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(108,99,255,.7); }
  50%      { box-shadow: 0 0 0 12px rgba(108,99,255,0); }
}

/* Player pin above current node */
.fmn-player {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.7));
  animation: fmnBounce 1.1s ease-in-out infinite;
  z-index: 10;
}
@keyframes fmnBounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-7px); }
}

/* Node labels */
.fmn-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  gap: 1px;
}
.fmn-num {
  font-size: .62rem;
  font-weight: 900;
  color: rgba(255,255,255,.55);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.fmn-name {
  font-size: .58rem;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.fmn-done .fmn-num  { color: #ffd700; }
.fmn-done .fmn-name { color: rgba(255,215,0,.7); }
.fmn-current .fmn-num  { color: #c084fc; }
.fmn-current .fmn-name { color: rgba(192,132,252,.85); font-weight: 700; }

/* Footer */
.fmc-footer {
  padding: 12px 18px 14px;
  background: rgba(0,0,0,.35);
  border-top: 1px solid rgba(255,255,255,.07);
}
.fmc-prog-label {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 6px;
}
.fmc-prog-bar {
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.fmc-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c63ff, #e040fb);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(108,99,255,.6);
  transition: width 1.2s cubic-bezier(.34,1.56,.64,1);
}
.fmc-prog-hint {
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  text-align: center;
}

/* ============================================================
   DARK-THEME OVERRIDES — força texto claro em todo o site
   ============================================================ */

/* Base global */
body, .modal-body, .modal-footer, .modal-header,
.card-body, .card-header, .card-footer,
.list-group-item, .dropdown-menu {
  color: #e8e8f0;
}

/* Modal — fundo escuro em todos os modais */
.modal-content {
  background: #1a1a2e !important;
  border: 1px solid #2d2d4e !important;
  color: #e8e8f0 !important;
}
.modal-header {
  border-bottom-color: #2d2d4e !important;
  background: rgba(15,14,23,.8) !important;
}
.modal-footer {
  border-top-color: #2d2d4e !important;
}

/* Alertas Bootstrap */
.alert {
  color: #e8e8f0 !important;
}
.alert-primary   { background: rgba(108,99,255,.25) !important; border-color: rgba(108,99,255,.5) !important; }
.alert-secondary { background: rgba(108,117,125,.25) !important; border-color: rgba(108,117,125,.5) !important; }
.alert-success   { background: rgba(25,135,84,.25)  !important; border-color: rgba(25,135,84,.5)  !important; }
.alert-danger    { background: rgba(220,53,69,.25)   !important; border-color: rgba(220,53,69,.5)   !important; }
.alert-warning   { background: rgba(255,193,7,.2)    !important; border-color: rgba(255,193,7,.5)   !important; }
.alert-info      { background: rgba(13,202,240,.2)   !important; border-color: rgba(13,202,240,.5)  !important; }
.alert-light     { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.2) !important; }
.alert-dark      { background: rgba(33,37,41,.5)     !important; border-color: rgba(255,255,255,.15) !important; }

/* Botões outline-secondary → tema claro */
.btn-outline-secondary {
  color: #c0bfd8 !important;
  border-color: #6c6c8a !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #fff !important;
  background: rgba(108,117,125,.35) !important;
  border-color: #9d9dba !important;
}

/* Botões outline-light */
.btn-outline-light {
  color: #e8e8f0 !important;
  border-color: rgba(255,255,255,.55) !important;
}
.btn-outline-light:hover,
.btn-outline-light:focus {
  color: #0f0e17 !important;
  background: #e8e8f0 !important;
}

/* Botões coloridos — forçar texto branco */
.btn-warning  { color: #0f0e17 !important; }   /* amarelo fica melhor com preto */
.btn-success  { color: #fff !important; }
.btn-danger   { color: #fff !important; }
.btn-info     { color: #0f0e17 !important; }
.btn-primary  { color: #fff !important; }
.btn-secondary{ color: #fff !important; }

/* Botões outline coloridos */
.btn-outline-success { color: #5cb85c !important; border-color: #5cb85c !important; }
.btn-outline-success:hover { color: #fff !important; background: rgba(92,184,92,.3) !important; }
.btn-outline-danger  { color: #e57373 !important; border-color: #e57373 !important; }
.btn-outline-danger:hover  { color: #fff !important; background: rgba(229,115,115,.3) !important; }
.btn-outline-warning { color: #ffd700 !important; border-color: #ffd700 !important; }
.btn-outline-warning:hover { color: #0f0e17 !important; background: rgba(255,215,0,.3) !important; }
.btn-outline-info    { color: #4dd0e1 !important; border-color: #4dd0e1 !important; }
.btn-outline-info:hover    { color: #0f0e17 !important; background: rgba(77,208,225,.3) !important; }
.btn-outline-primary { color: #8b83ff !important; border-color: #8b83ff !important; }
.btn-outline-primary:hover { color: #fff !important; background: rgba(108,99,255,.35) !important; }

/* Badges */
.badge.bg-secondary { color: #fff !important; }
.badge.bg-light     { color: #0f0e17 !important; }

/* Formulários — inputs dentro de modais e cards */
.form-control, .form-select {
  background: rgba(255,255,255,.07) !important;
  color: #e8e8f0 !important;
  border-color: #2d2d4e !important;
}
.form-control::placeholder { color: rgba(232,232,240,.4) !important; }
.form-control:focus, .form-select:focus {
  background: rgba(255,255,255,.1) !important;
  color: #e8e8f0 !important;
  border-color: var(--pg-purple) !important;
  box-shadow: 0 0 0 .2rem rgba(108,99,255,.25) !important;
}
.form-label, label { color: #c0bfd8 !important; }
.form-text        { color: rgba(192,191,216,.55) !important; }
.form-check-label { color: #c0bfd8 !important; }

/* Inputs disabled */
.form-control:disabled, .form-select:disabled {
  background: rgba(255,255,255,.04) !important;
  color: rgba(232,232,240,.4) !important;
}

/* Input group text */
.input-group-text {
  background: rgba(255,255,255,.08) !important;
  color: #c0bfd8 !important;
  border-color: #2d2d4e !important;
}

/* Tables */
.table {
  color: #e8e8f0 !important;
  --bs-table-color: #e8e8f0;
  --bs-table-striped-color: #e8e8f0;
  --bs-table-active-color: #e8e8f0;
  --bs-table-hover-color: #e8e8f0;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,.04);
  --bs-table-hover-bg: rgba(255,255,255,.07);
  border-color: #2d2d4e !important;
}
.table th { color: #a0a0c8 !important; border-color: #2d2d4e !important; }
.table td { border-color: #2d2d4e !important; }
.table-striped > tbody > tr:nth-of-type(odd) > * { color: #e8e8f0 !important; }
.table-hover > tbody > tr:hover > * { color: #fff !important; }

/* Dropdown */
.dropdown-menu {
  background: #1a1a2e !important;
  border-color: #2d2d4e !important;
}
.dropdown-item {
  color: #c0bfd8 !important;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(108,99,255,.25) !important;
  color: #fff !important;
}
.dropdown-divider { border-color: #2d2d4e !important; }

/* Nav tabs */
.nav-tabs { border-color: #2d2d4e !important; }
.nav-tabs .nav-link { color: #a0a0c8 !important; }
.nav-tabs .nav-link.active {
  background: #1a1a2e !important;
  border-color: #2d2d4e #2d2d4e #1a1a2e !important;
  color: #e8e8f0 !important;
}
.nav-tabs .nav-link:hover { color: #e8e8f0 !important; border-color: transparent !important; }

/* Nav pills */
.nav-pills .nav-link { color: #a0a0c8 !important; }
.nav-pills .nav-link.active { color: #fff !important; }

/* List group */
.list-group-item {
  background: rgba(255,255,255,.04) !important;
  border-color: #2d2d4e !important;
  color: #e8e8f0 !important;
}
.list-group-item-action:hover { background: rgba(108,99,255,.2) !important; color: #fff !important; }

/* Pagination */
.page-link {
  background: rgba(255,255,255,.05) !important;
  border-color: #2d2d4e !important;
  color: #c0bfd8 !important;
}
.page-link:hover { background: rgba(108,99,255,.25) !important; color: #fff !important; }
.page-item.active .page-link { background: var(--pg-purple) !important; border-color: var(--pg-purple) !important; color: #fff !important; }
.page-item.disabled .page-link { color: rgba(192,191,216,.3) !important; }

/* Accordion */
.accordion-button {
  background: rgba(255,255,255,.06) !important;
  color: #e8e8f0 !important;
}
.accordion-button:not(.collapsed) {
  background: rgba(108,99,255,.2) !important;
  color: #fff !important;
  box-shadow: inset 0 -1px 0 #2d2d4e !important;
}
.accordion-button::after { filter: invert(1) brightness(1.5); }
.accordion-item { background: #1a1a2e !important; border-color: #2d2d4e !important; }
.accordion-body { color: #c0bfd8 !important; }

/* Texto auxiliar Bootstrap */
.text-muted  { color: rgba(192,191,216,.55) !important; }
.text-body   { color: #e8e8f0 !important; }
.text-dark   { color: #e8e8f0 !important; }
.text-black  { color: #e8e8f0 !important; }
.bg-light    { background: rgba(255,255,255,.07) !important; }
.bg-white    { background: #1a1a2e !important; }

/* Breadcrumb */
.breadcrumb-item, .breadcrumb-item a { color: #a0a0c8 !important; }
.breadcrumb-item.active { color: #e8e8f0 !important; }
.breadcrumb-item + .breadcrumb-item::before { color: #6c6c8a !important; }

/* Toast */
.toast {
  background: #1a1a2e !important;
  border-color: #2d2d4e !important;
  color: #e8e8f0 !important;
}
.toast-header {
  background: rgba(255,255,255,.06) !important;
  color: #c0bfd8 !important;
  border-color: #2d2d4e !important;
}

/* Progress */
.progress { background: rgba(255,255,255,.08) !important; }

/* Spinner */
.spinner-border, .spinner-grow { color: var(--pg-purple) !important; }

/* Close button (×) dentro de modais/alertas */
.btn-close { filter: invert(1) brightness(1.4); }

