/* ===================================================================
   TUTI - Fazendinha Mágica 🌾✨
   Design System & Estilos - Estilo Cartoon Realista / Ghibli / Pixar
   =================================================================== */

:root {
  /* Paleta Oficial */
  --color-primary-green: #2E7D32;
  --color-light-green: #4CAF50;
  --color-soft-green: #81C784;
  --color-gold: #FFC107;
  --color-gold-dark: #FFA000;
  --color-sky-blue: #87CEEB;
  --color-sky-light: #E0F7FA;
  --color-earth-brown: #8D6E63;
  --color-wood-brown: #A1887F;
  --color-wood-dark: #5D4037;
  --color-cream: #FFFDE7;
  --color-white: #FFFFFF;
  --color-dark: #263238;
  --color-danger: #E53935;
  --color-purple: #8E24AA;
  
  /* Gradientes Pixar/Ghibli */
  --grad-sky: linear-gradient(180deg, #64B5F6 0%, #B3E5FC 60%, #E1F5FE 100%);
  --grad-grass: linear-gradient(180deg, #66BB6A 0%, #43A047 70%, #2E7D32 100%);
  --grad-gold: linear-gradient(135deg, #FFE082 0%, #FFC107 50%, #FF8F00 100%);
  --grad-wood: linear-gradient(180deg, #BCAAA4 0%, #8D6E63 50%, #5D4037 100%);
  --grad-card: linear-gradient(145deg, #FFFFFF 0%, #F1F8E9 100%);

  /* Efeitos e Sombras Cartunescas */
  --shadow-bubble: 0 8px 0 rgba(0, 0, 0, 0.15), 0 12px 20px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 6px 0 #E65100, 0 10px 15px rgba(255, 160, 0, 0.4);
  --shadow-green: 0 6px 0 #1B5E20, 0 10px 15px rgba(46, 125, 50, 0.35);
  --shadow-inset: inset 0 3px 6px rgba(255, 255, 255, 0.6), inset 0 -4px 6px rgba(0, 0, 0, 0.1);

  /* Fontes */
  --font-title: 'Fredoka', cursive, sans-serif;
  --font-body: 'Baloo 2', cursive, sans-serif;
  
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;
}

/* Reset Geral */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: #1e3a1f;
  background: radial-gradient(circle at center, #2e592f 0%, #172c18 100%);
  color: var(--color-dark);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container do Jogo (100% Adaptável: PC Monitor Completo, Tablets e Celulares) */
#game-app {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  background: var(--grad-sky);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  border-radius: 0;
  border: none;
}

/* ===================================================================
   TOP HUD GLOBAL (DESIGN DA IMAGEM DE REFERÊNCIA)
   =================================================================== */
#top-hud {
  height: 60px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.hud-left {
  display: flex;
  align-items: center;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 253, 231, 0.95);
  border: 2.5px solid #FFD54F;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}
.player-badge:hover {
  transform: translateY(-1px);
  border-color: #FFA000;
}
.player-badge:active {
  transform: scale(0.96);
}

.avatar-mini-ring {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, #FFFDE7 0%, #FFE082 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid #FFB300;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-mini-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#hud-player-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 13.5px;
  color: #5D4037;
  line-height: 1;
}

.xp-bar-container {
  width: 64px;
  height: 6px;
  background: #E0E0E0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

#hud-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* HUD Cores e Botões idênticos à imagem de referência */
.btn-ref-blue {
  background: #3B82F6 !important;
  border: 2.5px solid #93C5FD !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4) !important;
}

.btn-ref-green {
  background: #22C55E !important;
  border: 2.5px solid #86EFAC !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.4) !important;
}

.btn-ref-white {
  background: #FFFFFF !important;
  border: 2.5px solid #E2E8F0 !important;
  color: #475569 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}

.add-coin-btn {
  background: #22C55E !important;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #FFFFFF !important;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.5) !important;
}
.add-coin-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.coin-pill {
  background: #FFFFFF !important;
  border: 2.5px solid #93C5FD !important;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.coin-count {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  color: #1E293B !important;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF !important;
  border: 2.5px solid #93C5FD !important;
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transition: all 0.2s ease;
}

.avatar-mini-ring {
  width: 34px;
  height: 34px;
  background: radial-gradient(circle, #38BDF8 0%, #0284C7 100%) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid #F59E0B !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.level-pill {
  background: #FDE047 !important;
  color: #78350F !important;
  font-size: 10.5px;
  font-weight: 900;
  font-family: var(--font-title);
  padding: 2px 9px;
  border-radius: 12px;
  border: 1px solid #F59E0B !important;
}

#hud-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #22C55E, #4ADE80) !important;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.circle-icon-btn.db-btn {
  color: #0288D1;
  border-color: #81D4FA;
  box-shadow: 0 3px 0 #4FC3F7;
}

/* ===================================================================
   CONTAINER DE TELAS E TELAS INDIVIDUAIS
   =================================================================== */
#screens-container {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f3f8f2;
}

.game-screen {
  display: none;
  min-height: 100%;
  padding-bottom: 70px;
  position: relative;
  flex-direction: column;
  animation: fadeIn 0.25s ease-out;
}
.game-screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Headers de Telas Secundárias */
.screen-header {
  height: 56px;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 2px solid #E0E0E0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.screen-header h2 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-wood-dark);
}
.btn-back {
  background: #EFEBE9;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  color: var(--color-wood-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #D7CCC8;
}
.btn-back:active {
  transform: translateY(2px);
}
.header-space {
  width: 38px;
}
.btn-help-pill {
  background: var(--color-light-green);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 12px;
  box-shadow: 0 2px 0 var(--color-primary-green);
  cursor: pointer;
}

/* ===================================================================
   1. TELA: SPLASH / LOGIN (NOVO DESIGN TUTI 3D OFICIAL)
   =================================================================== */
#screen-splash {
  background: linear-gradient(180deg, #38BDF8 0%, #7DD3FC 35%, #86EFAC 70%, #22C55E 100%);
  align-items: center;
  justify-content: center;
  padding: 70px 16px 80px 16px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.splash-scene-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Raios de sol radiantes */
.splash-sky-rays {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.45) 0%, rgba(254, 240, 138, 0.25) 35%, transparent 75%);
}

.splash-sun-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.6) 0%, rgba(251, 191, 36, 0.3) 40%, transparent 70%);
  animation: pulseSun 4s ease-in-out infinite alternate;
}

/* Camada de Nuvens Volumosas */
.splash-clouds-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 240px;
}
.splash-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  filter: blur(1px);
}
.splash-cloud.c1 {
  width: 180px; height: 50px; top: 40px; left: -30px;
  animation: floatCloud 18s linear infinite;
}
.splash-cloud.c2 {
  width: 240px; height: 65px; top: 75px; right: -40px;
  animation: floatCloud 24s linear infinite reverse;
}
.splash-cloud.c3 {
  width: 140px; height: 42px; top: 120px; left: 35%;
  animation: floatCloud 20s linear infinite;
}

@keyframes floatCloud {
  0% { transform: translateX(0); }
  50% { transform: translateX(25px); }
  100% { transform: translateX(0); }
}

/* Montanhas e Castelo ao Fundo */
.splash-distant-mountains {
  position: absolute;
  bottom: 140px;
  left: 0;
  right: 0;
  height: 260px;
  background: 
    radial-gradient(ellipse at 20% 100%, #047857 0%, transparent 65%),
    radial-gradient(ellipse at 80% 100%, #065F46 0%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, #059669 0%, transparent 75%);
  opacity: 0.85;
}

.splash-castle-wrapper {
  position: absolute;
  top: 40px;
  right: 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.castle-building {
  font-size: 72px;
  line-height: 1;
}

.castle-blue-banner {
  background: #2563EB;
  color: #FBBF24;
  border: 2px solid #93C5FD;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  margin-top: -12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Cachoeira e Lago de Água Cristalina */
.splash-waterfall-stream {
  position: absolute;
  top: 130px;
  right: 14%;
  width: 22px;
  height: 160px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(56, 189, 248, 0.9) 70%, rgba(2, 132, 199, 0.8) 100%);
  filter: blur(1.5px);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.splash-lake-mirror {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.75) 0%, rgba(2, 132, 199, 0.9) 50%, rgba(3, 105, 161, 0.98) 100%);
  border-top: 3px solid rgba(224, 242, 254, 0.85);
}

/* Ponte de Madeira à Direita com Estandarte Azul */
.splash-wooden-bridge {
  position: absolute;
  bottom: 50px;
  right: 4%;
  width: 140px;
  height: 48px;
  background: repeating-linear-gradient(90deg, #8D6E63, #8D6E63 12px, #6D4C41 12px, #6D4C41 16px);
  border: 3px solid #5D4037;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  z-index: 3;
}

.bridge-flag {
  background: #2563EB;
  color: #FBBF24;
  border: 2px solid #93C5FD;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.splash-lush-vegetation {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 46px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

/* Layout Geral Responsivo: Personagem à Esquerda e Painel Central */
.splash-layout-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

/* Personagem Tuti em Destaque no Lado Esquerdo (composição idêntica à imagem oficial) */
.splash-hero-character-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .splash-layout-container {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .splash-hero-character-col {
    transform: scale(0.65);
    margin-top: -50px;
    margin-bottom: -40px;
  }
}

.hero-character-card {
  position: relative;
  animation: floatHeroStandee 4s ease-in-out infinite alternate;
}

@keyframes floatHeroStandee {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.hero-character-shadow {
  width: 160px;
  height: 22px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  margin: -10px auto 0 auto;
  filter: blur(4px);
}

.splash-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Logo TUTI 3D Laranja com Contorno Azul e Profundidade idêntico à Imagem de Referência */
.logo-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2px;
}

.logo-crown-top {
  font-size: 38px;
  margin-bottom: -16px;
  z-index: 5;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  animation: bounceMini 2.5s infinite ease-in-out;
}

.game-title-3d {
  font-family: var(--font-title);
  font-size: 76px;
  font-weight: 900;
  color: #FFA000;
  background: linear-gradient(180deg, #FFE082 0%, #FFB300 45%, #FF8F00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: 4px;
  filter: drop-shadow(0 3px 0 #1E3A8A) drop-shadow(0 7px 0 #1E3A8A) drop-shadow(0 12px 14px rgba(30, 58, 138, 0.45));
  animation: bounceLogo 3s ease-in-out infinite;
}

@keyframes bounceLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-decor-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: -6px;
  margin-bottom: 6px;
}

.decor-line {
  width: 32px;
  height: 2.5px;
  background: #1E3A8A;
  border-radius: 2px;
}

.decor-sym {
  font-size: 15px;
}

/* Card Translúcido de Vidro Moderno Fiel à Referência Oficial */
.splash-glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 40px;
  padding: 24px 20px 22px;
  box-shadow: 
    0 24px 50px rgba(0, 50, 120, 0.22),
    inset 0 2px 4px rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Medalhão Dourado com Avatar 3D do Tuti */
.avatar-medal-ring {
  width: 105px;
  height: 105px;
  background: radial-gradient(circle at 35% 35%, #FDE047 0%, #EAB308 65%, #CA8A04 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 18px rgba(202, 138, 4, 0.35),
    inset 0 3px 6px rgba(255, 255, 255, 0.9);
  border: 3.5px solid #FEF08A;
  position: relative;
  margin-bottom: 12px;
}

.avatar-portrait-inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at center, #38BDF8 0%, #0284C7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #EAB308;
}

/* Pergunta estilizada exatamente como na imagem (azul escuro aventureiro) */
.splash-question-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0369A1;
  line-height: 1.25;
  margin: 0 0 14px 0;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Campo de Nome Branco Curvado e Aconchegante */
.name-input-box {
  width: 100%;
  margin-bottom: 16px;
}

.name-input-box input {
  width: 100%;
  background: #FFFFFF;
  border: 2px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-full);
  padding: 12px 18px;
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: #1E293B;
  text-align: center;
  outline: none;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.name-input-box input:focus {
  border-color: #38BDF8;
  box-shadow: 
    0 0 0 4px rgba(56, 189, 248, 0.25),
    inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Botão Grande Verde 'JOGAR AGORA' IDÊNTICO À IMAGEM DE REFERÊNCIA */
.btn-jogar-agora {
  width: 100%;
  background: linear-gradient(180deg, #4ADE80 0%, #22C55E 50%, #16A34A 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  padding: 14px 24px;
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 
    0 8px 0 #15803D,
    0 16px 25px rgba(22, 163, 74, 0.4),
    inset 0 3px 4px rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 3px rgba(21, 128, 61, 0.8);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-jogar-agora:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 0 #2E7209,
    0 18px 26px rgba(46, 114, 9, 0.55),
    inset 0 3px 4px rgba(255, 255, 255, 0.7);
}

.btn-jogar-agora:active {
  transform: translateY(6px);
  box-shadow: 
    0 2px 0 #2E7209,
    0 6px 12px rgba(46, 114, 9, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.play-arrow-icon {
  font-size: 1.15rem;
  color: #FFFFFF;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

/* Botões Bubbles Cartunescos */
.btn-bubble {
  border: none;
  font-family: var(--font-title);
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--grad-grass);
  color: white;
  box-shadow: var(--shadow-green);
}
.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #1B5E20;
}

.btn-secondary {
  background: var(--grad-gold);
  color: #5D4037;
  box-shadow: var(--shadow-gold);
}
.btn-secondary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #E65100;
}

.btn-huge {
  font-size: 20px;
  padding: 14px 28px;
}

.pulse-btn {
  animation: pulseScale 2s infinite ease-in-out;
}
@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.btn-link {
  background: none;
  border: none;
  color: #0288D1;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}

/* ===================================================================
   2. TELA: HOME / HUB ISOMÉTRICO
   =================================================================== */
#screen-home {
  padding: 16px;
}

.farm-hub-backdrop {
  height: 220px;
  background: linear-gradient(180deg, #81D4FA 0%, #A5D6A7 65%, #66BB6A 100%);
  border-radius: var(--radius-lg);
  border: 4px solid #C8E6C9;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  margin-bottom: 14px;
}

.hub-floating-butterfly {
  position: absolute;
  top: 30px;
  left: 20px;
  font-size: 24px;
  animation: flyAround 6s infinite ease-in-out;
}
.hub-floating-bird {
  position: absolute;
  top: 15px;
  right: 40px;
  font-size: 20px;
  animation: flyAcross 12s infinite linear;
}

@keyframes flyAround {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, 20px) rotate(15deg); }
}
@keyframes flyAcross {
  0% { transform: translateX(50px); }
  100% { transform: translateX(-350px); }
}

.hub-scenery-art {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding-bottom: 12px;
}

.barn-building {
  background: #C62828;
  width: 90px;
  height: 70px;
  border-radius: 8px 8px 0 0;
  border: 3px solid #7F0000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.barn-roof {
  position: absolute;
  top: -24px;
  width: 0;
  height: 0;
  border-left: 48px solid transparent;
  border-right: 48px solid transparent;
  border-bottom: 24px solid #B71C1C;
}
.barn-door {
  font-size: 24px;
  margin-top: 15px;
}
.barn-label {
  position: absolute;
  bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  color: white;
  background: rgba(0,0,0,0.4);
  padding: 1px 4px;
  border-radius: 4px;
}

.wind-mill {
  font-size: 40px;
  animation: spinWheel 8s linear infinite;
}
@keyframes spinWheel {
  100% { transform: rotate(360deg); }
}

.crop-patch-visual {
  background: #8D6E63;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 22px;
  border: 2px solid #5D4037;
  letter-spacing: 4px;
}

.hub-quick-status {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-status-chip {
  flex: 1;
  background: white;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 2px solid #E0E0E0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quick-status-chip:active {
  transform: scale(0.98);
}
.quick-status-chip strong {
  color: var(--color-primary-green);
}

.hub-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hub-card-btn {
  background: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-bubble);
  transition: transform 0.15s ease;
  border-bottom: 4px solid #CFD8DC;
}
.hub-card-btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 rgba(0,0,0,0.1);
}

.hub-card-btn.play-card {
  border-bottom-color: #F57C00;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFFFFF 100%);
}
.hub-card-btn.farm-card {
  border-bottom-color: #388E3C;
  background: linear-gradient(135deg, #E8F5E9 0%, #FFFFFF 100%);
}
.hub-card-btn.corral-card {
  border-bottom-color: #8E24AA;
  background: linear-gradient(135deg, #F3E5F5 0%, #FFFFFF 100%);
}
.hub-card-btn.shop-card {
  border-bottom-color: #0288D1;
  background: linear-gradient(135deg, #E1F5FE 0%, #FFFFFF 100%);
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-gold);
  color: #5D4037;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.farm-card .card-icon-wrap { background: #A5D6A7; color: #1B5E20; }
.corral-card .card-icon-wrap { background: #CE93D8; color: #4A148C; }
.shop-card .card-icon-wrap { background: #90CAF9; color: #0D47A1; }

.hub-card-btn h3 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-wood-dark);
  margin-bottom: 2px;
}
.hub-card-btn p {
  font-size: 11px;
  color: #78909C;
  font-weight: 600;
}

.star-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #FFF9C4;
  color: #F57F17;
  border: 1px solid #FBC02D;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* ===================================================================
   3. TELA: SELEÇÃO DE FASES
   =================================================================== */
#screen-level-select {
  padding-bottom: 80px;
}

.level-track-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.level-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-bubble);
  border: 3px solid #ECEFF1;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}
.level-card:active {
  transform: scale(0.98);
}
.level-card.locked {
  filter: grayscale(0.8);
  opacity: 0.8;
  cursor: not-allowed;
}

.level-cover {
  height: 90px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Capas dos 7 Mundos de Aventura */
.level-cover-theme-1 { 
  background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%); 
  border-bottom: 3px solid #065F46;
} /* 1. The Beginning (Pradarias Verdes) */

.level-cover-theme-2 { 
  background: linear-gradient(135deg, #06B6D4 0%, #0284C7 50%, #0369A1 100%); 
  border-bottom: 3px solid #075985;
} /* 2. Waterfalls (Cachoeiras Tropicais) */

.level-cover-theme-3 { 
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 50%, #4C1D95 100%); 
  border-bottom: 3px solid #3B0764;
} /* 3. Crystal Cavern (Caverna de Cristais) */

.level-cover-theme-4 { 
  background: linear-gradient(135deg, #D97706 0%, #B45309 50%, #78350F 100%); 
  border-bottom: 3px solid #451A03;
} /* 4. Ancient Ruins (Ruínas Antigas) */

.level-cover-theme-5 { 
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 50%, #1E3A8A 100%); 
  border-bottom: 3px solid #172554;
} /* 5. Snowy Mountains (Montanhas Nevadas) */

.level-cover-theme-6 { 
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #7F1D1D 100%); 
  border-bottom: 3px solid #450A0A;
} /* 6. Volcano Lands (Vulcões e Magma) */

.level-cover-theme-7 { 
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #6366F1 100%); 
  border-bottom: 3px solid #4338CA;
} /* 7. Sky Palace (Palácio Celestial) */

.level-cover-theme-8 { 
  background: linear-gradient(135deg, #EC4899 0%, #D946EF 50%, #8B5CF6 100%); 
  border-bottom: 3px solid #6D28D9;
} /* 8. Floresta dos Cogumelos */

.level-cover-theme-9 { 
  background: linear-gradient(135deg, #14B8A6 0%, #0D9488 50%, #0F766E 100%); 
  border-bottom: 3px solid #115E59;
} /* 9. Vale dos Cristais Esmeralda */

.level-cover-theme-10 { 
  background: linear-gradient(135deg, #F97316 0%, #EA580C 50%, #C2410C 100%); 
  border-bottom: 3px solid #9A3412;
} /* 10. Desfiladeiro Solar */

.level-cover-theme-11 { 
  background: linear-gradient(135deg, #06B6D4 0%, #0284C7 50%, #4338CA 100%); 
  border-bottom: 3px solid #312E81;
} /* 11. Pico Congelado do Dragão */

.level-cover-theme-12 { 
  background: linear-gradient(135deg, #A855F7 0%, #7C3AED 50%, #4C1D95 100%); 
  border-bottom: 3px solid #2E1065;
} /* 12. Templo das Estrelas Mágicas */

.level-cover-theme-13 { 
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 50%, #881337 100%); 
  border-bottom: 3px solid #4C0519;
} /* 13. Fortaleza do Guardião de Fogo */

.level-cover-theme-14 { 
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 50%, #EC4899 100%); 
  border-bottom: 3px solid #BE185D;
} /* 14. O Reino Lendário de Tutilu */

/* Banner Hero do Modo Aventura */
.adventure-hero-banner {
  background: linear-gradient(145deg, #1E88E5 0%, #1565C0 50%, #0D47A1 100%);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  color: white;
  box-shadow: 0 16px 32px rgba(21, 101, 192, 0.35);
  border: 4px solid #64B5F6;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.hero-floating-elements {
  font-size: 28px;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  animation: bounceMini 2s infinite ease-in-out;
}

.hero-title-box h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 3px 6px rgba(0,0,0,0.3);
  margin-bottom: 6px;
}
.hero-title-box p {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 20px;
}

.adventure-focused-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.level-icon-emoji {
  font-size: 44px;
}

.level-lock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.level-info {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-title-group h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-wood-dark);
}

.level-play-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.level-desc-text {
  font-size: 12px;
  color: #4B5563;
  margin-top: 2px;
  margin-bottom: 4px;
}

.level-record-text {
  font-size: 11px;
  color: #D97706;
  font-weight: 700;
}

.level-stars-display {
  display: flex;
  gap: 3px;
  font-size: 18px;
}
.level-stars-display .star.earned {
  color: #FFC107;
  filter: drop-shadow(0 2px 2px rgba(255, 193, 7, 0.4));
}
.level-stars-display .star.empty {
  color: #CFD8DC;
}

/* ===================================================================
   4. TELA: GAMEPLAY CANVAS DE PLATAFORMA 2D FULL HD (1920x1080)
   SEM BORDAS NO CELULAR: PREENCHE 100% DA TELA SEM FAIXAS PRETAS
   =================================================================== */
#screen-gameplay {
  padding: 0;
  margin: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
}
#screen-gameplay.active {
  display: flex;
}

.canvas-wrap {
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #87CEEB;
  overflow: hidden;
}

#platform-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Enquadra certinho no celular preenchendo toda a tela sem bordas pretas */
  touch-action: none;
  display: block;
}

.in-game-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 24px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  padding-left: max(24px, env(safe-area-inset-left, 24px));
  padding-right: max(24px, env(safe-area-inset-right, 24px));
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 25;
}

.ig-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ig-nav-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.in-game-nav-btn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(0, 0, 0, 0.12);
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  color: #1E293B;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}

.in-game-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.in-game-nav-btn:active {
  transform: scale(0.92);
}

.ig-btn-map {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border-color: #34D399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.ig-btn-shop {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: white;
  border-color: #60A5FA;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-pause {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(0, 0, 0, 0.15);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #1E293B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.1s, background 0.15s;
}
.btn-pause:active {
  transform: scale(0.92);
  background: white;
}

.ig-phase-info {
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-title);
  font-size: 12px;
}

.ig-stats {
  display: flex;
  gap: 6px;
}

.ig-health-pill {
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.health-heart-icon {
  font-size: 14px;
  animation: pulse-coin 1.2s infinite;
}

.health-bar-bg {
  width: 60px;
  height: 10px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.health-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.health-bar-fill.hp-green {
  background: linear-gradient(90deg, #22C55E, #10B981);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.health-bar-fill.hp-orange {
  background: linear-gradient(90deg, #F97316, #FB923C);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.7);
}

.health-bar-fill.hp-red {
  background: linear-gradient(90deg, #EF4444, #DC2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
  animation: pulse-coin 0.6s infinite;
}

.health-label {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 800;
  color: #1E293B;
  min-width: 22px;
  text-align: right;
}

.ig-pill {
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 13px;
  color: #5D4037;
  border: 1px solid var(--color-gold);
}

.ig-active-powerups {
  display: flex;
  gap: 6px;
}
.powerup-badge {
  background: #FFEB3B;
  color: #5D4037;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: pulse-coin 1s infinite;
}

/* Touch Controls Layer (Otimizado para Tablets & Mobile - seguro contra cortes) */
.mobile-controls-layer {
  position: absolute;
  bottom: 20px;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  left: 0;
  right: 0;
  padding: 0 24px;
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 30;
}

.touch-dpad {
  display: flex;
  gap: 14px;
  pointer-events: auto;
}

.touch-actions {
  pointer-events: auto;
}

/* Botões proporcionais e confortáveis (62px padrão, 74px de pulo) */
.touch-btn {
  width: 62px;
  height: 62px;
  background: rgba(255, 255, 255, 0.7);
  border: 3px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: #1E293B;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease;
}

.touch-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.95);
  border-color: #38BDF8;
  color: #0284C7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.touch-btn-jump {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 60%, #0369A1 100%);
  border: 3.5px solid #7DD3FC;
  color: #FFFFFF;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6), 0 8px 16px rgba(2, 132, 199, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.touch-btn-jump:active {
  transform: scale(0.92);
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border-color: #38BDF8;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.9), 0 4px 10px rgba(2, 132, 199, 0.6);
}

/* Modais de Fim de Fase / Game Over */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: fadeIn 0.2s ease-out;
}
.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 4px solid var(--color-gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  max-height: 90vh;
  overflow-y: auto;
}

.stars-awarded {
  font-size: 40px;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}
.stars-awarded .star-icon.glow {
  color: #FFC107;
  filter: drop-shadow(0 0 10px #FFD54F);
  animation: bounceMini 1.5s infinite;
}

.win-summary-grid {
  background: #FFFDE7;
  border: 2px dashed #FFE082;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.win-summary-grid div {
  display: flex;
  justify-content: space-between;
}
.star-celebration {
  border: 4px solid #F59E0B;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEFCE8 100%);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.45);
}

.star-celebration h2 {
  font-family: var(--font-title);
  color: #B45309;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.gameover-card {
  border: 4px solid #EF4444;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEF2F2 100%);
  box-shadow: 0 20px 45px rgba(239, 68, 68, 0.4);
}

.gameover-card h2 {
  font-family: var(--font-title);
  color: #B91C1C;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.gameover-card p {
  color: #64748B;
  font-size: 14px;
  margin-bottom: 20px;
}

.win-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Painel de Pausa Estilizado */
.pause-card {
  max-width: 390px;
  border: 4px solid #38BDF8;
  box-shadow: 0 20px 45px rgba(2, 132, 199, 0.45);
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.pause-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pause-header h2 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: #0369A1;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.pause-icon {
  font-size: 26px;
}

.pause-subtitle {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 18px;
}

.pause-audio-panel {
  background: #E0F2FE;
  border: 2px solid #BAE6FD;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pause-audio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pause-audio-label {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: #0369A1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pause-sound-btn {
  background: white;
  border: 2px solid #38BDF8;
  color: #0284C7;
  width: 38px;
  height: 38px;
}

.pause-volume-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0284C7;
  font-size: 13px;
}

.pause-volume-slider-row input[type="range"] {
  flex: 1;
  accent-color: #0284C7;
  cursor: pointer;
  height: 6px;
  border-radius: 4px;
}

.pause-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-pause-action {
  width: 100%;
  padding: 12px 18px;
  font-size: 15px;
  font-family: var(--font-title);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-full);
}

.btn-tertiary {
  background: #E2E8F0;
  border: 2px solid #CBD5E1;
  color: #475569;
}
.btn-tertiary:active {
  transform: translateY(2px);
  background: #CBD5E1;
}



/* ===================================================================
   5. TELA: FAZENDINHA (HORTA 6x6)
   =================================================================== */
#screen-farm {
  padding-bottom: 80px;
}

.farm-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #E8F5E9;
  overflow-x: auto;
  border-bottom: 2px solid #C8E6C9;
}
.farm-toolbar::-webkit-scrollbar {
  display: none;
}

.tool-btn {
  background: white;
  border: 2px solid #A5D6A7;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 12px;
  color: #2E7D32;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tool-btn.active {
  background: var(--color-primary-green);
  color: white;
  border-color: #1B5E20;
  box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
}

.seed-selector {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  overflow-x: auto;
  border-bottom: 2px solid #ECEFF1;
}
.seed-selector::-webkit-scrollbar {
  display: none;
}

.seed-pill {
  background: #FAFAFA;
  border: 2px solid #E0E0E0;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.seed-pill.selected {
  border-color: var(--color-gold-dark);
  background: #FFF8E1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(255, 160, 0, 0.2);
}
.seed-emoji {
  font-size: 20px;
}
.seed-name {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-wood-dark);
}
.seed-time {
  font-size: 10px;
  color: #78909C;
}

.farm-grid-wrapper {
  padding: 16px;
  display: flex;
  justify-content: center;
}

/* Grid 6x6 da Fazenda */
.farm-plots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 440px;
  background: #6D4C41;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 4px solid #4E342E;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.farm-plot {
  aspect-ratio: 1;
  background: #8D6E63;
  border: 2px solid #5D4037;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.farm-plot:active {
  transform: scale(0.94);
}
.farm-plot.watered {
  background: #5D4037;
  border-color: #3E2723;
  box-shadow: inset 0 0 8px rgba(33, 150, 243, 0.4);
}
.farm-plot.fertilized {
  border-color: #FFD54F;
  box-shadow: 0 0 6px rgba(255, 213, 79, 0.8);
}

.plot-plant-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.plot-plant-icon.ready {
  animation: bounceMini 1s infinite;
}

.plot-progress-bar {
  position: absolute;
  bottom: 2px;
  left: 3px;
  right: 3px;
  height: 4px;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.plot-progress-fill {
  height: 100%;
  background: #76FF03;
  width: 0%;
  transition: width 0.3s;
}

/* ===================================================================
   6. TELA: CURRAL DE ANIMAIS
   =================================================================== */
#screen-corral {
  padding-bottom: 80px;
}

.corral-info-banner {
  background: #E8F5E9;
  border-bottom: 2px solid #C8E6C9;
  padding: 8px 16px;
  font-size: 12px;
  color: #2E7D32;
  font-weight: 600;
  text-align: center;
}

.animals-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.animal-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 3px solid #E0E0E0;
  box-shadow: var(--shadow-bubble);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.animal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.animal-avatar-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.animal-emoji-big {
  font-size: 36px;
  background: #FFF9C4;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFD54F;
}
.animal-name-group h4 {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-wood-dark);
}
.animal-product-ready {
  background: #E8F5E9;
  color: #2E7D32;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #A5D6A7;
}

.animal-bars {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.status-bar-box {
  background: #FAFAFA;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #EEEEEE;
}
.status-bar-box span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #616161;
  margin-bottom: 4px;
}
.status-bar-track {
  height: 6px;
  background: #E0E0E0;
  border-radius: 4px;
  overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.status-bar-fill.hunger { background: #FF9800; }
.status-bar-fill.thirst { background: #29B6F6; }
.status-bar-fill.happiness { background: #E91E63; }

.animal-action-buttons {
  display: flex;
  gap: 6px;
}
.animal-action-btn {
  flex: 1;
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: var(--radius-md);
  padding: 8px 4px;
  font-family: var(--font-title);
  font-size: 12px;
  color: #424242;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.animal-action-btn:active {
  transform: scale(0.96);
  background: #EEEEEE;
}

/* ===================================================================
   7. TELA: LOJA DE CUSTOMIZAÇÃO
   =================================================================== */
#screen-shop {
  padding-bottom: 80px;
}

.shop-layout {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.character-fitting-room {
  background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
  border-radius: var(--radius-lg);
  border: 3px solid #FBC02D;
  padding: 16px;
  text-align: center;
  box-shadow: 0 6px 12px rgba(251, 192, 45, 0.2);
}

.avatar-mannequin-frame {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mannequin-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.9;
}
.mannequin-hat { font-size: 38px; transform: translateY(6px); z-index: 3; }
.mannequin-body { font-size: 48px; z-index: 2; }
.mannequin-boots { font-size: 28px; transform: translateY(-4px); z-index: 1; }

.avatar-outfit-tags {
  font-family: var(--font-title);
  font-size: 14px;
  color: #5D4037;
  font-weight: 700;
  margin-top: 6px;
}

.shop-tabs {
  display: flex;
  gap: 8px;
  background: #ECEFF1;
  padding: 4px;
  border-radius: var(--radius-full);
}
.shop-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 13px;
  color: #607D8B;
  cursor: pointer;
  transition: all 0.15s ease;
}
.shop-tab.active {
  background: white;
  color: var(--color-wood-dark);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shop-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shop-item-card {
  background: white;
  border-radius: var(--radius-md);
  border: 2px solid #E0E0E0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  position: relative;
}
.shop-item-card.equipped {
  border-color: #4CAF50;
  background: #F1F8E9;
}
.shop-item-card.purchased {
  border-color: #29B6F6;
}

.item-icon-box {
  width: 56px;
  height: 56px;
  background: #F5F5F5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.item-info-text h5 {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--color-wood-dark);
}
.item-info-text p {
  font-size: 11px;
  color: #78909C;
}

.item-action-btn {
  width: 100%;
  padding: 6px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-title);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 700;
}
.item-action-btn.buy {
  background: var(--color-gold);
  color: #5D4037;
  box-shadow: 0 2px 0 var(--color-gold-dark);
}
.item-action-btn.equip {
  background: #4CAF50;
  color: white;
}
.item-action-btn.equipped-badge {
  background: #C8E6C9;
  color: #2E7D32;
  cursor: default;
}

/* ===================================================================
   8. TELA: PERFIL & CONQUISTAS
   =================================================================== */
#screen-profile {
  padding: 16px;
  padding-bottom: 80px;
}

.profile-hero-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 3px solid #E0E0E0;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-bubble);
  margin-bottom: 20px;
}

.profile-big-avatar {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, #FFF9C4 0%, #FFD54F 100%);
  border-radius: 50%;
  border: 3px solid #FFA000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.profile-details h3 {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-wood-dark);
}
.rank-tag {
  display: inline-block;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin: 4px 0 8px;
}

.stats-mini-row {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #616161;
}

.section-subtitle {
  font-family: var(--font-title);
  font-size: 16px;
  color: var(--color-wood-dark);
  margin-bottom: 12px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.achievement-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 2px solid #E0E0E0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.achievement-card.unlocked {
  border-color: #FFC107;
  background: #FFFDE7;
}

.ach-icon-circle {
  width: 44px;
  height: 44px;
  background: #EEEEEE;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.achievement-card.unlocked .ach-icon-circle {
  background: #FFECB3;
}

.ach-info {
  flex: 1;
}
.ach-info h4 {
  font-family: var(--font-title);
  font-size: 14px;
  color: var(--color-wood-dark);
}
.ach-info p {
  font-size: 11px;
  color: #757575;
}

/* ===================================================================
   BARRA DE NAVEGAÇÃO INFERIOR FIXA
   =================================================================== */
/* ===================================================================
   BARRA INFERIOR DE NAVEGAÇÃO FIXA (DESIGN DA REFERÊNCIA)
   =================================================================== */
#bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
  padding: 0 8px;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #94A3B8;
  font-family: var(--font-title);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 16px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item i {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  color: #4ADE80;
}

.nav-item.active {
  color: #16A34A;
  transform: translateY(-2px);
}

.nav-item.active i {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px rgba(22, 163, 74, 0.25));
}

/* ===================================================================
   MODAIS & COMPONENTES ADICIONAIS
   =================================================================== */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-header h3 {
  font-family: var(--font-title);
  color: var(--color-wood-dark);
}
.btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #9E9E9E;
  cursor: pointer;
}

.modal-desc {
  font-size: 13px;
  color: #616161;
  margin-bottom: 14px;
  text-align: left;
}

.form-group {
  text-align: left;
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-wood-dark);
  margin-bottom: 4px;
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #E0E0E0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}
.form-group input:focus {
  border-color: #29B6F6;
}

.supabase-status-banner {
  background: #ECEFF1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9E9E9E;
}
.status-indicator.online { background: #4CAF50; }
.status-indicator.offline { background: #FF9800; }

.supabase-actions {
  display: flex;
  gap: 10px;
}
.supabase-actions .btn-bubble {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

.sql-instructions {
  margin-top: 14px;
  text-align: left;
  font-size: 11px;
}
.sql-instructions summary {
  cursor: pointer;
  color: #0288D1;
  font-weight: 700;
}
.sql-instructions pre {
  margin-top: 8px;
  background: #263238;
  color: #ECEFF1;
  padding: 8px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 10px;
}

/* Toast Notifications */
#toast-container {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.toast {
  background: rgba(38, 50, 56, 0.95);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  animation: slideToast 0.3s ease-out;
}
.toast.success { background: #2E7D32; }
.toast.info { background: #0288D1; }
.toast.warning { background: #F57F17; }

@keyframes slideToast {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceMini {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pulse-coin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ===================================================================
   CENÁRIO ISOMÉTRICO (ESTILO FAZENDA FELIZ / VIBRANTE GHIBLI)
   =================================================================== */
.isometric-farm-world {
  height: 290px;
  background: linear-gradient(180deg, #7CD3F7 0%, #A3E57B 40%, #76C843 100%);
  border-radius: var(--radius-lg);
  border: 4px solid #5B9E2B;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
}

.iso-skyline {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
}
.iso-sun {
  font-size: 34px;
  animation: floatSun 4s infinite ease-in-out;
}
.iso-birds {
  font-size: 18px;
  animation: flyAcross 14s infinite linear;
}
.iso-cottage-house {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.house-roof { font-size: 44px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
.pet-dog { font-size: 22px; animation: bounceMini 2s infinite; }

.iso-ground-scene {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 10px;
}

/* Curral com Cerca e Animais à Direita */
.iso-pasture-fence {
  background: rgba(255, 255, 255, 0.85);
  border: 3px solid #8D6E63;
  border-radius: 16px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s ease;
}
.iso-pasture-fence:active { transform: scale(0.96); }

.fence-label {
  font-size: 10px;
  font-weight: 800;
  color: #5D4037;
  text-align: center;
  margin-bottom: 4px;
}
.pasture-animals {
  display: flex;
  gap: 4px;
  font-size: 24px;
}
.pasture-animal {
  animation: bounceMini 2.5s infinite;
}

/* Canteiros Isométricos da Home */
.iso-farm-beds {
  background: rgba(141, 110, 99, 0.9);
  border: 3px solid #5D4037;
  border-radius: 16px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.iso-farm-beds:active { transform: scale(0.96); }

.beds-signpost {
  font-size: 11px;
  font-weight: 800;
  color: #FFF9C4;
  margin-bottom: 4px;
  text-align: center;
}
.iso-beds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.iso-plot-tile {
  font-size: 20px;
  background: #6D4C41;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iso-scarecrow { font-size: 32px; animation: pulseScale 3s infinite; }
.iso-bunny { font-size: 24px; animation: bounceMini 1.8s infinite; }
.iso-butterfly { font-size: 22px; animation: flyAround 5s infinite; }

/* ===================================================================
   TELA FAZENDINHA ISOMÉTRICA (12 LOTES EM LOSANGO)
   =================================================================== */
.iso-farm-container {
  min-height: 580px;
  background: linear-gradient(180deg, #93C5FD 0%, #34D399 50%, #059669 100%);
  border-radius: var(--radius-lg);
  border: 4px solid #78350F;
  margin: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
  padding-bottom: 90px;
}

.iso-farm-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  z-index: 10;
}
.btn-back-iso {
  background: white;
  border: 2px solid #78350F;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #78350F;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.iso-farm-status-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  color: #78350F;
  border: 2px solid #B45309;
}
#iso-active-tool-label {
  color: #D97706;
  text-transform: uppercase;
}

.iso-farm-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.iso-grid-wrapper {
  perspective: 700px;
}

.iso-plots-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
  transform: rotateX(24deg) scale(0.96);
}

/* Lote Poligonal em Formato de Losango Isométrico */
.iso-rhombus-plot {
  width: 90px;
  height: 64px;
  background: #78350F;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease, filter 0.15s ease;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}
.iso-rhombus-plot:hover, .iso-rhombus-plot:active {
  transform: translateY(-4px) scale(1.05);
}
.iso-rhombus-plot.ready-pulse {
  animation: pulseScale 1.2s infinite;
  filter: drop-shadow(0 0 10px #FACC15);
}
.iso-rhombus-plot.watered-glow {
  filter: drop-shadow(0 0 6px #60A5FA);
}

.iso-rhombus-inner {
  width: 80%;
  height: 80%;
  background: rgba(69, 26, 3, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.iso-plot-text-empty {
  font-size: 8px;
  font-weight: 700;
  color: #FDE68A;
  opacity: 0.85;
}

.iso-sprout-bounce {
  font-size: 18px;
  animation: bounceMini 1s infinite;
}
.iso-plot-bar-track {
  width: 44px;
  height: 5px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}
.iso-plot-bar-fill {
  height: 100%;
  transition: width 0.3s;
}

.iso-fruit-icon {
  font-size: 22px;
  animation: bounceMini 0.8s infinite;
}
.iso-ready-badge {
  font-size: 8px;
  font-weight: 900;
  color: #FEF08A;
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Barra de Ferramentas Flutuante na Fazenda */
.iso-farm-bottom-toolbar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 3px solid #78350F;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 20;
}
.iso-tool-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.iso-tool-icon {
  font-size: 20px;
}
.iso-tool-name {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 800;
  color: #5D4037;
}
.iso-tool-btn.active {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Modal de Sementes Isométricas */
.iso-seed-card {
  max-width: 340px;
}
.iso-seeds-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.iso-seed-option-btn {
  background: white;
  border: 2px solid #B45309;
  border-radius: 12px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.15s;
}
.iso-seed-option-btn:active {
  transform: scale(0.94);
}
.seed-ico { font-size: 26px; margin-bottom: 2px; }
.iso-seed-option-btn strong { font-size: 12px; color: #78350F; }
.iso-seed-option-btn small { font-size: 9px; color: #6B7280; margin-top: 2px; }

/* Textos Flutuantes de Recompensa (+25 Moedas, +10 XP) */
.iso-floating-reward {
  position: fixed;
  pointer-events: none;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  z-index: 9999;
  animation: floatRewardUp 1.4s ease-out forwards;
}

@keyframes floatRewardUp {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -50px); opacity: 0; }
}

/* Botão de Vestiário / Customização Rápida no HUD */
.wardrobe-btn {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%) !important;
  color: #FFFFFF !important;
  border: 2px solid #60A5FA !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s !important;
}

.wardrobe-btn:hover {
  transform: translateY(-2px) scale(1.08) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6) !important;
}

.in-game-wardrobe-btn {
  margin-right: 8px;
  width: 42px !important;
  height: 42px !important;
  font-size: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ===================================================================
   ADAPTAÇÃO ESPECÍFICA PARA TABLETS (iPads e Android Tablets 600px a 1400px)
   =================================================================== */
@media (min-width: 600px) {
  /* Layout Amplo e Espaçoso do Menu Principal */
  .adventure-hero-banner {
    padding: 36px 32px;
    margin-bottom: 24px;
  }

  .hub-action-grid.adventure-focused-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
  }

  /* Mapa de Seleção de Fases em Grade Ampla no Tablet */
  .level-track-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 24px;
  }

  /* Loja de Roupas no Tablet: Vitrine de 2 Colunas */
  .shop-layout {
    display: flex;
    flex-direction: row;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
  }

  .character-fitting-room {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
  }

  .shop-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    flex: 1;
    gap: 14px;
  }

  /* Perfil e Conquistas no Tablet */
  .profile-hero-card {
    max-width: 800px;
    margin: 0 auto 24px auto;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
    gap: 14px;
  }

  /* Controles de Toque Proporcionais e Confortáveis para Tablet (56px a 68px) */
  .touch-dpad {
    gap: 20px;
  }

  .touch-btn {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .touch-btn-jump {
    width: 72px;
    height: 72px;
    font-size: 14px;
  }

  /* HUD do Tablet com espaçamento elegante */
  .in-game-hud {
    padding: 16px 36px;
  }

  .ig-phase-info {
    font-size: 14px;
    padding: 6px 16px;
  }

  .ig-pill {
    font-size: 14px;
    padding: 6px 14px;
  }

  .ig-health-pill {
    padding: 6px 14px;
  }

  .health-bar-bg {
    width: 80px;
    height: 12px;
  }
}

/* Telas Maiores / Tablets em Paisagem (1024px+) */
@media (min-width: 1024px) {
  .level-track-container {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
  }

  .touch-btn {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }

  .touch-btn-jump {
    width: 76px;
    height: 76px;
    font-size: 15px;
  }
}

/* ===================================================================
   LOJA DE CUSTOMIZAÇÃO - ESTILO PREMIUM CARTOON
   =================================================================== */
/* ===================================================================
   LOJA DE CUSTOMIZAÇÃO - ESTILO PREMIUM CARTOON
   =================================================================== */
.shop-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 40px;
}

@media (min-width: 800px) {
  .shop-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 24px;
  }
}

/* Painel Vitrine / Showcase Central Grande */
.shop-showcase-panel {
  background: #FFFFFF;
  border: 4px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 10px;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.showcase-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

.showcase-rarity-tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 14px;
  border-radius: var(--radius-full);
}

.showcase-banner h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: #1E293B;
  margin: 0;
  text-align: center;
}

.showcase-preview-frame {
  width: 100%;
  max-width: 280px;
  height: 250px;
  background: radial-gradient(circle at center, #FFFFFF 0%, #FEF9C3 50%, #FDE047 100%);
  border: 3px solid #FBBF24;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 3px 12px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(245, 158, 11, 0.15);
}

.showcase-light-beam {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(254, 240, 138, 0.4) 0deg, transparent 60deg, rgba(254, 240, 138, 0.4) 120deg, transparent 180deg, rgba(254, 240, 138, 0.4) 240deg, transparent 300deg);
  animation: rotateBeam 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateBeam {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.showcase-float-particles {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-size: 18px;
  pointer-events: none;
  animation: floatSparkles 3s ease-in-out infinite alternate;
}

@keyframes floatSparkles {
  from { transform: translateY(0px) scale(0.9); opacity: 0.5; }
  to { transform: translateY(8px) scale(1.15); opacity: 1; }
}

.showcase-details {
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

.showcase-details p {
  font-size: 0.88rem;
  color: #64748B;
  margin: 0 0 16px 0;
  min-height: 38px;
  line-height: 1.35;
}

.showcase-action-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.showcase-price-box {
  background: #FFFBEB;
  border: 2px dashed #FCD34D;
  border-radius: var(--radius-full);
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.showcase-price-box .price-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400E;
}

.showcase-price-box .price-val {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: #B45309;
}

.showcase-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.showcase-btn.buy {
  background: var(--grad-gold);
  color: #78350F;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
}

.showcase-btn.buy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.6);
}

.showcase-btn.buy.disabled {
  background: #CBD5E1;
  color: #64748B;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.showcase-btn.equip {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.showcase-btn.equip:hover {
  transform: translateY(-2px) scale(1.02);
}

.showcase-btn.equipped {
  background: #DCFCE7;
  color: #15803D;
  border: 2px solid #86EFAC;
  cursor: default;
  box-shadow: none;
}

.shop-main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shop-tabs {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.shop-tab {
  background: #FFFFFF;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.shop-tab:hover {
  transform: translateY(-2px);
  border-color: #4ADE80;
}

.shop-tab.active {
  background: var(--grad-grass);
  color: #FFFFFF;
  border-color: #16A34A;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.4);
  transform: translateY(-3px) scale(1.02);
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.shop-item-card {
  background: #FFFFFF;
  border: 3px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.shop-item-card:hover {
  transform: translateY(-4px);
  border-color: #86EFAC;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.shop-item-card.selected-card {
  border-color: #F59E0B;
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.45);
}

.shop-item-card.equipped {
  border-color: #22C55E;
  background: #F0FDF4;
}

.item-icon-box {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  border: 2px solid #E2E8F0;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

.item-info-text {
  flex: 1;
  text-align: left;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.item-info-text h5 {
  font-family: var(--font-title);
  font-size: 1.08rem;
  color: #1E293B;
  margin: 0;
}

.rarity-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rarity-comum { background: #E2E8F0; color: #475569; }
.rarity-raro { background: #DBEAFE; color: #1D4ED8; border: 1px solid #93C5FD; }
.rarity-lendário { background: #FEF3C7; color: #B45309; border: 1px solid #FCD34D; }

.item-info-text p {
  font-size: 0.84rem;
  color: #64748B;
  line-height: 1.3;
  margin: 0;
}

.item-action-btn {
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.item-action-btn.buy {
  background: var(--grad-gold);
  color: #78350F;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.item-action-btn.buy:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.5);
}

.item-action-btn.equip {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.35);
}

.item-action-btn.equip:hover {
  transform: scale(1.08);
}

.item-action-btn.equipped-badge {
  background: #DCFCE7;
  color: #15803D;
  border: 2px solid #86EFAC;
  cursor: default;
}

/* ===================================================================
   8. TELA: PERFIL & CONQUISTAS (DESIGN KAWAI / PREMIUM 3D)
   =================================================================== */
#screen-profile {
  padding: 16px;
  max-width: 650px;
  margin: 0 auto 90px auto;
}

.profile-hero-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #EFF6FF 60%, #DBEAFE 100%);
  border: 3.5px solid #93C5FD;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

.profile-big-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #FEF08A 0%, #FDE047 70%, #F59E0B 100%);
  border: 3.5px solid #F59E0B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.profile-details {
  flex: 1;
}

.profile-details h3 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 4px;
}

.rank-tag {
  display: inline-block;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
  margin-bottom: 10px;
}

.stats-mini-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: #1E40AF;
}

.stats-mini-row div {
  background: rgba(255, 255, 255, 0.8);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #BFDBFE;
}

.section-subtitle {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.achievement-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.achievement-card.unlocked {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 2.5px solid #4ADE80;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.2);
}

.achievement-card:hover {
  transform: translateY(-2px);
}

.ach-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.achievement-card.unlocked .ach-icon-circle {
  background: #FEF08A;
  border-color: #FACC15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.ach-info {
  flex: 1;
}

.ach-info h4 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 3px;
}

.achievement-card.unlocked .ach-info h4 {
  color: #15803D;
}

.ach-info p {
  font-size: 12px;
  color: #64748B;
  line-height: 1.35;
}

/* ===================================================================
   BARRA DE NAVEGAÇÃO INFERIOR OFICIAL (TRANSLÚCIDA, CANTOS CURVOS, 4 ITENS)
   =================================================================== */
#bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
  z-index: 100;
}

.nav-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748B;
  font-family: var(--font-title);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.nav-item i {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  color: #0284C7;
  transform: translateY(-2px);
}

.nav-item:active {
  transform: scale(0.92);
}

/* Item Ativo (Início selecionado com destaque azul como na referência) */
.nav-item.active {
  color: #0284C7;
  position: relative;
}

.nav-item.active i {
  color: #0284C7;
  transform: scale(1.15);
  filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.35));
}

.nav-item.active span {
  font-weight: 800;
  color: #0284C7;
}
