/* Base para el Neumorfismo (fondo, input) */
:root {
  --bg-color: #f0f0f3;
  --light-shadow: #ffffff;
  --dark-shadow: rgba(174, 174, 192, 0.4);
  --text-color: #4c4c4c;
  --active-text-color: #000000;
  /* Texto negro intenso al presionar */
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

/* --- ESTILOS DE TEXTAREA --- */

.neumorphic-textarea {
  width: 300px;
  max-width: 80vw;
  height: 60px;
  padding: 20px;
  border-radius: 15px;
  border: none;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  text-align: center;
  resize: none;
  /* Deshabilitar redimensión manual */
  -webkit-tap-highlight-color: transparent;
  transition: all 0.4s ease-in-out;
  box-shadow: inset 4px 4px 10px var(--dark-shadow),
    inset -4px -4px 10px var(--light-shadow);
}

.neumorphic-textarea.tall {
  height: 180px;
}

/* Mejora de foco para accesibilidad con brillo de color (MODO AGRESIVO) */
.neumorphic-textarea:focus,
.neumorphic-textarea:focus-visible {
  outline: none !important;
  outline-width: 0 !important;
  border: none !important;
  -moz-appearance: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: inset 4px 4px 10px var(--dark-shadow),
    inset -4px -4px 10px var(--light-shadow),
    inset 0 0 12px 4px rgba(138, 43, 226, 0.25) !important;
  /* Resplandor púrpura */
}

/* --- Hack para anular el fondo de autocompletado del navegador --- */
.neumorphic-textarea:-webkit-autofill,
.neumorphic-textarea:-webkit-autofill:hover,
.neumorphic-textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-color);
  box-shadow: inset 0 0 0 1000px var(--bg-color) !important;
  transition: background-color 5000s ease-in-out 0s;
}


/* --- ESTILOS DE BOTONES --- */

.glass-btn {
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  /* Elimina el resaltado de toque en móviles */

  /* Transiciones para hover y active */
  transition: all 0.2s ease-out;

  /* Efecto Glassmorphism */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* Neumorfismo flotante */
  box-shadow:
    15px 15px 30px var(--dark-shadow),
    -15px -15px 30px var(--light-shadow);
}

/* --- Formas Específicas --- */
.circle-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.pill-btn {
  width: 180px;
  height: 80px;
  border-radius: 40px;
}

/* --- Brillos de Color --- */
.orange-glow {
  box-shadow:
    15px 15px 30px var(--dark-shadow),
    -15px -15px 30px var(--light-shadow),
    0 0 10px 1px rgba(255, 165, 0, 0.2),
    inset 0 0 15px 2px rgba(255, 230, 204, 0.7);
}

.purple-glow {
  box-shadow:
    15px 15px 30px var(--dark-shadow),
    -15px -15px 30px var(--light-shadow),
    0 0 10px 1px rgba(138, 43, 226, 0.2),
    inset 0 0 15px 2px rgba(220, 204, 255, 0.7);
}


/* --- INTERACCIONES (NUEVO HOVER Y ACTIVE MEJORADO) --- */

/* --- CLASES DE UTILIDAD Y NUEVOS ELEMENTOS -- */

.mercancia-tip {
  font-size: 0.8rem;
  color: #8A2BE2;
  /* Un tono de púrpura */
  max-width: 320px;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

.info-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
  text-align: center;
  max-width: 350px;
}

#report-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* --- ANIMACIONES --- */

@keyframes pulse-neon {

  0%,
  100% {
    text-shadow: 4px 4px 10px var(--dark-shadow), -4px -4px 10px var(--light-shadow), 0 0 5px #39FF14, 0 0 10px #39FF14;
  }

  50% {
    text-shadow: 4px 4px 10px var(--dark-shadow), -4px -4px 10px var(--light-shadow), 0 0 20px #39FF14, 0 0 30px #39FF14;
  }
}

.loading-animation {
  animation: pulse-neon 1.5s ease-in-out infinite;
}

@keyframes pulsate {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.loading-text {
  animation: pulsate 1.5s ease-in-out infinite;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-color);
}

.result-card {
  background: linear-gradient(180deg, #7b3bd6, #8f5be0);
  color: #fff;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  max-width: 92%;
  margin: 0 auto;
  word-wrap: break-word;
  /* rompe palabras largas */
  white-space: pre-wrap;
  /* permite saltos de línea */
  overflow-wrap: anywhere;
}

.result-text {
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

/* 'Ver más' detalles */
.result-details {
  margin-top: 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.95);
}

.report-details strong {
  color: #fff;
}

/* --- Estilos para las Tarjetas del Informe --- */

.report-section-card {
  background: #4a90e2;
  /* Un azul agradable */
  color: #ffffff;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  /* Efecto Neumórfico Azul */
  box-shadow: 8px 8px 16px #3a73b5,
    -8px -8px 16px #5aaeff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.report-section-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}

.report-section-card .card-content p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.report-section-card .card-content ul {
  padding-left: 20px;
  margin: 0;
}

.report-section-card .card-content li {
  margin-bottom: 8px;
}

.report-section-card h4 {
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 1em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Estilos para la Vista de Informe --- */

.report-header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.report-header .site-title {
  font-size: 2.5rem;
  /* Un poco más pequeño en esta vista */
  margin: 0;
}

.report-footer {
  width: 100%;
  padding: 20px;
  margin-top: 20px;
  background: rgba(240, 240, 243, 0.7);
  /* Fondo semitransparente */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: center;
}

#report-content-wrapper {
  width: 100%;
  max-width: 600px;
  height: 70vh;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 20px;
  overflow-y: auto;
  text-align: left;
}

.report-final-text {
  white-space: pre-wrap;
  /* Respeta los saltos de línea y espacios del informe */
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
}

.report-section-title {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--active-text-color);
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 3px;
}

.report-section-content {
  font-size: 0.95em;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 10px;
}

.score-display {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.score-green {
  background-color: #28a745;
}

.score-yellow {
  background-color: #ffc107;
  color: #333;
}

.score-red {
  background-color: #dc3545;
}


.report-section-title {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--active-text-color);
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 3px;
}

.report-section-content {
  font-size: 0.95em;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 10px;
}

.score-display {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.score-green {
  background-color: #28a745;
}

.score-yellow {
  background-color: #ffc107;
  color: #333;
}

.score-red {
  background-color: #dc3545;
}


/* --- NUEVO LOADER NEUMÓRFICO --- */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.neumorphic-spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-color);
  box-shadow:
    8px 8px 16px var(--dark-shadow),
    -8px -8px 16px var(--light-shadow),
    inset 4px 4px 8px var(--dark-shadow),
    inset -4px -4px 8px var(--light-shadow);
  position: relative;
  animation: spin-pulse 2s linear infinite;
}

.neumorphic-spinner::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8A2BE2, #b8860b);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
  animation: spin-reverse 1.5s linear infinite;
}

@keyframes spin-pulse {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.05);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes spin-reverse {
  0% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* --- CLASES ESTRUCTURALES PARA EL INFORME --- */
.neumorphic-data-card {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
  text-align: left;
}

.data-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8A2BE2;
  /* Primary Purple */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: block;
}

.data-value {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.5;
  margin: 0;
}

.merx-code-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: 8px 8px 16px var(--dark-shadow), -8px -8px 16px var(--light-shadow);
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.merx-code-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  font-weight: 800;
  color: #8A2BE2;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin: 5px 0;
}

.risk-box {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 5px 5px 10px var(--dark-shadow), -5px -5px 10px var(--light-shadow);
  border-left: 4px solid #ff9800;
  /* Warning color */
}

.risk-title {
  font-weight: 700;
  color: #d35400;
  margin-bottom: 8px;
  font-size: 1rem;
}

.risk-tip {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #b9770e;
}

.tax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.tax-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  padding: 15px 10px;
  border-radius: 12px;
  box-shadow: inset 4px 4px 8px var(--dark-shadow), inset -4px -4px 8px var(--light-shadow);
}

.tax-item-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #7b7b7b;
}

.tax-item-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #28a745;
  /* Green for taxes/savings */
}

.savings-highlight {
  text-align: center;
  padding: 15px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 12px;
  border: 1px dashed rgba(40, 167, 69, 0.5);
  color: #1e7e34;
  font-weight: 600;
  box-shadow: 4px 4px 10px var(--dark-shadow), -4px -4px 10px var(--light-shadow);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes clear-anim {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  40% {
    opacity: 0;
    transform: scale(0.98);
  }

  50% {
    opacity: 0;
    transform: scale(0.98);
  }

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

.fade-in {
  animation: fade-in 0.3s ease-in-out forwards;
}

.fade-out {
  animation: fade-out 0.3s ease-in-out forwards;
}

.clearing {
  animation: clear-anim 0.5s ease-in-out;
}


/* --- INTERACCIONES (NUEVO HOVER Y ACTIVE MEJORADO) --- */

/* Elimina el anillo de enfoque nativo */
.glass-btn:focus,
.glass-btn:focus-visible,
.neumorphic-input:focus,
.neumorphic-input:focus-visible {
  outline: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
}

/* NUEVO: Efecto Hover para elevar el botón */
.glass-btn:hover {
  transform: translateY(-4px);
  filter: brightness(1.05);
}

/* Estado Presionado (Active) */
.glass-btn:active {
  transform: scale(0.98);
  color: var(--active-text-color);
  filter: brightness(1.1);
  box-shadow:
    5px 5px 15px var(--dark-shadow),
    -5px -5px 15px var(--light-shadow);
}

/* --- NUEVOS ESTILOS PARA LAYOUT Y FOOTER --- */

body {
  padding: 20px 0;
  /* Añade espacio vertical si el contenido es muy alto */
}

.site-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #4c4c4c;
  /* Oscurecido para mejor contraste */
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 4px var(--light-shadow), -2px -2px 4px var(--dark-shadow);
  letter-spacing: -1px;
}

.page-footer {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  /* Limita el ancho del footer */
  text-align: center;
}

.credits {
  font-size: 0.9rem;
  color: #a0a0a5;
  margin: 0;
}

.tech-stack {
  margin-top: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.tag {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 8px 0;
  /* Padding vertical */
  width: 120px;
  /* Ancho fijo para todos los tags */
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  text-align: center;
  display: inline-block;
  box-shadow: 5px 5px 10px var(--dark-shadow), -5px -5px 10px var(--light-shadow);
}

.tag:hover {
  transform: translateY(-2px);
  color: var(--active-text-color);
  box-shadow: 7px 7px 12px var(--dark-shadow), -7px -7px 12px var(--light-shadow);
}

.contact-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-shadow);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#contact-toggle {
  cursor: pointer;
  user-select: none;
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0 0 15px 0;
  padding: 5px 10px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

#contact-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

#contact-arrow {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
}

#contact-toggle.open #contact-arrow {
  transform: rotate(180deg);
}

#contact-collapsible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  overflow: hidden;
  transition: max-height 0.5s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
  max-height: 0;
  opacity: 0;
}

#contact-collapsible.open {
  max-height: 300px;
  opacity: 1;
  margin-top: 15px;
}

.neumorphic-textarea.small {
  height: 80px;
  min-height: 80px;
}

.whatsapp-btn {
  background-color: #25D366;
  /* Color de WhatsApp */
  color: white;
  border: none;
  border-radius: 25px;
  /* Bordes redondeados */
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* Espacio entre ícono y texto */
  transition: all 0.2s ease-in-out;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  background-color: #1EBE57;
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.25);
}

.whatsapp-btn:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- ANIMACIONES DE ENTRADA --- */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.page-footer>* {
  opacity: 0;
  /* Inicia invisible para animar */
  animation: fade-in-up 0.5s ease-out forwards;
}

/* Stagger (escalonamiento) de las animaciones */
.page-footer>.tech-stack {
  animation-delay: 0.2s;
}

.page-footer>.credits:nth-of-type(1) {
  animation-delay: 0.3s;
}

.page-footer>.credits:nth-of-type(2) {
  animation-delay: 0.4s;
}

.page-footer>.contact-section {
  animation-delay: 0.5s;
}

.github-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* Espacio entre el tag y el texto */
}

.github-label {
  font-size: 0.7rem;
  color: #a0a0a5;
  font-style: italic;
}

.contact-link {
  background-color: #8A2BE2;
  /* Purple background */
  color: #ffffff;
  /* White text */
  padding: 12px 24px;
  /* More padding */
  border-radius: 25px;
  /* Pill shape */
  text-decoration: none;
  font-weight: 500;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
  transition: all 0.3s ease;
  display: inline-block;
  margin: 15px 0;
}

.contact-link:hover {
  background-color: #7b26cb;
  /* Darker purple on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
  color: #fff;
}

/* --- Policy Section Styles --- */
.policy-section {
  width: 100%;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-shadow);
}

.policy-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.policy-toggle-btn {
  background: var(--bg-color);
  color: var(--text-color);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 5px 5px 10px var(--dark-shadow), -5px -5px 10px var(--light-shadow);
  transition: all 0.2s ease-in-out;
}

.policy-toggle-btn:hover {
  transform: translateY(-2px);
  color: var(--active-text-color);
}

.policy-toggle-btn.active {
  background: #8A2BE2;
  color: white;
  box-shadow: inset 2px 2px 5px #6a20b3, inset -2px -2px 5px #ac36ff;
}

.policy-content {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 15px;
  box-shadow: inset 4px 4px 10px var(--dark-shadow), inset -4px -4px 10px var(--light-shadow);
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
}

.policy-content h4 {
  margin-top: 0;
  color: #8A2BE2;
}

.policy-content a {
  color: #8A2BE2;
  font-weight: 600;
  text-decoration: none;
}

.policy-content a:hover {
  text-decoration: underline;
}

/* --- Estilos para Contenedor de Textarea y Botón de Pegar --- */

.textarea-container {
  position: relative;
  width: 340px;
  /* Ancho para acomodar el textarea y padding */
  max-width: 90vw;
}

#paste-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  /* Tamaño pequeño */
  height: 40px;
  padding: 0;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
  /* Sin sombra para un look más sutil */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0.6;
  transition: opacity 0.2s ease-in-out, background 0.2s ease-in-out;
}

#paste-button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

#paste-button svg {
  width: 20px;
  /* Tamaño del ícono */
  height: 20px;
  stroke: var(--text-color);
}

/* --- Merx Academy: Estilo Neumórfico Sólido --- */

.academy-container {
  background: var(--bg-color);
  padding: 25px;
  border-radius: 25px;
  box-shadow: 10px 10px 20px var(--dark-shadow),
    -10px -10px 20px var(--light-shadow);
  width: 100%;
  max-width: 600px;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.academy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-color);
}

.level-toggles {
  display: flex;
  gap: 12px;
}

.level-btn {
  background: var(--bg-color);
  border: none;
  padding: 10px 18px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  box-shadow: 5px 5px 10px var(--dark-shadow),
    -5px -5px 10px var(--light-shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-btn.active {
  box-shadow: inset 4px 4px 8px var(--dark-shadow),
    inset -4px -4px 8px var(--light-shadow);
  color: #8A2BE2;
}

.academy-body {
  text-align: left;
}

.interactive-blocks {
  margin-top: 20px;
  padding: 15px;
  border-radius: 20px;
  background: var(--bg-color);
  box-shadow: inset 5px 5px 10px var(--dark-shadow),
    inset -5px -5px 10px var(--light-shadow);
}

.blocks-container,
.drop-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  min-height: 45px;
  align-items: center;
}

.hierarchy-block {
  background: var(--bg-color);
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  box-shadow: 5px 5px 10px var(--dark-shadow),
    -5px -5px 10px var(--light-shadow);
  user-select: none;
  transition: all 0.2s ease;
}

.hierarchy-block:hover {
  transform: translateY(-2px);
}

.hierarchy-block:active {
  box-shadow: inset 2px 2px 5px var(--dark-shadow),
    inset -2px -2px 5px var(--light-shadow);
}

.code-breakdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
}

.digit-box {
  width: 42px;
  height: 55px;
  background: var(--bg-color);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  color: #8A2BE2;
  box-shadow: inset 3px 3px 6px var(--dark-shadow),
    inset -3px -3px 6px var(--light-shadow);
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.digit-box:hover {
  color: #ff8c00;
  transform: scale(1.05);
}

.dot {
  font-weight: 700;
  color: var(--text-color);
  font-size: 1.5rem;
}

/* --- Accordion Informe: Neumorfismo --- */

.accordion-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.accordion-item {
  background: var(--bg-color);
  border-radius: 20px;
  box-shadow: 8px 8px 16px var(--dark-shadow),
    -8px -8px 16px var(--light-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-header {
  width: 100%;
  padding: 20px 25px;
  background: var(--bg-color);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: left;
}

.accordion-header::after {
  content: '+';
  font-size: 1.4rem;
  color: #8A2BE2;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
  content: '−';
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease;
  padding: 0 25px;
  background: var(--bg-color);
}

.accordion-item.active .accordion-content {
  max-height: 2000px;
  /* Suficiente para contenido largo */
  padding: 15px 25px 25px 25px;
}

/* --- Dynamic Lesson Card --- */
.academy-container.dynamic-lesson {
  border-left: 5px solid #ff8c00;
  margin-top: 30px;
}