
#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: block;
    pointer-events: none;
}

body {
    background-color: #000;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Aseguramos que el cuerpo ocupe toda la altura de la pantalla */
    display: flex; /* Usamos flexbox para centrar el contenido */
    flex-direction: column;
    justify-content: center; /* Centra verticalmente */
    align-items: center; /* Centra horizontalmente */
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #101010;
}

     .container {
      height: 100%;  
      display: flex;
  justify-content: center;
  align-items: center; /* si quieres centrar también verticalmente */
  flex-direction: column; 
      position: relative;
      perspective: 1100px;
    }


        #carousel {
      width: 200px;
      height: 200px;
      
    border-radius: 50%;
    border: 2.5px solid #00ff99;
    box-shadow: 0 0 24px #00ff99, 0 0 8px #00ff99;
              transform: translateZ( -288px );
              transform-style: preserve-3d;
              transition: transform 1s;
    }

        #carousel figure {
      display: block;
      position: absolute;
      width: 80%;
      height: 80%;
      left: 10px;
      top: 10px;
      line-height: 116px;
      font-size: 80px;
      font-weight: bold;
      color: white;
      text-align: center;
      margin: 0;
    border-radius: 15%;
    background: #10101034;
    opacity: 0.8;
    border: 2.5px solid #00ff99;
    box-shadow: 0 0 24px #00ff99, 0 0 8px #00ff99;
    }
        #carousel figure > a > img {
      width: 100%;
      height: 100%;
-webkit-transition: all 2s ease;
-moz-transition: all 2s ease;
-ms-transition: all 2s ease;
transition: all 2s ease;
    }
        #carousel figure > a > img:hover {
      width: 100%;
      height: 100%;
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
transition: 1s ease;
    }
     #carousel figure:nth-child(1) {
              transform: rotateY( 0deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(2) {
              transform: rotateY( 40deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(3) {
              transform: rotateY( 80deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(4) {
              transform: rotateY( 120deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(5) {
              transform: rotateY( 160deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(6) {
              transform: rotateY( 200deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(7) {
              transform: rotateY( 240deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(8) {
              transform: rotateY( 280deg ) translateZ( 288px );
    }
    #carousel figure:nth-child(9) {
              transform: rotateY( 320deg ) translateZ( 288px );
    }
        #carousel {
        animation: rotateInY 60s infinite linear;
    }
    @keyframes rotateInY {
  0%   { transform: translateZ(-288px) rotateY(0deg);   }
  100% { transform: translateZ(-288px) rotateY(360deg);    }
    }

    
.codice{
   display:flex;
   margin:auto;
  width: 100%;
  text-align: center;
  line-height: : 111%;
  }
  
    .nombreeY1, .nombreeY2, .nombreeY3 {
      width: 100vw;
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: absolute;
    }
    
    .contenedorImgCub{
      width: 100vw;
      height: 100vh;
      bottom: 2222px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    .caja {
      position: relative;
        width: 400px;
        height: 400px;
        transform-style: preserve-3d;
        transform-origin: 200px 200px 0;
        animation: girar 10s ease-in-out alternate infinite;
    }
    .nombreeY1 {
    font-size: 7.98em;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    color: #042e13;
   display:flex;
   margin:auto;
  width: 100%;
  text-align: center;
  line-height: : 111%;

    }
    .nombreeY2 {
    font-size: 7.98em;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    color: #05e855;

    text-shadow: 0 0 8px #00ff99, 0 0 2px #000;
   display:flex;
   margin:auto;
  width: 100%;
  text-align: center;
  line-height: : 111%;
  opacity: 0%;
-webkit-transition: all 3S ease;
-moz-transition: all 3S ease;
-ms-transition: all 3S ease;
transition: all 3S ease;

    }
    .nombreeY2:hover {
  opacity: 80%;
    }
    
    .contenedorImgCub{
      width: 100vw;
      height: 100vh;
      bottom: 2222px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    
    .cara{
      position: absolute;
        width: 400px;
        height: 400px;
    }
    .caraw{
      position: absolute;
        width: 400px;
        height: 400px;
        animation: girarw 20s ease-in-out alternate infinite;
    }
    .caraf{
      position: absolute;
        width: 400px;
        height: 400px;
        animation: girarw 20s  ease-in-out alternate infinite;
    }
    .caraw img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .caraf img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .caraf1:hover{
        opacity: 0%;
    }
    .caraf1{
      transform: rotateZ(90deg);
    }
    .caraw1{
      transform: rotateZ(90deg);
    }
    .cara1{
      transform: translateZ(200px);
    }
    .cara2{
      transform: rotateY(90deg) translateZ(200px);
    }
    .cara3{
      transform: rotateY(90deg) rotateX(90deg) translateZ(200px);
    }
    .cara4{
      transform: rotateX(180deg) rotateZ(90deg) translateZ(200px);
    }
    .cara5{
      transform: rotateY(-90deg) rotateZ(90deg) translateZ(200px);
    }
    .cara6{
      transform: rotateX(-90deg) translateZ(200px);
    }
    .cara img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    @keyframes girar{
    0%{
        transform: rotateY(0deg);
    }
    20% {
        transform: rotateY(90deg) rotateZ(90deg)  ;
    }
    40% {
        transform: rotateY(180deg) rotateZ(180deg)  ;
    }
    50% {
        transform: rotateY(180deg) rotateZ(20deg) ;
    }
    60% {
        transform: rotateY(120deg) rotateZ(20deg) ;
    }
    80% {
        transform: rotateY(60deg);
    }
    100% {
        transform: rotateY(0deg);
    }

    }
/* === TOOLTIP TYPEWRITER PARA BOTONES CIRCULARES DE NAVEGACIÓN === */
.btn-circular-nav {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #000000e6;
    border: 3px solid #00ff99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px #39ff14, 0 0 6px #00ff99;
    color: #00ff99;
    font-size: 2.1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    text-decoration: none;
    outline: none;
    z-index: 100;
}


.btn-circular-nav:hover,
.btn-circular-nav:focus {
    background: #00ff99;
    color: #101010;
    border-color: #fff;
    box-shadow: 0 0 32px #00ff99, 0 0 12px #fff;
}

/* Optimización de tooltips */
.btn-tooltip-typewriter {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 110%;
    min-width: 120px;
    translate: 0 90%;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid black;
    animation: typing 4s steps(30, end), blink-caret 0.5s step-end infinite;
}

.btn-circular-nav:hover .btn-tooltip-typewriter,
.btn-circular-nav:focus .btn-tooltip-typewriter {
    display: block;
    background: rgba(0, 0, 0, 0.92);
    color: #39ff14;
    border: 2px solid #00ff99;
    border-radius: 8px;
    font-size: 0.98em;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    box-shadow: 0 0 18px #00ff99, 0 0 8px #39ff14;
    text-shadow: 0 0 8px #00ff99, 0 0 2px #000;
    pointer-events: none;
    z-index: 99999;
    text-align: center;
    animation: typewriterMatrix-tooltip 1.2s steps(18, end) 0.1s 1 normal both;
}
@keyframes typing {
  from {
    width: 0; /* Comienza con un ancho de 0 */
  }
  to {
    width: 100%; /* Anima hasta mostrar todo el texto */
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent; /* Hace que el cursor parpadee */
  }
  50% {
    border-color: black;
  }
}
.obra-popup-tooltip.show {
    opacity: 1;
    visibility: visible;
    animation: typewriterMatrix-tooltip 1.2s steps(18, end) 0.1s 1 normal both;
}

.obra-popup-tooltip.finished {
    opacity: 1;
    visibility: visible;
    animation: none;
}

/* Ajuste para que el contenedor de la imagen en el popup sea relativo */
.obra-popup-img-wrap {
    position: relative;
}

/* Tooltip para imagen en popup de obra */
/* Tooltip para imagen en popup de obra usando el contenedor */
.obra-popup-img-wrap {
    position: relative;
    display: inline-block;
}

/* Tooltip Matrix animado abajo y centrado */
.obra-popup-img-wrap[data-tooltip]:hover::after,
.obra-popup-img-wrap[data-tooltip]:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 120%) scale(1);
    min-width: 140px;
    padding: 7px 22px;
    background: rgba(0, 0, 0, 0.92);
    color: #39ff14;
    border: 2px solid #00ff99;
    border-radius: 8px;
    font-size: 0.98em;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    box-shadow: 0 0 18px #00ff99, 0 0 8px #39ff14;
    text-shadow: 0 0 8px #00ff99, 0 0 2px #000;
    opacity: 1;
    pointer-events: none;
    z-index: 99999;
    white-space: nowrap;
    text-align: center;
    animation: typewriterMatrix-tooltip 1.2s steps(18, end) 0.1s 1 normal both;
}

@keyframes typewriterMatrix-tooltip {
    from {
        width: 0;
        opacity: 0.2;
    }

    10% {
        opacity: 0.7;
    }

    to {
        width: 100%;
        opacity: 1;
    }
}

/* Para posicionar correctamente el tooltip, el contenedor debe ser relativo */
.obra-popup-preview {
    position: relative;
}

/* Botones de navegación en el popup de obra */
.popup-nav-botones {
    display: flex;
    align-items: center;
    margin-top: 18px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.btn-popup-prev {
    margin-right: auto;
}

.close-btn {
    margin: 0 28px;
}

.btn-popup-next {
    margin-left: auto;
}

/* === ANIMACIÓN MATRIX PARA CUADRO Y BOTÓN === */
.obra-detalle-matrix-fadein{


}
.matrix-fadein-inner {
    animation: submenu-escalera-fadein 0.7s cubic-bezier(.4, 2, .6, 1) both;
    will-change: opacity, transform, filter;
    opacity: 1 !important;
}

/* === ANIMACIÓN MATRIX PARA CUALQUIER CONTENEDOR === */
.matrix-fadein {
    animation: submenu-escalera-fadein 0.7s cubic-bezier(.4, 2, .6, 1) both;
    will-change: opacity, transform, filter;
    opacity: 1 !important;
}

/* === EFECTO TYPEWRITER MATRIX === */


/* Efecto typewriter por defecto (solo para menú principal y otros, NO submenú) */
.typewriterMatrix {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    --typewriter-duration: 2.2s;
    animation: typewriterMatrix var(--typewriter-duration, 2.2s) steps(var(--typewriter-steps, 28), end) 0.3s 1 normal both;
    animation-fill-mode: forwards;
    width: fit-content;
    min-width: 0;
    width: 100%;
    min-width: 0;
    text-align: center;
}

/* Submenú: base, texto invisible y sin animación */
.main-menu .submenu .typewriterMatrix {
    width: 0;
    min-width: 2.5ch;
    box-sizing: content-box;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    position: relative;
    animation: none;
    text-align: center;
    padding: 5 !important;
    width: fit-content;
    min-width: 0;
    /* El ancho solo se controla por la animación o por la clase .finished */
}


/* Submenú: solo animar cuando el submenú está visible */
.main-menu li.submenu-galeria:hover .submenu .typewriterMatrix,
.main-menu li.submenu-galeria:focus-within .submenu .typewriterMatrix {
    animation: typewriterMatrix var(--typewriter-duration, 2.2s) steps(var(--typewriter-steps, 28), end) 0.3s 1 normal forwards;
    text-align: center;
}

/* Cuando termina la animación, el contenedor se queda ancho y el texto completo */
.main-menu .submenu .typewriterMatrix.finished {
    width: fit-content !important;
    animation: none !important;
    overflow: visible;
}
/* Cursor typewriter más visible */
/* Cursor typewriter más visible y alineado */
/* Cursor typewriter general (submenús) */
.typewriterMatrix::after {
    content: '';
    display: var(--caret-display, block);
    position: absolute;
    top: 14px; /* Submenús: alineación más baja */
    right: 0;
    width: 1ch;
    height: 0.85em;
    background: #39ff14;
    animation: var(--caret-anim, CursorParpadeante 0.8s step-end infinite);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.2s, display 0.2s;
    mix-blend-mode: screen;
    min-width: 1ch;
    animation: CursorParpadeante 0.8s step-end infinite, hide-caret-matrix 1s linear forwards;
    animation-delay: 0s, calc(var(--typewriter-duration, 2.2s) + 2s);
}

/* Cursor typewriter para menú principal (más arriba y visible en hover) */
.main-menu > ul > li > a .typewriterMatrix::after,
.main-menu > ul > li > .typewriterMatrix::after {
    top: 19px !important;
}


/* Cursor más alto solo para títulos de obras en galería */
.obra-info h2.typewriterMatrix::after {
    height: 1.18em;
    top: 0.18em;
}


@keyframes hide-caret-matrix {
    to {
        opacity: 0;
        translate: 3333px;
    }
}
@keyframes typewriterMatrix {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}


@keyframes CursorParpadeante {

    from,
    to {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}


.main-menu .typewriterMatrix.finished {
    animation: none !important;
    overflow: visible;
}

/* === BOTONES CIRCULARES DE NAVEGACIÓN EN OBRA === */

.obra-nav-botones {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 18px;
    margin-top: -58px;
    z-index: 12;
    gap: 38px;
}
#booob {
    margin-top: 38px;
}
.btn-circular-nav {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #000000e6;
    border: 3px solid #00ff99;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px #39ff14, 0 0 6px #00ff99;
    color: #00ff99;
    font-size: 2.1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 100;
    text-decoration: none;
    outline: none;
}


.btn-circular-nav:hover,
.btn-circular-nav:focus {
    background: #00ff99;
    color: #101010;
    border-color: #fff;
    box-shadow: 0 0 32px #00ff99, 0 0 12px #fff;
}

/* Ajuste: centrado vertical más preciso para los símbolos < > */
/* Ajuste: solo el símbolo se mueve, no el círculo */
.flecha-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 0 0 8px #39ff14, 0 0 3px #00ff99, 0 0 1px #fff;
    filter: brightness(1.7) drop-shadow(0 0 6px #00ff99) drop-shadow(0 0 3px #39ff14);
    transition: text-shadow 0.2s, filter 0.2s, color 0.2s;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    aspect-ratio: 1/1;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1.5px solid #00ff99;
    box-shadow: 0 0 10px #39ff14, 0 0 3px #00ff99, 0 0 1px #fff;
    margin: 0 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 1px;
    line-height: 1;
    position: relative;
}

/* Solo el símbolo < o > se mueve hacia arriba */
.flecha-nav .flecha-simbolo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    font-size: 1em;
    transform: translateY(-6%);
}

.flecha-nav:hover, .flecha-nav:focus {
    color: #fff;
    background: #00ff99;
    border-color: #fff;
    text-shadow: 0 0 16px #00ff99, 0 0 6px #fff, 0 0 4px #39ff14;
    filter: brightness(2.2) drop-shadow(0 0 8px #00ff99) drop-shadow(0 0 5px #39ff14);
    box-shadow: 0 0 24px #00ff99, 0 0 8px #39ff14, 0 0 4px #fff;
}

/* === POPUP POEMA === */
.btn-poema-popup {
    background: #101010;
    color: #00ff99;
    border: 2px solid #00ff99;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1em;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: bold;
    box-shadow: 0 2px 12px #00ff9940;
    cursor: pointer;
    margin: 18px 0 0 0;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.btn-poema-popup:hover {
    background: #00ff99;
    color: #101010;
    border-color: #fff;
}

.poema-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: fadein-popup 0.25s;
    padding-top: 100px;
    /* deja espacio para el menú y el botón */
    box-sizing: border-box;
}

.poema-popup-content {
    background: #000000e6;
    border: 3px solid #00ff99;
    border-radius: 16px;
    box-shadow: 0 0 32px #39ff14, 0 0 12px #00ff99;
    padding: 48px 32px 24px 32px;
    /* más espacio arriba y costados */
    max-width: 600px;
    width: 96vw;
    position: relative;
    color: #00ff99;
    font-size: 1.13em;
    font-family: 'Georgia', 'Times New Roman', serif;
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.btn-cerrar-poema {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(235px);
    /* 600px/2 - 18px + 20px (más a la izquierda) */
    background: #000000e6;
    color: #00ff99;
    border: none;
    font-size: 2em;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    z-index: 21000;
    border-radius: 50%;
    padding: 2px 8px 2px 8px;
    box-shadow: 0 0 8px #00ff99;
}

.btn-cerrar-poema:hover {
    color: #fff;
    background: #00ff99;
    color: #101010;
}

@keyframes fadein-popup {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ====== ELEMENTOS INTERNOS DETALLE DE OBRA ====== */
.obra-detalle-matrix {
    min-width: 75%;
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    justify-content: center;
    align-items: flex-start;
}

.obra-detalle-img-wrap {
    flex: 1 1 320px;
    max-width: 380px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 32px 0 24px 0;
    background: rgba(10, 10, 10, 0.97);
    border-radius: 14px;
    box-shadow: 0 4px 32px #00ff9940, 0 0 18px #39ff14;
    border: 3px solid #00ff99;
    padding: 18px 12px 18px 12px;
}

.obra-detalle-img {
    width: 100%;
    max-width: 340px;
    border-radius: 12px;
    box-shadow: 0 2px 18px #00ff9940, 0 0 8px #39ff14;
    border: 2px solid #39ff14;
    background: #000;
    display: block;
}

.obra-detalle-info {
    flex: 2 1 400px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 32px 0 24px 0;
    color: #fff;
    font-size: 1.1em;
    padding: 0 10px;
}

.obra-detalle-info h1 {
    color: #00ff99;
    font-size: 2.1em;
    margin: 0 0 18px 0;
    text-shadow: 0 0 16px #39ff14, 0 0 2px #000;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: left;
}

.obra-tecnica {
    color: #39ff14;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 1px;
}

.obra-descripcion {
    color: #fff;
    font-size: 1.08em;
    margin-bottom: 18px;
    line-height: 1.5;
    text-align: left;
}

.obra-poema {
    background: rgba(0, 255, 153, 0.08);
    border-left: 4px solid #00ff99;
    border-radius: 8px;
    color: #00ff99;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.13em;
    margin: 18px 0 18px 0;
    padding: 16px 18px 16px 18px;
    box-shadow: 0 0 12px #00ff9940;
    text-shadow: 0 0 8px #00ff99, 0 0 2px #000;
    white-space: pre-line;
}

.obra-youtube {
    margin: 18px 0 0 0;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 18px #00ff9940, 0 0 8px #39ff14;
    border: 2px solid #00ff99;
    background: #000;
}

.obra-youtube iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background: #000;
    display: block;
}


/* ====== DETALLE DE OBRA ====== */
.obra-detalle-matrix {
    width: 100vw;
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;
    border: 4px solid #39ff14;
    box-shadow: 0 0 32px #39ff14, 0 0 12px #00ff99, 0 0 16px #fff;
    border-radius: 18px;
    top: 35px;
    background: #000000d9;
    /* 85% de opacidad */

}

/* ====== SUBMENÚ GALERÍA MATRIX ====== */
.main-menu li.submenu-galeria {
    position: relative;
}

/* SUBMENÚ GALERÍA MATRIX ESCALERA */
.main-menu .submenu {
    display: none;
    position: absolute;
    /* Más a la izquierda */
    top: 60%;
    margin-top: 0;
    /* Menos padding a la izquierda */
    background: transparent;
    z-index: 200;
    opacity: 0;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 2, .6, 1);
    min-width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #39ff14;
    padding-right: 160px;
    padding-bottom: 250px;
}
.main-menu li.submenu-galeria:hover .submenu,
.main-menu li.submenu-galeria:focus-within .submenu {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.main-menu .submenu li {
    position: absolute;
    left: 0;
    opacity: 0;
    min-width: 180px;
    min-height: 48px;
    border: none;
    animation: submenu-escalera-fadein 0.5s cubic-bezier(.4, 2, .6, 1) both;
}

.main-menu .submenu li:nth-child(1) {
    top: 0;
    left: 0;
    animation-delay: 0.05s;
}

.main-menu .submenu li:nth-child(2) {
    top: 64px;
    left: 16px;
    /* Más a la izquierda */
    animation-delay: 0.18s;
}

.main-menu .submenu li:nth-child(3) {
    top: 128px;
    left: 32px;
    /* Más a la izquierda */
    animation-delay: 0.32s;
}

.main-menu .submenu li.todas-obras {
    position: absolute;
    top: 192px;
    left: 50px;
    /* Menos a la derecha, más alineada con la escalera */
    min-width: 180px;
    min-height: 48px;
    opacity: 0;
    animation: submenu-escalera-fadein 0.5s cubic-bezier(.4, 2, .6, 1) both;
    animation-delay: 0.45s;
}

.main-menu li.submenu-galeria:hover .submenu li.todas-obras,
.main-menu li.submenu-galeria:focus-within .submenu li.todas-obras {
    opacity: 1;
}

.main-menu li.submenu-galeria:hover .submenu li,
.main-menu li.submenu-galeria:focus-within .submenu li {
    opacity: 1;
}

/* Homologación de submenú con menú principal */
.main-menu .submenu a {
    display: block;
    padding: 10px 24px;
    color: #39ff14;
    background: rgba(24, 24, 24, 0.98);
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    text-shadow: 0 0 12px #39ff14, 0 0 2px #000 !important;
    border: 2px solid transparent;
    border-radius: 10px;
    margin-bottom: 14px;
    margin-left: 6px;
    margin-right: 6px;
    min-width: 150px;
    max-width: 220px;
    width: auto;
    text-align: center;
    font-size: 1.1em;
    letter-spacing: 1px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    text-shadow: 0 0 12px #39ff14, 0 0 2px #000;
    transition: color 0.2s, border-bottom 0.2s, text-shadow 0.2s, background 0.2s, box-shadow 0.2s;
    position: relative;
    box-shadow: 0 0 16px #00ff99, 0 0 4px #00ff99;
    white-space: nowrap;
}

.main-menu .submenu a:hover,
.main-menu .submenu a:focus {
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    color: #fff;
    border-bottom: 2px solid #39ff14;
    background: rgba(24, 24, 24, 0.7);
    text-shadow: 0 0 16px #fff, 0 0 8px #39ff14;
    box-shadow: 0 0 32px #00ff99, 0 0 8px #fff;
    animation: CursorParpadeante 0.8s step-end infinite, hide-caret-matrix 1s linear forwards;
    animation-delay: 0s, calc(var(--typewriter-duration, 2.2s) + 2s);
}

@keyframes submenu-escalera-fadein {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.1) translateX(-20px);
        filter: blur(66px) brightness(30);
    }

    50% {
        opacity: 1;
        transform: translateY(0) scale(0.15) translateX(0);
        filter: blur(0px) brightness(7.2);
    }

    70% {
        opacity: 1;
        transform: translateY(0) scale(0.15) translateX(0);
        filter: blur(0px) brightness(5.5);
    }

    80% {
        opacity: 1;
        transform: translateY(0) scale(0.15) translateX(0);
        filter: blur(0px) brightness(9.5);
    }

    90% {
        opacity: 1;
        transform: translateY(0) scale(1) translateX(0);
        filter: blur(0px) brightness(1.0);
    }

    95% {
        opacity: 1;
        transform: translateY(0) scale(1.1) translateX(0);
        filter: blur(0px) brightness(3.1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) translateX(0);
        filter: blur(0px) brightness(1);
    }
}

/* ====== GALERÍA MATRIX MODERNA ====== */
.galeria-filtros {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.filtro-btn {
    background: #101010;
    color: #00ff99;
    border: 2px solid #00ff99;
    border-radius: 6px;
    padding: 10px 28px;
    background: rgba(0, 0, 0, 0.82);
    /* Fondo negro con alfa más notorio */
    font-weight: bold;
    box-shadow: 0 2px 12px #00ff9940, 0 0 6px #39ff14;
    /* Menos brillo */
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 2px 8px #00ff9940;
}

.filtro-btn.active,
.filtro-btn:hover {
    background: #00ff99;
    color: #101010;
    border-color: #fff;
}

.galeria-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    justify-content: center;
    align-items: flex-start;
}

.obra-card {
    background: rgba(10, 10, 10, 0.97);
    border: 2px solid #00ff99;
    border-radius: 14px;
    box-shadow:
        0 0 18px 2px #39ff14,
        0 0 8px 1px #00ff99,
        0 0 4px #fff,
        0 2px 8px #00ff9940;
    width: 260px;
    min-height: 330px;
    max-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 18px 12px 18px 12px;
    margin-bottom: 20px;
    z-index: 2;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
    overflow: hidden;
    opacity: 0.35;
}
.obra-card:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 32px #00ff99;
    border-color: #fff;
}

.obra-img-wrap {
    width: 100%;
    max-width: 210px;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow:
        0 0 12px 3px #39ff14,
        0 0 6px 2px #00ff99,
        0 0 3px #fff,
        0 1px 4px #00ff9940;
}

.obra-img-wrap img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* === PREVISUALIZACIÓN POPUP DE CUADRO === */
.obra-popup-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(10, 10, 10, 0.98);
    border: 4px solid #00ff99;
    box-shadow: 0 0 48px #39ff14, 0 0 24px #00ff99, 0 0 32px #fff;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

#obraPopupTitulo {
    color: #39ff14;
    font-size: 1.5em;
    margin: 18px 0 0 0;
    text-align: center;
    font-family: 'Consolas', 'Courier New', monospace;
    text-shadow: 0 0 12px #39ff14, 0 0 2px #000;
    letter-spacing: 1.5px;
    font-weight: 700;
}

#obraPopupTitulo.typewriterMatrix::after {
    height: 1.18em;
    top: 0.18em;
}

/* Overlay para popup de obra, igual que poema */
.obra-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadein-popup 0.25s;
}

.obra-popup-overlay.active {
    display: flex;
}

.obra-popup-preview.active {
    opacity: 1;
    pointer-events: auto;
}

.obra-popup-preview img {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 2px 18px #00ff9940, 0 0 8px #39ff14;
    border: 2px solid #39ff14;
    background: #000;
    display: block;
}


.obra-info h2 {
    color: #00ff99;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    text-align: center;
}

.obra-info {
    color: #fff;
    font-size: 1em;
    margin-bottom: 10px;
    text-align: center;
    flex-grow: 1;
}


.main-menu {
    width: 80vw;
    margin-left: 10vw;
    margin-right: 10vw;
    margin-top: 2vh;
    background: rgba(10, 10, 10, 0.82);
    border: 4px solid #39ff14;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 0 15px #39ff14, 0 0 8px #00ff99, 0 0 10px #fff;
    border-radius: 18px;
    backdrop-filter: blur(6px);
    transition: background 0.3s, box-shadow 0.3s;
    margin-bottom: 0;
    filter: brightness(1.12) drop-shadow(0 0 8px #39ff14) drop-shadow(0 0 4px #00ff99);
    border-top: none !important;
    animation: menu-chispa-fadein 0.7s cubic-bezier(.4, 2, .6, 1) 0.1s both;
    /* Eliminar cualquier línea superior accidental */
}


@keyframes menu-chispa-fadein {
    0% {
        opacity: .5;
        transform: scale(0.3) translateY(-40px);
        filter: blur(8px) brightness(5);
    }

    60% {
        opacity: 3;
        transform: scale(0.5) translateY(0);
        filter: blur(0px) brightness(4.2);
    }

    80% {
        opacity: 1;
        transform: scale(1.15) translateY(0);
        filter: blur(0px) brightness(5);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px) brightness(1);
    }
}

/* .menu-matrix-bar eliminado para quitar la línea verde de index2 */
@keyframes matrix-bar-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.main-menu li {
    margin: 0 30px;
}

/* Menu Matrix verde brillante, blanco en hover, activo en verde sólido */
.main-menu a {
    display: block;
    padding: 18px 0;
    color: #39ff14;
    text-decoration: none;
    font-size: 1.2em;
    letter-spacing: 1px;
    transition: color 0.2s, border-bottom 0.2s, text-shadow 0.2s;
    border-bottom: 2px solid transparent;
    text-shadow: 0 0 12px #39ff14, 0 0 2px #000;
    position: relative;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-weight: 700 !important;
    text-shadow: 0 0 12px #39ff14, 0 0 2px #000 !important;
}

.main-menu a:hover,
.main-menu a:focus {
    color: #fff;
    border-bottom: 2px solid #39ff14;
    background: rgba(24, 24, 24, 0.7);
    text-shadow: 0 0 16px #fff, 0 0 8px #39ff14;
}

/* Clase para la página activa en el menú y submenú */
.main-menu a.active,
.main-menu .active>a,
.main-menu .submenu a.active,
.main-menu .submenu .active>a {
    color: #00ff99;
    text-shadow: none;
    border-bottom: 2px solid #00ff99;
    background: rgba(24, 24, 24, 0.7);
}


.titulo-seccion {
    color: #fff;
    text-align: center;
    margin: 40px 0 20px 0;
    font-size: 2.2em;
    letter-spacing: 2px;
    text-shadow: 0 0 12px #00ff99, 0 0 2px #000;
}

.temas-galeria {
    width: 100vw;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;
}

.temas-contenedor {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.tema-bloque {
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #00ff99;
    border-radius: 12px;
    box-shadow: 0 4px 24px #00ff9940;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 18px 18px 18px;
    margin-bottom: 20px;
    z-index: 2;
}

.tema-img {
    width: 100%;
    max-width: 220px;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px #00ff9940;
}

.tema-info h2 {
    color: #00ff99;
    margin: 0 0 10px 0;
    font-size: 1.3em;
    text-align: center;
}

.tema-info p {
    color: #fff;
    font-size: 1em;
    margin-bottom: 14px;
    text-align: center;
}

.btn-galeria {
    display: inline-block;
    background: #00FF34;
    color: #101010;
    padding: 10px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: background 0.9s, color 0.2s;
    box-shadow: 0 2px 8px #00ff9940;
}

.btn-galeria:hover {
    background: #000;
    border-radius: 25px;
    box-shadow: 0 2px 18px #00FF34;

    color: #00ff99;
}

.obra-detalle-matrix .btn-galeria {
    margin-top: 32px;
    align-self: flex-start;
    font-size: 1.1em;
    padding: 12px 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px #00ff9940;
}
.museo-virtual {
      display: flex;
  justify-content: center;
  align-items: center; /* si quieres centrar también verticalmente */
  flex-direction: column; 
      perspective: 1100px;
    width: 100vw;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;    
}

.museo-iframe-contenedor {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  height: 420px; /* importante para que el contenedor tenga altura */
}

.museo-link {
  display: block;
  position: relative;
  z-index: 10;
}

.museo-preview-img {
  width: 1000px;
  max-width: 100vw;
  height: 420px;
  border-radius: 18px;
  border: 4px solid #39ff14;
  box-shadow: 0 0 24px #39ff14, 0 0 8px #00ff99;
  cursor: pointer;
}
.slider-pinturas {
    position: relative;
    width: 100vw;
    max-width: 1200px;
    text-align: center;

    z-index: 2;
}


.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.95);
    border-radius: 12px;
    border: 2px solid #00ff99;
    box-shadow: 0 4px 24px #00ff9940;
    padding: 30px 0 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-list {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 90vw;
    max-width: 1100px;
}

.slider-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    max-width: 200px;
    background: #181818;
    border-radius: 8px;
    box-shadow: 0 2px 12px #00ff9940;
    padding: 10px 10px 18px 10px;
    border: 1.5px solid #00ff99;
}

.slider-list img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}

.slider-list span {
    color: #00ff99;
    font-size: 1em;
    text-align: center;
    margin-top: 4px;
}

.slider-arrows {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
}

.slider-arrows button {
    background: #00ff99;
    color: #101010;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 8px #00ff9940;
    transition: background 0.2s, color 0.2s;
}

.slider-arrows button:hover {
    background: #fff;
    color: #00ff99;
}

.videos-destacados {
    width: 100vw;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;
    text-align: center;
}

.videos-carousel {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

.video-thumb {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #00ff99;
    box-shadow: 0 2px 12px #00ff9940;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-thumb:hover {
    transform: scale(1.07);
    box-shadow: 0 4px 24px #00ff99;
    border-color: #fff;
}

.video-thumb img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    display: block;
}

.main-footer {
    width: 100vw;
    background: #0a0a0a;
    border-top: 3px solid #00ff99;
    color: #fff;
    text-align: center;
    padding: 24px 0 18px 0;
    font-size: 1em;
    margin-top: 40px;
    z-index: 2;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.footer-content span {
    color: #00ff99;
    font-size: 1em;
    letter-spacing: 1px;
}

.whatsapp-float {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #101010;
    border-radius: 50%;
    box-shadow: 0 0 24px #00ff99, 0 0 8px #00ff99;
    border: 2.5px solid #00ff99;
    animation: matrix-glow-wsp 1.5s infinite alternate;
    transition: box-shadow 0.2s, border 0.2s;
}

.whatsapp-float:hover {
    box-shadow: 0 0 48px #00ff99, 0 0 16px #00ff99;
    border-color: #fff;
    background: #00ff99;
}

.whatsapp-float img {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 6px #00ff99);
}

.wsp-msg {
    position: absolute;
    right: 70px;
    bottom: 0;
    width: 220px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 2px solid #00ff99;
    background: #181818;
    color: #00ff99;
    font-size: 1em;
    outline: none;
    box-shadow: 0 0 16px #00ff99, 0 0 2px #000;
    z-index: 100;
    transition: box-shadow 0.2s, border 0.2s;
    opacity: 0.97;
}

.wsp-msg:focus {
    border-color: #fff;
    box-shadow: 0 0 32px #00ff99, 0 0 8px #00ff99;
}

@keyframes matrix-glow-wsp {
    from {
        box-shadow: 0 0 12px #00ff99, 0 0 4px #00ff99;
    }

    to {
        box-shadow: 0 0 48px #00ff99, 0 0 16px #00ff99;
    }
}

/* --- Sobrescribe y centra el contenedor de la galería y el título de sección --- */
.galeria-matrix-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75vw;
    max-width: 1200px;
    margin: 32px auto 40px auto;
    padding: 0 20px;
    z-index: 2;
    position: relative;
    border: 4px solid #39ff14;
    box-shadow: 0 0 24px #39ff14, 0 0 8px #00ff99;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.55);
}

.titulo-seccion {
    color: #fff;
    text-align: center;
    margin: 40px 0 20px 0;
    font-size: 2.2em;
    letter-spacing: 2px;
    text-shadow: 0 0 12px #00ff99, 0 0 2px #000;
    width: 100%;
    align-self: center;
    display: flex;
    justify-content: center;
}
/* Estilo para la sección de contacto */
/* Reemplaza o modifica estas reglas en tu archivo estilo.css */
/* Reemplaza o modifica estas reglas en tu archivo estilo.css */

/*
 * ESTILO COMPLETO PARA EL FORMULARIO DE CONTACTO (ESTILO MONITOR ANTIGUO)
 * REEMPLAZA TODAS LAS REGLAS ANTERIORES CON ESTE BLOQUE
 */
 /*
 * ESTILO FINAL PARA EL FORMULARIO DE CONTACTO
 * REEMPLAZA TODO EL CÓDIGO ANTERIOR EN TU ESTILO.CSS
 
 /* 1. Contenedor principal que simula el marco del monitor */

.contacto-seccionCont {
    color: #00ff99;
    font-family: 'Courier New', Courier, monospace;
    z-index: 3;
    position: relative;

    transition: all 5.2s ease;
}
.contacto-seccionCont:hover {
        transform: scale(1.2) translateY(80px);
}

.monitor-border {
    position: relative;
    width: 1000px;
    max-width: 98%;
    margin: 50px auto;
    padding: 90px;
    background-color: #101010;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 255, 153, 0.4);
    z-index: 10;
    /* PROPIEDADES PARA LA ANIMACIÓN DE CARGA */
    transform: scale(0.1);
    opacity: 7;
    animation: grow-monitor 3.5s forwards ease-out;
    transition: transform 15.9s ease-in-out, box-shadow 15.3s ease-in-out;
}

/* Animación de carga */
@keyframes grow-monitor {
    from {
        filter: brightness(4.7) drop-shadow(0 0 6px #00ff99) drop-shadow(0 0 3px #39ff14);
        translate: 0% -35%;
        transform: scale(0.2);
        opacity: 5;
    }
    to {
        translate: 0% 0%;
        transform: scale(0.7);
        translate: 0% -18%;
        opacity: 1;
    }
}

/* Efecto al pasar el cursor (hover) */
/* 2. Contenedor de la "pantalla" del monitor con tu estilo y scroll */
.monitor-pantalla {
    position: relative;
    width: 100%;
    max-height: 700px;
    background-color: #0333033b;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 3;
    border: #000;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(5, 165, 61, 0.757);
}

/* 3. Estilo de la barra de scroll para el efecto retro */
.monitor-pantalla::-webkit-scrollbar {
    width: 10px;
}
.monitor-pantalla::-webkit-scrollbar-track {
    background: #101010;
}
.monitor-pantalla::-webkit-scrollbar-thumb {
    background-color: #00ff99;
    border-radius: 20px;
    border: 3px solid #101010;
}

/* 4. Efecto de escaneo (línea que sube) */
.monitor-pantalla::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 255, 153, 0.069) 1px, transparent 1px);
    background-size: 100% 2px;
    animation: scanline 5s infinite linear;
    z-index: 2;
}

@keyframes scanline {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(100%);
    }
}

/* 5. Estilo general de la sección y el formulario */
.contacto-seccion {
    color: #00ff99;
    font-family: 'Courier New', Courier, monospace;
    z-index: 3;
    position: relative;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 4;
}

/* 6. Estilo de cada fila (pregunta y campo de texto) */
.form-row {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    position: relative;
}

/* 7. Estilo de las preguntas y el cursor palpitante */
.contacto-form label {
    flex-shrink: 0;
    text-transform: uppercase;
    font-size: 1.2rem;
    line-height: 1.5rem;
    color: #00ff99;
    z-index: 5;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    visibility: hidden;
}

/* El cursor palpitante se pega a la derecha de la pregunta */
.contacto-form label::after {
    content: '█';
    display: inline-block;
    color: #00ff99;
    animation: blink-cursor 1s infinite;
    position: relative;
    margin-left: 5px;
    z-index: 6;
}


@keyframes blink-cursor {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* 8. Estilo de los campos de texto y textarea (efecto de máquina de escribir) */
.contacto-form input[type="text"],
.contacto-form input[type="email"],
.contacto-form textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent; /* El borde inicial es invisible */
    color: #00ff99;
    font-size: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    outline: none;
    padding: 5px 0;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    width: auto;
    position: relative;
    z-index: 5;
    resize: none;
    overflow-y: hidden;
    line-height: 1.0;
    height: calc(1.5rem + 8px);
    transition: border-bottom-color 0.5s ease-out; /* Animación de color */
}

.contacto-form textarea {
    line-height: 0.5;
    height: calc(1rem + 5px);
}

/* NUEVO: Oculta el cursor cuando se añade la clase */
.contacto-form label.cursor-off::after {
    opacity: 0;
    translate: 2000px 0;
    animation: none;
}
/* NUEVO: La clase que mostrará la línea animada debajo del campo de texto */
.line-active {
    border-bottom-color: #00ff99 !important;
}

/* 9. Estilo del botón de enviar */
.btn-contacto {
    background: #00ff99;
    color: #000;
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    box-shadow: 0 0 5px #00ff99;
    align-self: center;
    margin-top: 15px;
    z-index: 5;
    position: relative;
}

.btn-contacto:hover {
    background-color: #fff;
    box-shadow: 0 0 15px #fff;
    color: #000;
}
/* 1. Definición de la animación de parpadeo para todos los cursores */

.typewriterMatrix::hover {
    animation: CursorParpadeante 0.8s step-end infinite, hide-caret-matrix 1s linear forwards !important; 
    animation-delay: 0s, calc(var(--typewriter-duration, 2.2s) + 2s);
}

/*
 * Seccion de Estilos para el Video de Intro
 *
 * Este bloque de codigo se encarga de centrar el video
 * y sus controles, y de mostrar el efecto de pausa.
 */

.intro-video-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 100vw;
    max-width: 862px;
    height: 72vh;
    min-height: 420px;
    justify-content: center;
    z-index: 3;
    overflow: visible;
    top: 31px;
    padding: 0 0px;
    text-align: center;
}
.intro-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-content {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

#sinfoIntroVideo, #logoFinal {
    width: 100%;
    height: auto;
    display: block;
}

#sinfoIntroVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
    border: 4px solid #39ff14;
    box-shadow: 0 0 24px #39ff14, 0 0 8px #00ff99;
    border-radius: 18px;
    background: #000;
}
#logoFinal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}
.play-pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centra el botón */
  
  width: 180px; /* Tamaño del círculo */
  height: 180px;
  background-color: rgba(0, 0, 0, 0.4); /* Opacidad de 0.4 (40%) */
  border-radius: 50%; /* Esto crea la forma circular */
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 10;
  
  color: rgba(255, 255, 255, 0.8);
  font-size: 4em;
  pointer-events: none;
}
.video-content:hover .play-pause-overlay,
.play-pause-overlay.show {
    opacity: 1;
}

.play-pause-overlay.hidden-overlay {
  opacity: 0;
  pointer-events: none;
}
.play-pause-overlay i {
    color: #00ff99;
    font-size: 4rem;
    pointer-events: none;
}

.intro-video-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 100;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 5px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.intro-video-controls button,
.intro-video-controls input[type="range"] {
    background: rgba(0, 255, 153, 0.7);
    border: 2px solid #00ff99;
    color: #000;
    padding: 10px 15px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 0 10px #00ff99;
    transition: all 0.2s ease;
}

.intro-video-controls button:hover {
    background: #00ff99;
    box-shadow: 0 0 15px #00ff99;
}

.intro-control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease-in-out;
}

.intro-control-btn:hover {
    color: white;
}

#introVolumeSlider {
    width: 80px;
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    height: 6px;
    border-radius: 3px;
}

#introVolumeSlider:hover {
    opacity: 1;
}
/* Nuevo botón de mute en la esquina superior derecha */
.intro-mute-overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
}

/* Estilo del ícono cuando está silenciado */
.intro-mute-overlay-btn.muted i,
#introMuteBtn.muted i {
    color: #ff0000; /* Color rojo para indicar que está silenciado */
}
#introVolumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff99;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#introVolumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff99;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#unmuteButton {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    z-index: 4;
    transition: background 0.2s;
}

#unmuteButton:hover {
    background: #00ff99;
    color: #101010;
}

.hidden {
    display: none !important;
}

.play-pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centra el botón */
  
  width: 180px; /* Tamaño del círculo */
  height: 180px;
  background-color: rgba(0, 0, 0, 0.4); /* Opacidad de 0.4 (40%) */
  border-radius: 50%; /* Esto crea la forma circular */
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 10;
  
  color: rgba(255, 255, 255, 0.8);
  font-size: 4em;
  pointer-events: none;
}
/* Oculta el overlay cuando el video está en reproducción */
.play-pause-overlay.hidden-overlay {
    opacity: 0;
    pointer-events: none; /* Deshabilita los clics en el overlay */
}

/*
 * Seccion de Estilos para Video de Fondo (diferente a la intro)
 *
 * Estas reglas son para el video que no es la introduccion.
 */

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    opacity: 0.75;
}

.video-container video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: opacity(55%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#mivideo {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    z-index: -100;
    background-size: cover;
}
/* ---- Estilos para la sección de la Librería ---- */
.libreria-seccion {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 80vh;
}

/* ---- Estilos del Locómetro en el menú ---- */
.locometro-item {
    margin-top: 20px;
    position: relative;
}

.locometro-link {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    padding: 0 10px;
}

.locometro-progress-circle {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    border: 2px solid #00ff99;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 30px;
    top: 10px;
    transition: all 0.3s ease-out;
    transition: --progress 0.5s ease-in-out;
}
.locometro-progress-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00ff99;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.locometro-progress-circle.unlocked::before {
    transform: translateY(0);
}

.locometro-percentage {
    position: absolute;
    color: #00ff99;
    font-size: 0.8em;
    z-index: 2;
}

.locometro-link.unlocked {
    text-shadow: 0 0 10px #00ffff;
    animation: pulse-glow 1s infinite alternate;
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 0 5px #00ff99;
    }
    to {
        box-shadow: 0 0 15px #00ffff;
    }
}


.locometro-link.unlocked .locometro-progress-circle {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.locometro-link:not(.unlocked):hover {
    cursor: not-allowed;
    text-decoration: none;
}
.locometro-link.unlocked:hover {
    cursor: pointer;
    text-decoration: underline;
}

/* ---- Estilos de la barra de progreso principal (menú) ---- */

#locometro-progress-bar-container {
    position: relative;
    width: 650px;
    height: 18px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff99;
    border-radius: 5px;
    margin-top: -11px;
    box-shadow: 0 0 10px #00ff99;
    display: block;
    top: -15px;
    right: -120px;
}

#locometro-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(0,255,153,0.5) 0%, rgba(0,255,153,1) 100%);
    transition: width 0.5s ease-out;
    border-radius: 5px;
}
#locometro-progress-bar-fill .locometro-bar-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #09ff1a;
    text-shadow: 0 0 12px #000000, 0 0 12px #000000;
    font-size: 0.8em;
    font-weight: bold;
}
/* ---- Estilos del Terminal y el Locómetro ---- */
/* Estilos para el enlace del Locómetro cuando está deshabilitado */
.locometro-link.link-disabled {
    cursor: not-allowed;
}

/* Opcional: para que se vea la diferencia */
.locometro-link:not(.link-disabled) {
    cursor: pointer;
}
.locometro-seccion {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 80vh;
}

.terminal-container {
    width: 90%;
    max-width: 800px;
    height: 450px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid #00ff99;
    box-shadow: 0 0 20px #00ff99, inset 0 0 10px rgba(0, 255, 153, 0.5);
    border-radius: 8px;
    padding: 25px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    color: #00ff99;
    overflow-y: hidden;
    position: relative;
    box-sizing: border-box;
    animation: glow-pulse 2s infinite alternate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Animación de brillo para el contenedor */
@keyframes glow-pulse {
    from { box-shadow: 0 0 15px #00ff99, inset 0 0 5px rgba(0, 255, 153, 0.5); }
    to { box-shadow: 0 0 25px #00ff99, inset 0 0 15px rgba(0, 255, 153, 0.7); }
}

.terminal-header {
    font-size: 1.4rem;
    color: #00ff99;
    animation: glow-text 2s infinite alternate;
    
    margin-bottom: 15px;
    position: relative; 
    display: inline-block;
}

/* Cursor parpadeante del terminal */
.terminal-header::after {
    content: '_';
    opacity: 1;
    animation: blink-cursor 1s infinite step-end;
    margin-left: 5px;
}

@keyframes blink-cursor {
    50% { opacity: 0; }
}

.terminal-body {
    white-space: pre-wrap;
    line-height: 1.5;
}

.terminal-body a {
    color: #00ff99;
    text-decoration: none;
    cursor: pointer;
    transition: text-shadow 0.3s ease-out, transform 0.2s ease-out;
    display: block;
    margin-bottom: 8px;
    position: relative;
    padding: 2px 0;
}

.terminal-body a:hover {
    text-shadow: 0 0 10px #00ffff;
    transform: translateX(5px);
}

.glow-text {
    text-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99, 0 0 15px #00ff99;
    color: #00ff99;
}

.opcion-locometro {
    text-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99;
    color: #00ff99;
    display: block;
    margin-top: 10px;
    text-decoration: none;
    font-size: 1.2rem;
}
/* El efecto de glitch ahora se aplicará de una forma diferente en JS */
.glitch-active {
    text-shadow: 2px 2px #ff00c1, -2px -2px #00ffff;
    opacity: 0.8;
}

#barras-container {
    margin-top: 20px;
}

.barra {
    margin-bottom: 15px;
}

.barra-nombre {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.barra-progreso {
    width: 100%;
    height: 15px;
    background: rgba(0, 255, 153, 0.1);
    border: 1px solid #00ff99;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.barra-progreso-llenado {
    height: 100%;
    background: #00ff99;
    width: 0;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px #00ff99;
}
/* Corrección para la página del Locómetro */
/* Mostramos el contenedor de la pregunta con una transición suave */
#pregunta-container.visible {
    opacity: 1;
}
/* Corrección específica para el Locómetro */
body#page-locometro {
    justify-content: flex-start;
    padding-top: 10vh; /* Ajusta este valor si quieres más o menos espacio arriba */
}

/* Asegura que el contenedor de la pregunta no esté escondido */
#pregunta-container {
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

/* Corrección específica para el Locómetro */
body#page-locometro {
    justify-content: flex-start;
    padding-top: 10vh; /* Ajusta este valor si quieres más o menos espacio arriba */
}

/* El contenedor de la pregunta estará visible por defecto */
#pregunta-container {
    opacity: 1;
}

/* El resto de sus estilos... */
.terminal-body {
    white-space: pre-wrap;
    line-height: 1.5;
}
.resultado-titulo {
    color: #00ff99; /* El color de la terminal para que sea visible */
    text-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99; /* Opcional: para darle un efecto de brillo */
}

.terminal-body a {
    color: #00ff99;
    text-decoration: none;
    cursor: pointer;
    transition: text-shadow 0.3s ease-out, transform 0.2s ease-out;
    display: block;
    margin-bottom: 8px;
    position: relative;
    padding: 2px 0;
}

.terminal-body a:hover {
    text-shadow: 0 0 10px #00ffff;
    transform: translateX(5px);
}

.glow-text {
    text-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99, 0 0 15px #00ff99;
    color: #00ff99;
}

.opcion-locometro {
    text-shadow: 0 0 5px #00ff99, 0 0 10px #00ff99;
    color: #00ff99;
    display: block;
    margin-top: 10px;
    text-decoration: none;
    font-size: 1.2rem;
}
/* El efecto de glitch ahora se aplicará de una forma diferente en JS */
.glitch-active {
    text-shadow: 2px 2px #ff00c1, -2px -2px #00ffff;
    opacity: 0.8;
}

#barras-container {
    margin-top: 20px;
}

.barra {
    margin-bottom: 15px;
}

.barra-nombre {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.barra-progreso {
    width: 100%;
    height: 15px;
    background: rgba(0, 255, 153, 0.1);
    border: 1px solid #00ff99;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.barra-progreso-llenado {
    height: 100%;
    background: #00ff99;
    width: 0;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px #00ff99;
}
@keyframes expandirTerminal {
    from {
        width: 300px; /* Tamaño inicial */
    }
    to {
        width: 800px; /* Tamaño final */
    }
}

.terminal-animada {
    animation: expandirTerminal 1s forwards; /* La animación solo se ejecuta una vez */
}

/*LIBRERIA*/
/* El contenedor de las burbujas */
.poema-item,
.menu-item-flotante {
    opacity: 0;
    transform: translateY(20px);
}

/* La animación que los hace flotar a su lugar */
@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* Estilos para los títulos y párrafos */
.poema-titulo {
    font-family: 'Montserrat', sans-serif; /* O una fuente similar */
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.poema-texto {
    font-family: 'Roboto Mono', monospace; /* O una fuente legible como Fira Code */
    font-size: 1.1rem;
    line-height: 1.8; /* Aumenta el espacio entre líneas */
    color: #00ff99;
}
/* LIBRERIA */
/* El contenedor de las burbujas */
.poema-item {
    opacity: 0;
    transform: translateY(20px);
}

.poema-glow {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5),
                 0 0 10px rgba(255, 255, 255, 0.5),
                 0 0 15px rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* La animación que los hace flotar a su lugar */
@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* Estilos para los títulos y párrafos */
.poema-titulo {
    font-family: 'Montserrat', sans-serif; /* O una fuente similar */
    font-size: 1.8rem;
    color: #fff;
}

.poema-texto {
    font-family: 'Roboto Mono', monospace; /* O una fuente legible como Fira Code */
    font-size: 1.1rem;
    line-height: 1.8; /* Aumenta el espacio entre líneas */
    color: #00ff99;
}
#obra-img {
    /* Otros estilos... */
    transition: src 10.3s ease-in-out;
}
.obra-card {
    cursor: pointer;
}
/* Estilos para el carrusel de burbujas */
.videos-burbujas-container {
    display: flex;
    flex-wrap: nowrap; /* Mantiene todas las burbujas en una sola fila */
    overflow-x: auto; /* Habilita el desplazamiento horizontal */
    -webkit-overflow-scrolling: touch; /* Suaviza el scroll en iOS */
    padding: 50px 0;
    position: relative;
    justify-content: flex-start; /* Alinea las burbujas al inicio del contenedor */
}

/* Ocultar la barra de desplazamiento para un efecto más limpio */
.videos-burbujas-container::-webkit-scrollbar {
    display: none;
}

.videos-burbujas-container {
    -ms-overflow-style: none; /* Para Internet Explorer y Edge */
    scrollbar-width: none; /* Para Firefox */
}

/* Estilos de las burbujas de video */
.burbuja-video {
    width: 250px;
    height: 250px;
    min-width: 250px;
    border-radius: 50%;
    position: relative;
    margin: 0 15px;
    cursor: pointer;
    box-shadow: 0 0 10px #00ff99, 0 0 2px #00ff99 inset;
    overflow: hidden;
    animation: burbuja-flotar 5s infinite ease-in-out;
    transition: transform 0.1s ease-in-out;
    z-index: 1;
}

.burbuja-video:hover {
    box-shadow: 0 0 60px #00ff99, 0 0 42px #00ff99 inset;
}

.burbuja-luz {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../Imagenes/burbuja-luz.png') center center no-repeat;
    background-size: cover;
    opacity: 1;
    z-index: 2; /* Ahora con un z-index más bajo para que el play-icon esté encima */
}

.video-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


.video-preview-jpg, .video-preview-png {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Estado por defecto (sin hover): PNG visible y JPG semi-transparente */
.video-preview-png {
    opacity: 0.6;
}

.video-preview-jpg {
    opacity: 0.5;
}

/* Al pasar el mouse, invierte la opacidad para mostrar el JPG y ocultar el PNG */
.burbuja-video:hover .video-preview-png {
    opacity: 0;
}

.burbuja-video:hover .video-preview-jpg {
    opacity: 0.9;
}

/* Icono de play */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 50px;
    opacity: 0.8;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.burbuja-video:hover .play-icon {
    opacity: 1;
}

/* Animación de flotar (ondear) */
@keyframes burbuja-flotar {
    0% { transform: scale(0.91); }
    50% { transform: scale(1); }
    100% { transform: scale(0.91); }
}

/* Contenedor del título Matrix */
.titulo-matrix-contenedor {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 80px;
    margin: 30px auto;
    width: 90%;
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ff99;
    border-radius: 12px;
    box-shadow: 0 0 20px 5px #00ff99;
    transition: box-shadow 0.3s ease-in-out;
}

/* Efecto de escritura Matrix */
.typewriter-matrix {
    color: #00ff99;
    font-size: 1.7em;
    font-family: monospace;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 2px solid #00ff99;
    animation: typewriter-matrix 2s steps(40) forwards,
               caret-matrix 1s infinite;
}

/* Animación de la escritura */
@keyframes typewriter-matrix {
    from { width: 0; }
    to { width: 100%; }
}

/* Animación del cursor */
@keyframes caret-matrix {
    50% { border-color: transparent; }
}

/* Para ocultar el cursor cuando termina la animación */
.typewriter-matrix.finished {
    border-right: 2px solid transparent;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: block;
    width: 90%;
    max-width: 1200px;
    height: 70%;
    max-height: 800px;
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.cerrar-modal:hover,
.cerrar-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
/* Estilos para el título del video en el centro */
.video-title {
    display: none; /* Oculto por defecto */
    position: absolute;
    bottom: 10px; /* Separación del borde inferior */
    width: 100%;
    text-align: center;
    color: #00ff99;
    font-family: monospace;
    font-size: 1.2em;
    padding: 0 5px;
    box-sizing: border-box;
    text-shadow: 0 0 5px #00ff99;
    z-index: 5; /* Por encima de las imágenes y la burbuja de luz */
}

/* Muestra el título solo en el video que está en el centro */
.burbuja-video.center-video .video-title {
    display: block;
}

/* Estilos de la Burbuja de Luz (para asegurar que esté por debajo del título) */
.burbuja-luz {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../Imagenes/burbuja-luz.png') center center no-repeat;
    background-size: cover;
    opacity: 0.5;
    z-index: 2; /* Por debajo del play-icon y el título */
}
/* Estado del video en el centro (sin hover) */
.burbuja-video.center-video-active .video-preview-png {
    opacity: 0;
}

.burbuja-video.center-video-active .video-preview-jpg {
    opacity: 0.9;
}

/* Al pasar el mouse, invierte la opacidad para mostrar el JPG y ocultar el PNG.
   Esta regla debe estar DESPUÉS de la de .center-video-active para tener prioridad.
*/
.burbuja-video:hover .video-preview-png {
    opacity: 0;
}

.burbuja-video:hover .video-preview-jpg {
    opacity: 0.9;
}
/* --- Título H1 como Botón --- */
#mejoresVideosTitulo {
    cursor: pointer;
    text-align: center;
    color: #00ff99;
    padding: 10px 20px;
    border: 2px solid #00ff99;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px #00ff99, 0 0 5px #00ff99 inset;
    transition: all 0.3s ease;
    margin: 50px auto;
    width: fit-content;
}

#mejoresVideosTitulo:hover {
    box-shadow: 0 0 20px #00ff99, 0 0 10px #00ff99 inset;
    background: rgba(0, 255, 153, 0.1);
}

/* Efecto Typewriter */
.typewriter-matrix {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 3s steps(28) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #00ff99;
    }
}

/* --- Modal de Cuadrícula de Videos --- */
#allVideosModal {
    display: none;
    position: fixed;
    z-index: 1001; /* Mayor que el modal de video individual */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.all-videos-grid-container {
    position: relative;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    background: #111;
    border: 2px solid #00ff99;
    box-shadow: 0 0 20px #00ff99, 0 0 5px #00ff99 inset;
    animation: modal-fadein 0.5s ease-out;
}

.all-videos-grid {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.titulo-modal {
    color: #00ff99;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ff99;
}

/* Diseño de la burbuja dentro de la cuadrícula */
.burbuja-video-grid {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Mantiene la relación de aspecto 1:1 */
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #00ff99;
    box-shadow: 0 0 10px #00ff99;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.burbuja-video-grid:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #00ff99;
}

.video-preview-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-preview-grid img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-preview-grid .video-preview-jpg {
    opacity: 0; /* Por defecto, el JPG está oculto */
}

.burbuja-video-grid:hover .video-preview-png {
    opacity: 0; /* Al hacer hover, oculta el PNG */
}

.burbuja-video-grid:hover .video-preview-jpg {
    opacity: 1; /* Y muestra el JPG */
}




/* ===== Estilos para el botón de "Mejores Videos" ===== */


/* Contenedor del enlace con estilo de caja negra y sombra verde */
a.videos-link-container {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 10px #00ff99;
    padding: 20px;
    display: inline-block;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    margin-top: 40px; /* Reemplaza el margen superior del h1 */
    margin-bottom: 20px; /* Reemplaza el margen inferior del h1 */
}

/* Ajustes al título h1 dentro del nuevo contenedor */
.videos-link-container .titulo-seccion {
    width: auto; /* Ancho automático para que se ajuste al texto */
    margin: 0; /* Elimina el margen para que no haya doble espaciado */
}

/* ===== Animación de Typewriter al ser visible ===== */

/* Por defecto, la animación está en pausa */
.typewriter-on-view {
    animation-play-state: paused;
}

/* Cuando el elemento es visible, la animación se ejecuta */
.typewriter-on-view.is-visible {
    animation-play-state: running;
}




/* ================================ */
/* CARRUSEL DE PINTURAS ESTILO MATRIX */
/* ================================ */

.gallery-section {
    width: 100%;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
      display: flex;
  justify-content: center;
  align-items: center; /* si quieres centrar también verticalmente */
  flex-direction: column; 
}

.carousel-container {
    width: 100%;
    max-width: 1200px;
    overflow: hidden; /* Oculta los elementos que se salen de la vista */
    position: relative;
    cursor: grab; /* Muestra la "manita de agarrar" */
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    will-change: transform; /* Optimiza la animación */
}

.carousel-item {
    min-width: 250px;
    width: 25vw;
    height: 300px;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 10px #39ff14;
    border-radius: 8px;
}

/* Efecto al pasar el mouse */
.carousel-item .img-original {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-item .img-matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item:hover .img-matrix {
    opacity: 1;
}

.carousel-item .item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #39ff14;
    padding: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 3;
}

.carousel-item:hover .item-overlay {
    transform: translateY(0);
}
/* ================================ */
/* ESTILOS PARA EL MODAL DE IMAGENES */
/* ================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    user-select: none;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid #39ff14;
    box-shadow: 0 0 20px #39ff14;
    cursor: grabbing;
}

.modal-content .painting-title {
    color: #39ff14;
    font-size: 2em;
    font-weight: bold;
    margin-top: 15px;
    text-shadow: 0 0 5px #39ff14;
}

/* Cursor para los elementos del carrusel */
.carousel-item {
    cursor: pointer;
}


/* --- Diseño Responsivo (Cuadrícula) --- */
/* PC o tablets horizontales */

@media (max-width: 600px) {
    .wsp-msg {
        display: none !important;
    }
}

@media (max-width: 700px) {
    .btn-cerrar-poema {
        left: auto;
        right: 18px;
        transform: none;
    }
}

@media (min-width: 769px) {
    .all-videos-grid {
        grid-template-columns: repeat(7, 1fr);
        max-width: 1200px;
    }
}

/* Móviles o tablets verticales */
@media (max-width: 768px) {
    .all-videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .obra-detalle-matrix {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .obra-detalle-img-wrap,
    .obra-detalle-info {
        margin: 18px 0 12px 0;
        max-width: 98vw;
        padding: 0 2vw;
    }

    .obra-youtube {
        max-width: 98vw;
    }
}
/* Contenedor principal del cilindro del poema */

.poema-cilindro-container {
    perspective: 800px;
    width: 100vw; /* Utiliza el ancho completo de la ventana */
    max-width: 100vw;
    height: 400px;
    overflow: hidden;
    margin: 50px 0; /* Agrega margen para separar del video */
    display: flex;
    justify-content: center;
    align-items: center;
}
/* El cilindro en sí */
.poema-cilindro {
    transform-style: preserve-3d;
    transform-origin: center;
    transition: transform 0.2s ease-out; /* Suaviza la rotación */
    width: 100%;
}
/* Cada línea del poema */
.poema-linea {
    position: absolute;
    width: 100%;
    
    text-align: center;
    color: #39ff14;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2em;
    padding: 5px 0;
    margin: 0;
    white-space: nowrap;
    opacity: 0.1;
    transform: rotateX(90deg) translateZ(200px); /* Esto lo controlará el JS */
    transition: transform 0.2s, opacity 0.2s;    color: #39ff14; /* Color base */
    transition: transform 0.2s, color 0.2s, text-shadow 0.2s, opacity 0.2s;
    text-shadow: 0 0 5px #39ff14; /* Efecto de brillo */
    user-select: none; /* Evita que el texto sea seleccionable */
}

/* Estilos para el efecto de movimiento del mouse */
.poema-cilindro-container:hover .poema-cilindro {
    cursor: grab;
}

.poema-cilindro-container:active .poema-cilindro {
    cursor: grabbing;
}
#contenedorPoema {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* cilindro arriba */
    height: 100vh;
    padding-top: 50px; /* baja el cilindro */
    box-sizing: border-box;
}

#iniciar-poema-btn {
    position: fixed;
    margin-bottom: 30px; /* lo acercamos al cilindro */
    z-index: 400;
}
.poema-controles {
  display: flex;
  gap: 30px;         /* Espacio entre botón y control */
  align-items: center;
  justify-content: center;
  margin-top: 80px;
}

/* Caja del slider */
.control-box {
  background: #111;
  border: 2px solid #0f0;
  padding: 20px;
  border-radius: 12px;
  width: 250px;
  text-align: center;
  box-shadow: 0 0 15px #0f0;
}
.control-box button {
  margin-bottom: 20px;
  display: block;
  width: 100%;
}

/* Texto velocidad */
.control-box .title {
  margin-bottom: 15px;
  font-size: 18px;
  color: #0f0;
  text-shadow: 0 0 10px #0f0;
}

/* Slider */
.slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 15px;
  border-radius: 10px;
  background: linear-gradient(90deg, #013d01, #00ff00);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f0;
  cursor: pointer;
  box-shadow: 0 0 15px #0f0;
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f0;
  cursor: pointer;
  box-shadow: 0 0 15px #0f0;
}






.poema-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #00ff00;
  border-radius: 15px;
  padding: 15px;
  margin: 20px auto;
  width: 90%;
  max-width: 900px;
  color: #00ff00;
  font-family: "Courier New", monospace;
}

.poema-titulo {
  text-align: center;
  flex: 1;
}

.poema-titulo h2 {
  margin: 0;
  font-size: 1.6rem;
  text-shadow: 0 0 10px #00ff00;
}

.poema-titulo button {
  margin-top: 8px;
  background: black;
  color: #00ff00;
  border: 2px solid #00ff00;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.poema-titulo button:hover {
  background: #00ff00;
  color: black;
}

.poema-velocidad {
  flex: 1;
  text-align: center;
}

#velocidad-label {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  text-shadow: 0 0 8px #00ff00;
}

#velocidadSlider {
  width: 80%;
  accent-color: #00ff00;
}
