/* Caminho Game Styles */
:root {
  --game-bg: #f0f4f8;
  --game-card-bg: #ffffff;
  --game-primary: #7f6bff;
  --game-secondary: #3ab6ff;
  --game-accent: #33d1a0;
  --game-text: #1f1c3d;
  --game-text-light: #6b7280;

  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
  /* background-color: var(--game-bg); */
  overflow-x: hidden;
}

/* Background image for caminho pages */
.page-wrapper {
  background-image: url('/assets/images/backgrounds/minha-casa-facil-bg2.png');
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.page-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(230, 248, 255, 0.3) 0%, rgba(207, 237, 248, 0.4) 100%);
  pointer-events: none;
  z-index: 0;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* Caminho Index Page Styles */
.caminho-hero {
  padding: var(--spacing-lg) var(--spacing-lg);
}

.caminho-hero__content {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.caminho-hero__content h1 {
  margin-bottom: var(--spacing-md);
}

.lead {
  background: var(--color-white-transparent);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--color-shadow-medium);
  backdrop-filter: blur(10px);
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 800px;
  position: relative;
}

.lead-inner {
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: calc(var(--radius-md) - 2px);
  position: relative;
  z-index: 1;
}

.cta-group {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.caminho-preview {
  padding: var(--spacing-lg) var(--spacing-lg);
  max-width: 1000px;
  margin: 0 auto;
}

.preview-card {
  background: var(--color-white-transparent);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--color-shadow-medium);
  backdrop-filter: blur(10px);
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

.preview-card-inner {
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: calc(var(--radius-md) - 2px);
  position: relative;
  z-index: 1;
}

.preview-card:last-child {
  margin-bottom: 0;
}

.preview-card-inner h2 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  color: var(--game-text);
}

.preview-card-inner ol,
.preview-card-inner ul {
  margin: 0;
  padding-left: var(--spacing-lg);
}

.preview-card-inner li {
  margin-bottom: var(--spacing-sm);
}

.preview-card-inner p {
  margin-bottom: 0;
}

@media only screen and (max-width: 820px) {
  .caminho-hero {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .lead {
    padding: var(--spacing-md);
    font-size: 1.1rem;
    border-radius: 0;
  }
  
  .lead-inner {
    padding: var(--spacing-md);
    border-radius: 0;
  }
  
  .caminho-preview {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .preview-card {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: 0;
  }
  
  .preview-card-inner {
    padding: var(--spacing-md);
    border-radius: 0;
  }
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .caminho-hero {
    padding: var(--spacing-xl) var(--spacing-lg);
  }
  
  .caminho-preview {
    padding: var(--spacing-xl) var(--spacing-lg);
  }
  
  .preview-card {
    padding: var(--spacing-lg);
  }
  
  .preview-card-inner {
    padding: var(--spacing-lg);
  }
  
  .lead {
    padding: var(--spacing-md);
  }
  
  .lead-inner {
    padding: var(--spacing-md);
  }
  
  .guidance-card {
    padding: var(--spacing-lg);
  }
  
  .guidance-item {
    padding: var(--spacing-md);
  }
}

@media only screen and (min-width: 1025px) {
  .caminho-hero {
    padding: var(--spacing-xl) var(--spacing-xl);
  }
  
  .caminho-preview {
    padding: var(--spacing-xl) var(--spacing-xl);
  }
  
  .preview-card {
    padding: var(--spacing-lg);
  }
  
  .preview-card-inner {
    padding: var(--spacing-lg);
  }
  
  .lead {
    padding: var(--spacing-md);
  }
  
  .lead-inner {
    padding: var(--spacing-md);
  }
  
  .guidance-card {
    padding: var(--spacing-lg);
  }
  
  .guidance-item {
    padding: var(--spacing-md);
  }
}

@media only screen and (max-width: 480px) {
  .caminho-hero {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  .lead {
    padding: var(--spacing-sm);
    font-size: 1rem;
    border-radius: 0;
  }
  
  .lead-inner {
    padding: var(--spacing-sm);
    border-radius: 0;
  }
  
  .caminho-preview {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  .preview-card {
    padding: var(--spacing-sm);
    border-radius: 0;
  }
  
  .preview-card-inner {
    padding: var(--spacing-sm);
    border-radius: 0;
  }
}

/* Responsive: disable fixed background on mobile */
@media only screen and (max-width: 820px) {
  .page-wrapper {
    background-attachment: scroll;
  }
}

/* Hide default header/footer for immersive mode if needed, 
   but for now we just style the wrapper to take over */
.caminho-game-wrapper {
  min-height: 90vh;
  /* Allow for some browser chrome */
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-md);
  font-family: 'Inter', sans-serif;
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .caminho-game-wrapper {
    padding: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .caminho-game-wrapper {
    padding: var(--spacing-xl);
  }
}

/* Top HUD */
.game-hud-top {
  margin-bottom: var(--spacing-lg);
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .game-hud-top {
    margin-bottom: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .game-hud-top {
    margin-bottom: var(--spacing-lg);
  }
}

.game-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.game-progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--game-primary), var(--game-secondary));
  transition: width 0.5s ease;
}

.faixa-grid {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 0 4px;
}

.faixa-block {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
  border: 2px solid transparent;
}

.faixa-block.high {
  border-color: var(--game-accent);
  background: rgba(51, 209, 160, 0.05);
}

.faixa-block.med {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.05);
}

.faixa-block.low {
  border-color: #eee;
  opacity: 0.7;
}

.faixa-block-header {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--game-text-light);
  margin-bottom: 2px;
}

.faixa-block-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--game-text);
  margin-bottom: 4px;
}

.faixa-block-bar {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}

.faixa-block-bar .fill {
  height: 100%;
  background: var(--game-text-light);
  transition: width 0.3s;
}

.faixa-block.high .fill {
  background: var(--game-accent);
}

.faixa-block.med .fill {
  background: #ffd700;
}

.faixa-block.low .fill {
  background: #ccc;
}

/* Main Stage */
.game-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  position: relative;
  z-index: 10;
}

.question-container {
  width: 100%;
  position: relative;
  z-index: 10;
}

.question-card {
  background: var(--game-card-bg);
  padding: var(--spacing-xl);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  animation: slideUp 0.4s ease-out;
  text-align: center;
  position: relative;
  z-index: 10;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-card h2 {
  font-size: 1.5rem;
  color: var(--game-text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.question-helper {
  color: var(--game-text-light);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xl);
}

.lead-capture-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.question-label {
  display: block;
  margin-bottom: 15px;
}

.question-label-text {
  display: block;
  font-size: 0.95rem;
  color: var(--game-text-light);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-align: left;
}

.question-label input[type="number"],
.question-label input[type="text"],
.question-label input[type="email"],
.question-label input[type="tel"] {
  width: 100%;
  padding: 1rem;
  font-size: 1.5rem;
  text-align: center;
  border: 2px solid #eee;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.question-label input:focus {
  border-color: var(--game-primary);
}

.question-label input.field-invalid {
  border-color: #ff6b6b;
  background-color: #fff5f5;
}

.field-error {
  display: none;
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: left;
}

.question-checkbox-label .field-error {
  position: absolute;
  bottom: -1.5rem;
  left: 1rem;
  font-size: 0.85rem;
}

.question-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0;
  cursor: pointer;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #eee;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.question-checkbox-label:hover {
  background: #f0f4f8;
  border-color: var(--game-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(127, 107, 255, 0.1);
}

.question-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

/* Custom checkbox box */
.question-checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  margin-top: 0.1rem;
}

.question-checkbox-label:hover .question-checkbox-custom {
  border-color: var(--game-primary);
}

/* Checked state */
.question-checkbox-label input[type="checkbox"]:checked ~ .question-checkbox-custom {
  background: var(--game-primary);
  border-color: var(--game-primary);
}

.question-checkbox-label input[type="checkbox"]:checked ~ .question-checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.question-checkbox-text {
  font-size: 0.9rem;
  color: var(--game-text);
  /* line-height: 1.5; */
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  text-align: left;
}

/* Choice Pills */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.choice-pill.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.choice-pill.disabled input {
  cursor: not-allowed;
}

.choice-pill {
  cursor: pointer;
  position: relative;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
}

.choice-pill span {
  display: block;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  color: var(--game-text);
  transition: all 0.2s;
}

.choice-pill input:checked+span {
  background: rgba(127, 107, 255, 0.1);
  border-color: var(--game-primary);
  color: var(--game-primary);
}

.btn-primary {
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  background: var(--game-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(127, 107, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(127, 107, 255, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(127, 107, 255, 0.3);
}

/* Phone confirmation row in lead form */
.phone-confirm-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.phone-confirm-prefix {
  font-family: inherit;
  font-size: 1rem;
  color: var(--game-text-muted, #6c757d);
  white-space: nowrap;
}

#lead-phone-last4 {
  /* max-width: 90px; */
  text-align: center;
}

.btn-ghost {
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--game-primary);
  background: transparent;
  border: 2px solid var(--game-primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-ghost::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(127, 107, 255, 0.1);
  transition: width 0.3s ease;
  z-index: 0;
}

.btn-ghost span,
.btn-ghost {
  position: relative;
  z-index: 1;
}

.btn-ghost:hover {
  background: rgba(127, 107, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127, 107, 255, 0.2);
  border-color: var(--game-primary);
}

.btn-ghost:hover::before {
  width: 100%;
}

.btn-ghost:active {
  transform: translateY(0) scale(0.98);
}

/* Result Disclaimer */
.result-disclaimer {
  background: rgba(255, 107, 107, 0.3);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--color-shadow-medium);
  backdrop-filter: blur(10px);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid #ff6b6b;
}

.result-disclaimer .disclaimer-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  color: #ff6b6b;
}

.result-disclaimer p {
  margin-bottom: var(--spacing-sm);
  color: #333;
}

.result-disclaimer p:last-child {
  margin-bottom: 0;
}

.result-cta {
  margin-top: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: 0 var(--spacing-sm);
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .result-cta {
    margin-top: var(--spacing-xl);
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
  }
}

@media only screen and (min-width: 1025px) {
  .result-cta {
    margin-top: var(--spacing-xl);
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
  }
}

.result-cta .btn {
  text-align: center;
  letter-spacing: 0.01em;
}

/* Bottom HUD */
.game-hud-bottom {
  margin-top: var(--spacing-lg);
  display: grid;
  gap: var(--spacing-md);
  position: relative;
  z-index: 0;
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .game-hud-bottom {
    margin-top: var(--spacing-lg);
    gap: var(--spacing-md);
  }
}

@media only screen and (min-width: 1025px) {
  .game-hud-bottom {
    margin-top: var(--spacing-lg);
    gap: var(--spacing-md);
  }
}

.archetype-mini-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: auto;
  align-items: center;
  padding: 10px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  width: auto;
  max-width: none;
  margin: 0;
  position: relative;
  z-index: 0;
}

.arch-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--game-text-light);
  margin-bottom: 4px;
  font-weight: 600;
}

.arch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.arch-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.arch-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.arch-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.arch-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--game-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arch-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  position: relative;
  z-index: 0;
}

.arch-bar-track {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  width: auto;
  /* Override previous width */
}

.arch-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  /* JS sets width */
  background: var(--game-secondary);
  transition: width 0.5s var(--ease-spring);
}

.arch-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--game-text-light);
  min-width: 30px;
  text-align: right;
}

.agent-floating-counter {
  background: white;
  padding: 0.8rem 1.2rem;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  animation: popIn 0.5s var(--ease-spring);
  margin: 0 auto;
  max-width: none;
  justify-content: center;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.agent-icon {
  font-size: 1.5rem;
}

.agent-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.agent-text .percent-line {
  margin-top: 0;
  font-size: 0.75rem;
  color: var(--game-text-light);
}

/* Loading */
.loading-spinner {
  color: var(--game-text-light);
  font-size: 1.2rem;
}

/* Guidance Cards */
.guidance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.guidance-card {
  background: var(--color-white-transparent);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--color-shadow-medium);
  backdrop-filter: blur(10px);
  position: relative;
}

.guidance-header {
  margin-bottom: var(--spacing-md);
}

.guidance-item {
  background-color: var(--color-white);
  padding: var(--spacing-sm);
  border-radius: calc(var(--radius-md) - 2px);
  margin-bottom: var(--spacing-xs);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guidance-item:last-child {
  margin-bottom: 0;
}

.guidance-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-shadow-medium);
}

.guidance-item h4 {
  margin-top: 0;
  margin-bottom: var(--spacing-xs);
  font-size: 1rem;
  font-weight: 700;
  color: var(--game-text);
}

.guidance-item p {
  margin-bottom: 0;
  color: var(--game-text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.placeholder-card {
  background: var(--color-white-transparent);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px var(--color-shadow-medium);
  backdrop-filter: blur(10px);
  text-align: center;
  color: var(--game-text-light);
}

@media only screen and (max-width: 820px) {
  .guidance-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .guidance-card {
    padding: var(--spacing-md);
    border-radius: 16px;
  }
  
  .guidance-item {
    padding: var(--spacing-md);
    border-radius: calc(var(--radius-md) - 2px);
  }
  
  .placeholder-card {
    border-radius: 16px;
  }
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .guidance-grid {
    gap: var(--spacing-md);
  }
}

@media only screen and (min-width: 1025px) {
  .guidance-grid {
    gap: var(--spacing-md);
  }
}

/* Collected Advices Section */
.result-advices-root {
  background: white;
  border-radius: 16px;
  padding: var(--spacing-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-top: var(--spacing-lg);
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .result-advices-root {
    padding: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .result-advices-root {
    padding: var(--spacing-lg);
  }
}

.collected-advices h2 {
  color: var(--game-text);
  margin-bottom: var(--spacing-lg);
  font-size: 1.75rem;
}

.advice-section {
  margin-bottom: var(--spacing-lg);
}

.advice-section:last-child {
  margin-bottom: 0;
}

.advice-category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  color: var(--game-text);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid #f0f0f0;
}

.advice-category-title .icon {
  font-size: 1.4rem;
}

.advice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.advice-item {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #f8f9fa;
  border-left: 4px solid var(--game-text-light);
  line-height: 1.6;
  color: var(--game-text);
  transition: transform 0.2s, box-shadow 0.2s;
}

.advice-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Category-specific styling */
.advice-item.advice-positive_feedback {
  background: rgba(51, 209, 160, 0.08);
  border-left-color: var(--game-accent);
}

.advice-item.advice-quick_win {
  background: rgba(255, 215, 0, 0.08);
  border-left-color: #ffd700;
}

.advice-item.advice-warning {
  background: rgba(255, 107, 107, 0.08);
  border-left-color: #ff6b6b;
}

.advice-item.advice-optimization {
  background: rgba(127, 107, 255, 0.08);
  border-left-color: var(--game-primary);
}

.advice-item.advice-next_step {
  background: rgba(58, 182, 255, 0.08);
  border-left-color: var(--game-secondary);
}

.advice-item.advice-educational {
  background: rgba(155, 135, 245, 0.08);
  border-left-color: #9b87f5;
}

/* Gamification Overlay */
#gamification-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.gamification-toast {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  margin-bottom: 1rem;
  pointer-events: auto;
  animation: slideDownFade 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 6px solid var(--game-accent);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
}

.gamification-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.gamification-close:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.05);
}

.gamification-toast.closing {
  animation: slideUpFadeOut 0.4s ease forwards;
}

.gamification-icon {
  font-size: 2rem;
  line-height: 1;
}

.gamification-content {
  flex: 1;
}

.gamification-message {
  font-size: 0.95rem;
  color: var(--game-text);
  line-height: 1.5;
  font-weight: 500;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUpFadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Animations defined in JSON */
.pulse-green {
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(51, 209, 160, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(51, 209, 160, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(51, 209, 160, 0);
  }
}

.popup-positive {
  animation: popUpPositive 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUpPositive {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Simple CSS Confetti Fallback */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffd700;
  top: -10px;
  opacity: 0;
}

.confetti-piece:nth-child(odd) {
  background: var(--game-secondary);
}

.confetti-piece:nth-child(even) {
  background: var(--game-primary);
}

.confetti-piece:nth-child(3n) {
  background: var(--game-accent);
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    top: -10px;
    transform: translateX(0) rotate(0deg);
  }

  100% {
    opacity: 0;
    top: 100vh;
    transform: translateX(100px) rotate(720deg);
  }
}

/* --- Result Page Redesign --- */

/* Result Page Containers */
.caminho-result {
  padding: var(--spacing-lg) var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.result-shell {
  width: 100%;
}

.result-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding: 0 var(--spacing-md);
}

.result-header h1 {
  margin-bottom: var(--spacing-md);
}

.result-header .subtitle {
  color: var(--game-text-light);
  font-size: 1.1rem;
  margin-bottom: 0;
}

.result-location-root,
.result-insights-root,
.result-advices-root,
.result-guidance-root {
  margin-bottom: var(--spacing-lg);
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .caminho-result {
    padding: var(--spacing-xl) var(--spacing-lg);
  }
  
  .result-header {
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-lg);
  }
  
  .result-location-root,
  .result-insights-root,
  .result-advices-root,
  .result-guidance-root {
    margin-bottom: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .caminho-result {
    padding: var(--spacing-xl) var(--spacing-xl);
  }
  
  .result-header {
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-xl);
  }
  
  .result-location-root,
  .result-insights-root,
  .result-advices-root,
  .result-guidance-root {
    margin-bottom: var(--spacing-lg);
  }
}

@media only screen and (max-width: 820px) {
  .caminho-result {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .result-header {
    margin-bottom: var(--spacing-lg);
    padding: 0;
  }
  
  .result-location-root,
  .result-insights-root,
  .result-advices-root,
  .result-guidance-root {
    margin-bottom: var(--spacing-lg);
  }
}

/* Hero Section Grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .insights-grid {
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .insights-grid {
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }
}

/* Base Card Style (Glassmorphism/Premium) */
.result-card {
  background: #ffffff;
  border-radius: 16px;
  padding: var(--spacing-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

@media only screen and (min-width: 821px) and (max-width: 1024px) {
  .result-card {
    padding: var(--spacing-lg);
  }
}

@media only screen and (min-width: 1025px) {
  .result-card {
    padding: var(--spacing-lg);
  }
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Faixa Card Specifics */
.faixa-card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-left: 4px solid var(--game-primary);
}

.faixa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.faixa-badge {
  background: var(--game-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.faixa-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--game-text);
  margin: 0.5rem 0;
  line-height: 1.1;
}

.faixa-description {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

.explanation-box {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  padding: var(--spacing-sm);
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
  color: #555;
  border-left: 3px solid rgba(0, 0, 0, 0.1);
}

.explanation-title {
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--game-text);
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* Approval Card Specifics */
.approval-card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border-left: 4px solid #2196F3;
  /* Blue for approval */
}

.approval-score-large {
  font-size: 3.5rem;
  font-weight: 800;
  color: #2196F3;
  line-height: 1;
  margin: 0.5rem 0;
}

.approval-bar-container {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
}

.approval-bar-fill {
  height: 100%;
  background: #2196F3;
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* Financial Cards (Leftover, etc) */
.financial-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.financial-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--game-secondary);
}

.financial-label {
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Location Ticket Style */
/* Typeahead Styles */
.typeahead-wrapper {
  position: relative;
  width: 100%;
  z-index: 100;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10000;
  list-style: none;
  padding: 0;
  display: none;
  /* Hidden by default */
}

.suggestions-list.visible {
  display: block;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1rem;
  color: var(--game-text);
  border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f8f9fa;
  color: var(--game-primary);
}

.suggestion-item.selected {
  background: rgba(127, 107, 255, 0.1);
  color: var(--game-primary);
}

/* Location Ticket Style */
.location-ticket {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  /* Mobile first */
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px dashed #ccc;
  /* Perforation effect hint */
  position: relative;
}

@media (min-width: 600px) {
  .location-ticket {
    flex-direction: row;
  }
}

.ticket-left {
  background: var(--game-primary);
  color: white;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 120px;
  text-align: center;
}

.ticket-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.ticket-right {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ticket-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.ticket-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--game-text);
  margin-bottom: 0.5rem;
}

.ticket-sub {
  font-size: 1rem;
  color: #666;
}

/* Archetype Premium */
.archetype-card-premium {
  margin-top: 2rem;
}

.arch-premium-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arch-premium-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.arch-premium-item:last-child {
  border-bottom: none;
}

.arch-premium-icon {
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.arch-premium-info {
  flex: 1;
}

.arch-premium-name {
  font-weight: 600;
  color: var(--game-text);
  display: block;
}

.arch-premium-bar {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  margin-top: 4px;
  width: 100%;
  overflow: hidden;
}

.arch-premium-fill {
  height: 100%;
  background: var(--game-secondary);
  border-radius: 3px;
}