/* Main Application Stylesheet */

*, *::before, *::after {
  box-sizing: border-box;
}


:root {
  --bg-color: #6bbe42; /* Vibrant grass green */
  --text-color: #1a3c1a; 
  --window-bg: #f0f0f0; /* Habbo-style light window */
  --window-header: #1a3c1a; /* Grass green header (formerly blue/light green) */
  --input-bg: #ffffff;
  --border-color: #2b2b2b; /* 1-2px dark border */
  --shadow-color: rgba(0, 0, 0, 0.25);
  --error-color: #e55039;
  --success-color: #78e08f;
}

@keyframes grassScroll {
  from { background-position: 0 0, 50px 50px; }
  to { background-position: -300px -300px, -250px -250px; }
}

/* Base properties for the animated grass */
body.pixel-theme {
  animation: grassScroll 30s linear infinite;
}

/* 1. Listras Tradicionais (Verticais/Horizontais) */
body.grass-striped {
    background-color: #6bbe42;
    background-image: linear-gradient(90deg, #73c74b 50%, transparent 50%);
    background-size: 100px 100px;
}

/* 2. Xadrez (Checkerboard) */
body.grass-checkered {
    background-color: #6bbe42;
    background-image: 
        linear-gradient(45deg, #73c74b 25%, transparent 25%, transparent 75%, #73c74b 75%, #73c74b),
        linear-gradient(45deg, #73c74b 25%, transparent 25%, transparent 75%, #73c74b 75%, #73c74b);
    background-size: 100px 100px;
    background-position: 0 0, 50px 50px;
}

/* 3. Diagonal (45 graus) */
body.grass-diagonal {
    background-color: #6bbe42;
    background-image: linear-gradient(
        -45deg,
        #73c74b 25%,
        transparent 25%,
        transparent 50%,
        #73c74b 50%,
        #73c74b 75%,
        transparent 75%,
        transparent
    );
    background-size: 100px 100px;
}

/* 4. Círculos Táticos/Espiral (Cortes Concêntricos) */
body.grass-circles {
    background-color: #6bbe42;
    background-image: repeating-radial-gradient(
        circle at 50% 50%,
        transparent,
        transparent 30px,
        #73c74b 30px,
        #73c74b 60px
    );
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-color);
  margin: 0;
  padding: 0; /* Removido o gap de 5px para não somar com o top padding 20px */
  min-height: 100vh;
  box-sizing: border-box;
  font-size: 15px; 
  line-height: 1.5;
}

/* Sombra padrão para destaque de Emojis Vetoriais */
.emoji-shadow {
  filter: drop-shadow(0 0 1px #000);
}

#app, div[class^="app-"] {
  width: 100%;
  max-width: 768px; /* Tam máximo novo */
  min-width: 320px; /* Tam mínimo exigido */
  margin: 0 auto; /* Centraliza na tela */
  padding: 0 10px; /* Descola laterais nas telas estreitas */
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

h1, h2, h3 {
  text-align: center;
  margin-top: 0;
  font-size: 24px;
  letter-spacing: 1px;
}

.pixel-box {
  background: var(--window-bg);
  border: 2px solid var(--border-color);
  border-radius: 8px; /* Levemente arredondado */
  padding: 20px;
  position: relative;
  /* Sombras fortes dando ar de flutuação e isometria */
  box-shadow: 8px 8px 0px 0px var(--shadow-color);
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%; /* Passa a respeitar o container pai #app */
  min-width: 0;
}

.pixel-box h2 {
  margin: -20px -20px 20px -20px;
  padding: 10px;
  background: var(--window-header);
  border-bottom: 2px solid var(--border-color);
  border-radius: 6px 6px 0 0;
  font-size: 18px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  display: block;
  text-align: left;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 600;
}

input, select, textarea {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: var(--input-bg);
  color: #000000; /* Texto do form sempre preto */
  margin-bottom: 15px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
  height: 48px;
}

textarea {
  height: auto;
  min-height: 48px;
}

input:focus, select:focus {
  border-color: var(--window-header);
}

select {
  font-weight: normal !important;
}

@keyframes highlightSelect {
    0%   { background-color: #ffffff; border-color: #000; }
    50%  { background-color: #fff9e6; border-color: #f1c40f; }
    100% { background-color: #ffffff; border-color: #000; }
}

.needs-selection {
    animation: highlightSelect 2s infinite;
}

/* Custom Placeholders for text, select and date */
::placeholder {
  color: #888;
  opacity: 1;
}
input[type="date"]::-webkit-datetime-edit-text, 
input[type="date"]::-webkit-datetime-edit-month-field, 
input[type="date"]::-webkit-datetime-edit-day-field, 
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #888;
}
input[type="date"]:focus::-webkit-datetime-edit-text, 
input[type="date"]:valid::-webkit-datetime-edit-text,
input[type="date"]:focus::-webkit-datetime-edit-month-field,
input[type="date"]:valid::-webkit-datetime-edit-month-field,
input[type="date"]:focus::-webkit-datetime-edit-day-field,
input[type="date"]:valid::-webkit-datetime-edit-day-field,
input[type="date"]:focus::-webkit-datetime-edit-year-field,
input[type="date"]:valid::-webkit-datetime-edit-year-field {
    color: #000;
}

select:invalid,
select:has(option[value=""]:checked) {
  color: #888;
}
select option {
  color: #000;
}

/* Caixa com largura maxima p paginas estetiscas auth */
.box-360 {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Piscar o placeholder de email */
@keyframes blinkPlaceholder {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

input.blink-ph::placeholder {
  animation: blinkPlaceholder 2s infinite;
  color: #666;
}

/* Animação para botão azul piscante (Guardar) */
@keyframes blinkBlue {
  0%, 100% { background-color: #2980b9; }
  50% { background-color: #5dade2; }
}

.blink-blue {
  animation: blinkBlue 1.5s infinite;
  border-color: #000 !important;
}

/* Animação para botão azul claro piscante (Criar Conta) */
@keyframes blinkLightBlue {
  0%, 100% { background-color: #3498db; }
  50% { background-color: #85c1e9; }
}

.blink-light-blue {
  animation: blinkLightBlue 1.5s infinite;
  border-color: #000 !important;
}

/* Animação para os botões do menu inferior e destaques gerais */
@keyframes pulseBright {
  0%, 100% { box-shadow: inset 0 0 0 100px rgba(255,255,255,0), 2px 2px 0px 0px #000000; }
  50% { box-shadow: inset 0 0 0 100px rgba(255,255,255,0.25), 2px 2px 0px 0px #000000; } 
}

.pulse-btn {
  animation: pulseBright 2s infinite;
}

.pulse-btn:active {
  animation: none;
  box-shadow: 0px 0px 0px 0px !important;
}

.pulse-btn-1 { animation-delay: 0s; }
.pulse-btn-2 { animation-delay: 0.3s; }
.pulse-btn-3 { animation-delay: 0.6s; }

/* Animação para a bola girando */
@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  display: inline-block;
  animation: spinClockwise 8s linear infinite;
}

/* Animação do Presente Dançando (Sino / Esquerda, Direita, Pausa) */
@keyframes shakeGift {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  5% { transform: rotate(-15deg) translateX(-2px); }
  10% { transform: rotate(15deg) translateX(2px); }
  15% { transform: rotate(-15deg) translateX(-2px); }
  20% { transform: rotate(0deg) translateX(0); }
  /* De 20% a 100% (a maior parte do ciclo), ele fica parado */
}

.shake-gift {
  display: inline-block;
  animation: shakeGift 2.5s ease-in-out infinite;
  transform-origin: bottom center;
  margin-right: 8px;
}

button, .btn {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: #f1c40f; /* Botão base chamativo */
  color: #000000;
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px #000000; /* Sombra sólida retro global */
  margin: 0; /* Zerado! As margens ficam com a DIV Pai (wrapper) */
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px; /* Distância exata do texto pro icone/emoji em todos os botoes */
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  transition: transform 0.1s, box-shadow 0.1s;
}

button:active, .btn:active {
  box-shadow: 0px 0px 0px 0px;
  transform: translate(2px, 2px);
}

.cta-text {
  font-size: 16px !important;
  color: #000000 !important;
  font-weight: 600;
}

.text-center {
  text-align: center;
}

.alert {
  padding: 10px;
  margin-bottom: 15px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.alert.error {
  background-color: var(--error-color);
  color: white;
}

.alert.success {
  background-color: var(--success-color);
  color: white;
}

a {
  color: var(--window-header);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

a.btn:hover {
  text-decoration: none;
}

.small-text {
  font-size: 16px;
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.navbar .btn {
  width: auto;
  padding: 8px 15px;
  font-size: 14px;
  margin-bottom: 0;
  background: var(--error-color);
  color: #fff;
}

/* Ocultar barra de rolagem nativa para o carrossel limpo */
#cards-carousel::-webkit-scrollbar {
  display: none;
}
#cards-carousel {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Botão quadriculado (bandeira de corrida) */
.btn-checkered {
  background-image: 
    linear-gradient(45deg, rgba(0,0,0,0.5) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.5)),
    linear-gradient(45deg, rgba(0,0,0,0.5) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.5) 75%, rgba(0,0,0,0.5));
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  background-color: rgba(255,255,255,0.5); /* Fundo branco com alpha para ler texto preto */
  color: #000;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
  border: 2px solid #000;
}

.btn-checkered:hover {
  background-color: rgba(255,255,255,0.7);
}

/* Custom Select/Dropdown styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}
.custom-select {
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}
.custom-options.open {
  display: block;
}
.custom-options input[type=text] {
  margin: 0;
  border: none;
  border-bottom: 2px solid #eee;
  border-radius: 0;
  width: 100%;
  position: sticky;
  top: 0;
  background: #fafafa;
}
.option-item {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-item:hover, .option-item.selected {
  background: #f0f0f0;
}

/* Responsividade Mobile (Telas muito estreitas como 320px) */
@media (max-width: 480px) {
  body {
    padding: 0;
    overflow-x: hidden;
  }
  .pixel-box {
    padding: 15px 5px; /* Minimal side padding */
    box-shadow: 4px 4px 0px 0px var(--shadow-color);
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .pixel-box h2 {
    margin: -15px -5px 15px -5px;
  }
  .navbar {
    padding: 0;
    max-width: 100%;
    margin-bottom: 10px;
  }
  .flex-form-row {
    flex-direction: column !important;
    width: 100%;
  }
  .flex-form-row > div:not(.checkbox-group) {
    width: 100%;
  }
  .flex-form-row > div.checkbox-group {
    flex-direction: row !important;
    justify-content: center;
  }
  .social-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Custom Select/Dropdown styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}
.custom-select {
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}
.custom-options.open {
  display: block;
}
.custom-options input[type=text] {
  margin: 0;
  border: none;
  border-bottom: 2px solid #eee;
  border-radius: 0;
  width: 100%;
  position: sticky;
  top: 0;
  background: #fafafa;
}
.option-item {
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-item:hover, .option-item.selected {
  background: #f0f0f0;
}
.input-group {
  position: relative;
  margin-bottom: 15px;
}
.input-group input {
  margin-bottom: 0;
  padding-right: 40px; /* space for flag */
}
.status-flag {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  display: none;
  font-weight: bold;
}
.status-flag.valid {
  color: var(--success-color);
  display: block;
}
.status-flag.invalid {
  color: var(--error-color);
  display: block;
}

.helper-text {
  font-size: 11px;
  margin: -10px 0 10px 0;
  color: #555;
  text-align: right;
  height: 14px;
}

/* Base text hints formatting */
.texto-dica {
  margin: 0 20px 20px 20px;
  width: auto;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  color: #000000; /* Preto fixo padronizado pelo usuário */
}
/* New Password and password toggles */
.input-pw { position: relative; margin-bottom: 15px; }
.input-pw input { width: 100%; padding-right: 50px; margin-bottom: 0; }
.toggle-pw {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #666; cursor: pointer;
    padding: 0; width: 36px; height: 36px; display: flex;
    align-items: center; justify-content: center; box-shadow: none; border-radius: 0;
}
.rule { font-size: 12px; margin: 2px 0; }
.rule.ok { color: var(--success-color); }
.rule.fail { color: #999; }

/* Efeito de giro no eixo 3D (Home/Ranking) - Refatoração W3C */
@keyframes spinAxis {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(-1); }
  100% { transform: scaleX(1); }
}
.spin-axis {
  display: inline-block;
  animation: spinAxis 3s linear infinite;
}

/* Base App Modal Padrão */
.app-modal-overlay {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh; 
  background: rgba(0,0,0,0.9); 
  z-index: 9999; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
}
.app-modal-box {
  position: relative; 
  width: 320px; 
  background: #fff; 
  border: 3px solid #000; 
  border-radius: 8px; 
  padding: 15px; 
  box-sizing: border-box;
}
.app-modal-header {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  border-bottom: 2px solid #ccc; 
  padding-bottom: 5px; 
  margin-bottom: 10px;
}
.app-modal-title {
  margin: 0; 
  font-size: 20px; 
  color: #e74c3c; 
  text-align: left; 
  font-weight: 900;
}
.app-modal-body {
  font-size: 15px; 
  color: #000; 
  line-height: 1.4;
}

.app-t-r { padding-left: 10px !important; padding-right: 10px !important; }

/* Custom App Modals */
.app-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.85);
        z-index: 1000;
        display: none;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(2px);
        padding: 20px;
}
.app-modal-box {
        background: #f0f0f0;
        border: 3px solid #000;
        border-radius: 8px;
        width: 100%;
        max-width: 400px;
        box-shadow: 0 8px 0 rgba(0, 0, 0, 0.5);
        padding: 20px;
        color: #000;
}
.app-modal-header {
        margin-bottom: 15px;
        text-align: center;
        border-bottom: 2px solid #ccc;
        padding-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
}
.app-modal-title {
        margin: 0;
        font-size: 20px;
        color: #1a3c1a;
        width: 100%;
}
.app-modal-body {
        font-size: 16px;
        line-height: 1.5;
}
