body {
  margin: 0;
  background: #1d1b1b;
  font-family: monospace;
}

.container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  flex-direction: row;
  width: 100%;
  padding: 3.5rem;
  box-sizing: border-box;
}

#scrambleText {
  flex: 1 1 50%;
  line-height: 1;  
}

.line {
  position: relative;
  color: #04d3a6;
  font-weight: bold;
  font-size: clamp(3rem, 16vw, 20vh);
  white-space: nowrap;
}

.line::before,
.line::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #aa17ff;
  clip: rect(0, 900px, 0, 0);
}

.line::before {
  left: 2px;
  text-shadow: -2px 0 red;
}

.line::after {
  left: -2px;
  text-shadow: -2px 0 blue;
}

.line:hover {
  animation: glitch 1s infinite;
}

.line:hover::before {
  animation: glitchTop 1s infinite linear alternate-reverse;
}

.line:hover::after {
  animation: glitchBottom 1s infinite linear alternate-reverse;
}

@keyframes glitch {
  2%, 64% { transform: translate(2px, 0); }
  4%, 60% { transform: translate(-2px, 0); }
  62% { transform: translate(0, 0) skew(5deg); }
}

@keyframes glitchTop {
  2%, 64% {
    clip: rect(2px, 9999px, 5px, 0);
    transform: translate(2px, -2px);
  }
  4%, 60% {
    clip: rect(15px, 9999px, 20px, 0);
    transform: translate(-2px, 2px);
  }
  62% {
    clip: rect(5px, 9999px, 10px, 0);
    transform: translate(13px, -1px) skew(-13deg);
  }
}

@keyframes glitchBottom {
  2%, 64% {
    clip: rect(85px, 9999px, 90px, 0);
    transform: translate(-2px, 0);
  }
  4%, 60% {
    clip: rect(55px, 9999px, 60px, 0);
    transform: translate(-2px, 0);
  }
  62% {
    clip: rect(75px, 9999px, 80px, 0);
    transform: translate(-22px, 5px) skew(21deg);
  }
}

.narrative {
 flex: 1 1 40%;
  max-width: 600px;
}


.slide {
  display: none;
  background: #111;
  border: 2px solid #04d3a6;
  border-radius: 1rem;
  padding: 2rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(4, 211, 166, 0.2);
  height: 500px; 
  flex-direction:column;
  justify-content:flex-start;
  overflow: hidden;
  
}

.slide.active {
  display: flex;
  flex-direction: column;
}
.table-wrapper {
  flex: 1;
  overflow-y: auto; 
  margin: 1rem 0 0; 
}

.slide iframe {
  border: none;
  border-radius: 0.5rem;
  width: 100%;
  aspect-ratio: 4/3;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
   max-width: fit-content;
  margin: 1rem 0 0;
  background: #04d3a6;
  color: #000;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
}
/* Estilo para tablas dataframe */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.dataframe {
  width: 100%;
  border-collapse: collapse;
  color: #eee;
  background: #1d1b1b;
  font-family: monospace;
}

.dataframe th,
.dataframe td {
  border: 1px solid #04d3a6;
  padding: 0.5rem 1rem;
  text-align: left;
}

.dataframe thead {
  background: #04d3a6;
  color: #000;
}

.dataframe tbody tr:nth-child(even) {
  background: #2a2727;
}

.dataframe tbody tr:hover {
  background: #333;
}

.dataframe th {
  font-weight: bold;
}

.dataframe td {
  white-space: nowrap;
}
@media (max-width: 730px) {
  .container {
    flex-direction: column;
  }

  #scrambleText {
    flex: 1 1 100%;
    margin-left: 2vw;
    order: 1;  /* Texto primero */
  }
  .narrative {
    order: 2;
}
.slide {
  height: auto;
  max-height: 
  90vh;
  overflow: hidden;
}
.slide iframe {
  max-height: 70vh; 
  max-width: 80vh;
}
}
