body, html {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    font-family: "Fira Code", "Courier New", monospace;
    background-color: #000000;
    color: #dbdbdb;
    overflow: auto;
}
/* Estilos Base y Generales */

.container, .content-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    top: 10px;
    
}

#header {
    width: 100%;
    position: fixed;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#center-typewriter-text {
    padding-top: 100px;
    font-family: monospace;
    color: #c4c3c3;
    font-size: xx-small;
    white-space: pre;
    overflow-wrap: break-word;
}

#center-typewriter-text:hover {
    color:#d3ff7c;
}

/* Estilos para elementos interactivos */
.hover-word:hover, .word-hover:hover, #menu-links a:hover, #logout-btn:hover, footer a:hover {
    color: #3bc0ac;
}

/* Estilos para las cartas */
.cartas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
}

#carta1, #carta2, #carta3 {
    margin: 0 5px;
    min-width: 130px;
    height: 200px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 120px;
}

/* Media Queries para Responsividad */
@media (max-width: 768px) {
    .navbar-toggler, .navbar-nav, footer {
        text-align: center;
    }

    .navbar-nav {
        flex-direction: column;
    }

    footer {
        padding: 10px 20px;
        font-size: 14px;
    }

    #labesl_cartas, .nombre_cartas {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .cartas img {
        max-width: 33%;
        height: auto;
    }
}

@media (max-width: 576px) {
    .content-container, .cartas {
        padding-top: 60px;
    }
    
    .cartas {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }

    .cartas img {
        width: auto;
        max-width: 30%;
    }
    
    .container, .content-container {
        width: 100%;
    }
}

/* Estilos para Control de Audio y Barras */
.audio, #volumen, #velocidad, #controles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

input[type="range"], label {
    width: 100%;
    margin: 5px 0;
}


#carta4_2, #carta4_3, #carta4_1 {
    animation: animacion_carta_2 3s infinite alternate;
}

/* Ajustes Específicos para Controles de Audio */
.audio {
    width: 50%;
    flex-direction: column;
}

/* Mejoras de accesibilidad y estética */
.nav-link, .navbar-brand, footer a {
    touch-action: manipulation;
}

.navbar-collapse {
    background-color: transparent;
}

.navbar-collapse .navbar-nav .nav-link {
    padding: 15px 0;
}

/* Asegura que los controles de audio y velocidad estén correctamente alineados */
#volumen, #velocidad {
    flex-direction: row;
    justify-content: space-around;
}



#volumen {
    display:block;
    flex-direction: row;
}

#velocidad {
    display:block;
    flex-direction:column;
}

/* Animaciones cartas 4 */
#carta4_2,#carta4_3,#carta4_1{
    height: 50px;  
    animation-name: animacion_carta_2;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;  
}

#carta4_1{
    animation-name: animacion_carta_2;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-direction: alternate;    
}

#carta4_2{
    animation-name: animacion_carta_2;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-direction: alternate;    
}

.copy{
    display: flex;
    height: 10px;
    text-align: center;
    position: relative;
}
button{
    display: flex;
    border-style: dashed  rgb(190, 255, 117);
    color: #ffffff;
    width: 80px;
    height: 40%;
    margin: 10px;
}
label{
    width: 10px;
    color: white;
    margin: 8px;
    border-style: dashed  rgb(190, 255, 117);
}
.datos{
    margin: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #7d7070;
}
#fecha{
    margin-top: 50px;
    width: 150px;
    border: 2px dashed #c2ff8f;
    background-color: rgb(170, 125, 212);
    color: #dedede;
}


#carta1,#carta2,#carta3,#labesl_cartas{
    animation-name: animacion_carta;
    animation-duration: 2s;
}

/* Estilos para el control de audio */
audio {
    display: none;
    width: 10%;
    margin-top: 10px;
    height: 5px;
    background-color: transparent;
}

/* Estilos para el control de volumen */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80%;
    height: 10px;
    background-color: transparent;
    border-radius: 10px;
    outline: none;
    margin-top: 5px;
}

/* Thumb WebKit */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5 2px rgba(0, 0, 0, 0.4);
}

/* Thumb Firefox */
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0  2px rgba(0, 0, 0, 0.4);
}

/* Track Firefox */
input[type="range"]::-moz-range-track {
    background: #f0f0f0;
    border-radius: 5px;
}

/* Track WebKit */
input[type="range"]::-webkit-slider-runnable-track {
    background: #f0f0f0;
    border-radius: 5px;
}

/* Controles nativos de audio */
audio::-webkit-media-controls-panel {
    background-color: transparent;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: transparent;
}

audio::-webkit-media-controls-timeline {
    height: 5px;
    background: transparent;
}

audio::-webkit-media-controls-play-button {
    color: #ffffff;
}

audio::-webkit-media-controls-volume-slider {
    height: 5px;
    background-color: #ffffff;
}

audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb {
    background-color: #ffffff;
}

/* Contenedor padre de volumen y velocidad */
#controles {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

/* Ajuste etiquetas slider */
input[type="range"], label {
    width: 100%;
    display: block;
}

label {
    margin-bottom: 5px;
    text-align: left;
}

/* Contenedor 'generales' */
#generales {
    width: 90%;
    margin: 20px auto;
    padding: 15px;
}

/* Etiquetas generales */
label {
    display: block;
    margin-bottom: 5px;
    color: transparent;
    font-family: 'Anta', sans-serif;
}

/* Rango general */
input[type="range"] {
    -webkit-appearance: none;
    margin: 10px 0;
    width: 100%;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: 1px solid #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #7b7b7b;
    border-color: #ffffff;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    background-color:#d6d6d6;
    border-radius: 5px;
    border-color: #ffffff;
}

/* Footer */
footer {
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: transparent;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.1);
    color: rgb(103, 103, 103);
    text-align: center;
    padding: 5px 0;
    padding-top: 50px;
    margin-top: 100px;
}

footer a {
    color: #c4c3c3;
    text-decoration: none;
}

footer a:hover {
    color: #00f7b5;
    text-decoration: none;
}

/* Navbar */
.navbar {
    background-color: transparent !important;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-collapse {
    background-color: transparent;
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.navbar-toggler {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-brand,
.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-brand:hover,
.navbar-nav .nav-link:hover {
    color: #afff3e !important;
}

.navbar-toggler-icon {
    background-color: #ffffff !important;
}

.navbar-toggler-icon:hover {
    background-color: #ffffff !important;
}



.nav-link, .navbar-brand, footer a {
    touch-action: manipulation;
}

.hover-word:hover, .word-hover:hover, #menu-links a:hover, #logout-btn:hover, footer a:hover {
    color: #3bc0ac;
}

.Fira Code {
    font-family: "Fira Code", "Courier New", monospace;
    font-weight: 400;
    font-style: normal;
}

.navbar-collapse {
    background-color: transparent;
    border: 1px dashed  #e0fb9a;
}

.navbar-collapse .navbar-nav .nav-link {
    padding: 15px 0;
}

.navbar-collapse .navbar-nav .nav-link:last-child {
    border-bottom: none;
}


#menu-links a {
    color: #767676;
    text-decoration: none;
    margin: 0 20px;
    background-color:  transparent;
}

#menu-links a:hover {
    border: 2px dashed  #c4d49c;
}

/* hover-text */
.hover-text {
    font-size: x-small;
    display: block;
    width: 100%;
    text-align: center;
    margin: 2px 0;
    color: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.hover-text:hover {
    color: #ccff49;
}



.btn{
    color: #c4c3c3;
    border: 2px dashed  #e0fb9a;
}
.btn:hover{
    color: #20201d;
}

/* ===== SISTEMA DE DOS PANELES ===== */
.ts-panel {
    background: url('cart.jpg') !important;
    background-size: cover !important; /* Cubre todo el panel */
    background-repeat: no-repeat !important; /* No se repite */
    background-position: center center !important; /* Centrada */
    background-attachment: local !important; /* Se mueve con el scroll */
    backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(205, 205, 205, 0.785);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(38, 38, 38, 0.5);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

/* PANEL IZQUIERDO - CONTROLES */
#ts-controls-panel {
  left: 20px;
  top: 30%;
  transform: translateY(-50%);
  width: 320px;
  max-height: 185vh;
  display: flex;
  flex-direction: column;
}

/* PANEL DERECHO - OSCILADORES */
#ts-oscillators-panel {
  right: 20px;
  top: 30%;
  transform: translateY(-50%);
  width: 500px;
  max-height: 125vh;
  display: flex;
  flex-direction: column;
}

/* HEADER DE PANELES */
.ts-panel-header {
  background: rgba(149, 147, 147, 0.106);
  padding: 15px 20px;
  border-bottom: 1px solid rgba(79, 79, 79, 0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.ts-panel-header h3 {
  margin: 0;
  color: #000000;
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

.ts-panel-toggle {
  background: rgba(31, 31, 30, 0.2);
  border: 1px solid rgba(1, 1, 1, 0.4);
  color: #000000;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ts-panel-toggle:hover {
  background: rgba(48, 48, 52, 0.4);
  transform: scale(1.1);
}

/* CONTENIDO DE PANELES */
.ts-panel-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 255, 0.3) transparent;
}

.ts-panel-content::-webkit-scrollbar {
  width: 6px;
}

.ts-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.ts-panel-content::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 255, 0.3);
  border-radius: 3px;
}

/* GRUPOS DE CONTROLES */
.ts-control-group {
  margin-bottom: 25px;
  background: rgba(0, 0, 0, 0.818);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ts-control-group h4 {
  margin: 0 0 15px 0;
  color: #fffffe;
  text-shadow: #83ff07;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-family: 'Courier New', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CONTROLES INDIVIDUALES esto son */
.ts-control {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.ts-control:last-child {
  margin-bottom: 0;
}

.ts-control label {
  flex: 0 0 60px;
  color: #ccc;
  font-size: 0.75em;
  font-weight: 500;
  font-family: 'Courier New', monospace;
}

.ts-control input[type="range"] {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  transition: all 0.3s ease;
}

.ts-control input[type="range"]:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ts-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #000000;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(210, 255, 160, 0.5);
  transition: all 0.3s ease;
}

.ts-control input[type="range"]::-webkit-slider-thumb:hover {
  background: #d3ff6b;
  transform: scale(1.2);
}

.ts-value {
  flex: 0 0 35px;
  color: #748070;
  font-size: 0.7em;
  font-family: 'Courier New', monospace;
  text-align: right;
  font-weight: 600;
}

/* SELECTOR DE MODO */
.ts-mode-selector {
  display: flex;
  gap: 4px;
  margin-bottom: 15px;
}

.ts-mode-btn {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.75em;
  font-family: 'Courier New', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.ts-mode-btn.ts-mode-active {
  background: rgba(173, 173, 173, 0.2);
  border-color: #cfcfcf;
  color: #fafdff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.557);
}

.ts-mode-btn:hover:not(.ts-mode-active) {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ccc;
}

/* ===== NUEVO LAYOUT PARA 22 OSCILADORES ===== */

/* El Loco arriba centrado */
.loco-superior {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.loco-superior .ts-osc-card {
  width: 120px;
  height: 150px;
  transform: scale(1.1);
}

/* Grid principal de 3 filas de 7 columnas */
.ts-osc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

/* TARJETAS DE OSCILADOR COMPACTAS */
.ts-osc-card {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(120, 120, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ts-osc-card:hover {
  border-color: rgba(212, 255, 120, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.ts-osc-card.active {
  border-color: #f2f2f2;
  background: rgba(78, 170, 255, 0.1);
  box-shadow: 0 0 30px rgb(225, 225, 225);
}

/* VISUAL DEL OSCILADOR COMPACTO */
.ts-osc-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
}

.ts-osc-knob {
  width: 30px !important;
  height: 30px !important;
  filter: drop-shadow(0 0 5px rgba(214, 255, 78, 0.3));
  cursor: pointer;
}

.ts-knob-base {
  fill: rgba(20, 20, 40, 0.8);
  stroke: rgba(120, 120, 255, 0.3);
  stroke-width: 1;
}

.ts-knob-groove {
  fill: none;
  stroke: rgba(95, 95, 95, 0.6);
  stroke-width: 2;
}

.ts-knob-center {
  fill: rgba(78, 170, 255, 0.1);
  stroke: #acff4e;
  stroke-width: 1;
}

.ts-knob-indicator {
  stroke: #cccfd3;
  stroke-width: 2;
  stroke-linecap: round;
  transition: all 0.3s ease;
}

.ts-osc-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(186, 186, 186, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ts-osc-card:hover .ts-osc-glow {
  opacity: 1;
}

/* INFORMACIÓN DEL OSCILADOR COMPACTA */
.ts-osc-info {
  text-align: center;
}

.ts-osc-number {
  display: block;
  color: #090909;
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 1px;
}

.ts-osc-name {
  display: block;
  color: #ccc;
  font-size: 0.55em;
  margin-bottom: 1px;
  line-height: 1;
}

.ts-osc-freq {
  display: block;
  color: #888;
  font-size: 0.5em;
  line-height: 1;
}

.ts-osc-gain {
  display: block;
  color: #aeaeae;
  font-size: 0.55em;
  margin-top: 1px;
  line-height: 1;
}

/* ANIMACIONES */
@keyframes ts-pulse {
  0% { box-shadow: 0 0 0 0 rgba(202, 255, 78, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(78, 170, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 170, 255, 0); }
}

.ts-osc-card.pulse {
  animation: ts-pulse 2s infinite;
}


/* ===== VISTA MANUAL CON CARTAS ORGANIZADAS ===== */
.manual-view {
  display: none;
  margin: 20px auto;
  max-width: 1000px;
  padding: 15px;
  width: 90%;
}

.manual-header {
  text-align: center;
  margin-bottom: 20px;
  color: #bababa;
}

.manual-header h3 {
  font-size: 1.2em;
  margin-bottom: 8px;
}

.manual-header p {
  color: #ccc;
  font-size: 0.8em;
}

.manual-grid-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* El Loco arriba en vista manual */
.manual-loco-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.manual-loco-row .manual-card {
  width: 150px;
  height: 220px;
  transform: scale(1.1);
}

/* Grid de 3 filas de 7 cartas para vista manual */
.manual-arcanos-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

/* Estilos de cartas manuales */
.manual-card {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  height: 160px;
  filter: invert(1) hue-rotate(180deg);
}

.manual-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: #000000;
}

.manual-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 8px;
  color: white;
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-number {
  font-size: 0.8em;
  font-weight: bold;
  color: #181818;
}

.card-name {
  font-size: 0.65em;
  text-align: right;
}

.card-slots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.slot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.slot-indicator.active {
  background: #95ff4e;
  box-shadow: 0 0 5px #c4ff4e;
}

.slot-indicator.dia.active {
  background: #ff4444;
}

.slot-indicator.mes.active {
  background: #44ff44;
}

.slot-indicator.anio.active {
  background: #c4ff44;
}

/* Estados activos para cartas */
.manual-card.slot-dia {
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.manual-card.slot-mes {
  border-color: #44ff44;
  box-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}

.manual-card.slot-anio {
  border-color: #daff44;
  box-shadow: 0 0 10px rgba(233, 255, 68, 0.5);
}

.manual-card.active {
  border-color: #666666;
  box-shadow: 0 0 15px rgba(216, 233, 248, 0.7);
}



/* Asegurar que los paneles sean compactos */
.ts-panel {
  max-height: 70vh !important;
}

.ts-panel-content {
  padding: 15px !important;
}

.ts-control-group {
  margin-bottom: 15px !important;
  padding: 12px !important;
}

/* ===== SISTEMA DE FADERS PARA 22 OSCILADORES ===== */
.faders-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 80vh;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid rgba(120, 120, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.fader-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.fader-label {
    color: #d9d9d9;
    font-size: 0.8em;
    width: 80px;
    font-family: 'Courier New', monospace;
}

.fader {
    flex: 1;
    height: 120px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}

.fader-track {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #6a6a6a, #c4ff3b);
    border-radius: 8px;
    opacity: 0.3;
}

.fader-handle {
    position: absolute;
    left: 0;
    width: 100%;
    height: 8px;
    background: #d6ff4e;
    border-radius: 4px;
    cursor: grab;
    box-shadow: 0 0 10px rgba(187, 255, 78, 0.5);
}

.fader-handle:active {
    cursor: grabbing;
}

.fader-value {
    color: #ffeb3b;
    font-size: 0.8em;
    width: 40px;
    text-align: center;
    font-family: 'Courier New', monospace;
}






/* Panel vertical de 22 faders de arcana */
.faders-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.ts-fader-row {
  display: grid;
  grid-template-columns: 1.2fr 2.5fr 0.6fr;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: rgba(5, 5, 5, 0.85);
  border-radius: 6px;
  border: 1px solid rgba(200, 200, 200, 0.08);
}

.ts-fader-label {
  font-size: 11px;
  color: #f5f5f5;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.ts-fader-input[type="range"] {
  width: 100%;
}

.ts-fader-value {
  font-size: 11px;
  text-align: right;
  color: #ffeb3b;
}


#spectrogram {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  border-radius: 0;
  display: block;
  z-index: -1000 !important;
  pointer-events: none;
  object-fit: cover;
}

#spectrogram::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid #9cf700;
  border-radius: 0;
  box-shadow: 0 0 15px rgba(247, 0, 0, 0.3);
  pointer-events: none;
  z-index: -999;
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  from { 
    box-shadow: 0 0 10px rgba(156, 247, 0, 0.3); 
  }
  to { 
    box-shadow: 0 0 20px rgba(247, 0, 0, 0.7); 
  }
}

/* Asegurar que el contenido esté por encima del fondo */
.content-container,
.svg-panel,
#btn-synth-link,
#header,
#treeOverlay,

.cartas,
.datos {
  position: relative;
  z-index: 1;
}

/* === Filtro blanco con caracteres más marcados para cartas de FECHA === */
#carta1,
#carta2,
#carta3,
#carta4_1,
#carta4_2,
#carta4_3 {
  filter: invert(1) hue-rotate(180deg) contrast(1) brightness(1.0);
}




.ts-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Estilo específico para el botón MUTE */
.ts-mute-btn {
  border-color: rgb(250, 250, 250);
  color: #ffffff;
}

.ts-mute-btn:hover {
  background: rgba(99, 98, 98, 0.25);
  border-color: rgba(26, 26, 26, 0.9);
  color: #cbcbcb;
}



.ts-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ts-mute-btn {
  background: rgba(216, 216, 216, 0.15);
  border-color: rgba(0, 0, 0, 0.7);
  color: #e3efe7;
}

.ts-mute-btn:hover {
  background: rgba(101, 101, 101, 0.3);
}


/* Panel de 1 carta (manual / 22 osc) visible por defecto */
#thelema-panel {
  display: block;
}

/* Panel de 3 cartas (fecha) oculto por defecto */
#thelema-fecha-panel {
  display: none;
}


.thelema-panel {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0, 0, 0, 0.932);
  font-size: 11px;
  text-align: left;
}

.thelema-panel h3 {
  margin: 0 0 6px 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.th-bloque {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.th-titulo-bloque {
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 3px;
  opacity: 0.85;
}

.th-row {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}

.th-label {
  opacity: 0.7;
  min-width: 55px;
}

.th-value {
  font-weight: 600;
}


#treeOverlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#treeModal {
    width: 90%;
    height: 90%;
    background: #000;
    color: #fff;
    border-radius: 8px;
    padding: 20px;
    overflow: auto;
    position: relative;
}

#closeTree {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #333;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

#treeAscii {
    white-space: pre;
    font-family: monospace;
    font-size: 12px;
    line-height: 1;
    color: #fff;
}

#treeOfLifeCanvas {
    position: absolute;
    top: 70px;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: 5000; /* encima del espectrograma */
}


/* ===== ÁRBOL DE LA VIDA – OVERLAY DIGITAL ===== */

#kabbalah-tree-container {
    position: fixed;
    top: 100px;
    transform: translateX(-50%);
    width: 220px;
    height: 420px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    mix-blend-mode: screen;
}

.kabbalah-visible {
    opacity: 1;
}

.kabbalah-path {
    stroke: #000000;
    stroke-width: 2px;
    fill: none;
    filter: drop-shadow(0 0 6px #dbff71);
    opacity: 0.25;
    transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.kabbalah-path.active {
    opacity: 0.95;
    stroke-width: 4px;
}

.kabbalah-sefirah {
    fill: rgba(137, 137, 137, 0.824);
    stroke: #c2ff3f;
    stroke-width: 1.5;
    r: 18;
    filter: drop-shadow(0 0 4px #e8ffb0);
    opacity: 0.35;
    transition: opacity 0.2s ease, r 0.15s ease;
}

.kabbalah-sefirah.active {
    opacity: 1;
    r: 14;
}


/* ASCII SIEMPRE AL FONDO */
#ascii-art {
    position: relative !important;
    z-index: -10000000 !important;
}



/* ÁRBOL DE LA VIDA SIEMPRE ENCIMA */
#kabbalah-tree-container {
    position: fixed !important;
    z-index: 9999 !important;
}

#ascii-container {
    position: relative;
    width: 100%;
}

#center-typewriter-text {
    position: relative;
    z-index: 1;
}

#treeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 80% !important;
    height: 80% !important;
    pointer-events: none;
    z-index: 9999;
}





 #helpBtn {
            position: fixed;
            top: 16px;
            left: 16px;
            width: 40px;
            height: 40px;
            background: rgba(0, 0, 0, 0.127);
            color: #b1b1b1;
            border: 2px solid #909090;
            border-radius: 50%;
            box-shadow: 0 0 8px rgba(0, 0, 0, 0.8), 0 0 16px rgba(188, 192, 195, 0.6);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10001;
            transition: box-shadow 0.3s;
        }
        #helpBtn:hover {
            box-shadow: 0 0 12px rgb(69, 70, 71), 0 0 24px rgba(20, 21, 22, 0.8);
        }
        #helpBtn svg {
            width: 24px;
            height: 24px;
            stroke: #ffffff;
            fill: none;
        }
        #helpOverlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        #helpModal {
            width: 440px;
            max-height: 70vh;
            overflow-y: auto;
            padding: 1rem;
            background: #000000;
            color: #fff;
            text-shadow: #ebff53;
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(0,0,0,0.8);
            font-size: 0.7rem;
            position: relative;
            text-align: center;
        }
        #helpModal h3 {
            margin-top: 0;
            margin-bottom: 0.5rem;
            color: #000000;
        }
        #helpModal p {
            margin: 0.5rem 0;
        }
        #helpModal a {
            display: block;
            margin: 0.3rem 0;
            color: #070707;
            text-decoration: none;
            font-weight: bold;
        }

        .ts-waveform-select {
            width: 80px;
            background: rgba(0,0,0,0.5);
            color: #e1ffb8;
            border: 1px solid #888888;
            border-radius: 3px;
            padding: 2px;
            font-size: 0.7em;
            margin-left: 5px;
        }

        .ts-fader-container {
            display: flex;
            align-items: center;
            gap: 5px;
            flex: 1;
        }


         #btn-synth-link {
        position: fixed;
        left: 20px;
        top: 3.5%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(152, 248, 7, 0.9); /* Aumenté opacidad para mejor visibilidad */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(134, 134, 134, 0.947); /* Solo esta línea */
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 0 8px 20px rgba(111, 110, 110, 0.5);
        z-index: 10000; /* Aumenté el z-index */
        padding: 0;
        margin-left:9%;
        outline: none;
    }

    #btn-synth-link:hover {
        border-color: rgba(212, 255, 120, 0.7);
        transform: translateY(-50%) translateY(-3px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
        background: rgba(15, 15, 25, 0.95);
    }

    #btn-synth-link svg {
        width: 24px;
        height: 24px;
        transition: all 0.3s ease;
    }

    #btn-synth-link:hover svg {
        filter: drop-shadow(0 0 10px rgba(214, 255, 78, 0.8));
        stroke: #ffffff; /* Color más brillante en hover */
    }

   

    /* ==============================
   ÁRBOL ASCII · LETRAS HEBREAS
   ============================== */

#treeContainer {
    font-family: 'Courier New', monospace;
    font-size: 6px;
    line-height: 1;
    color: #dedede;
    text-align: center;
    white-space: pre;
    overflow: auto;
}

/* Cada carácter como bloque independiente */
#treeContainer .tree-char {
    display: inline-block;
    transition:
        transform 0.25s ease-out,
        color 0.25s ease-out,
        text-shadow 0.25s ease-out;
}

/* Espacios: mantener forma del árbol */
#treeContainer .tree-space {
    display: inline-block;
    width: 0.35em;
}

/* Estado "hebreo" activo: brillo dorado */
#treeContainer.ascii-active .tree-char.hebrew-active {
    color: #ffd86b;
    text-shadow:
        0 0 4px rgba(255, 220, 120, 0.7),
        0 0 9px rgba(255, 220, 160, 0.9);
    transform:
        translateY(var(--rnd-dy, 0px))
        rotate(var(--rnd-rot, 0deg));
}



#treeBtn .tree-icon {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
    border: #44ff44;
    box-shadow: #6ff700;
}

#treeBtn:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(177, 254, 165, 0.8), 0 0 16px rgba(243, 251, 11, 0.6);
}

button:focus {
    outline: none;
}
/* ==============================
   RESPONSIVE MOBILE-FIRST - CARTAS DE FECHA
   ============================== */
/* ==============================
   BOTONES SUPERIORES - REORGANIZADOS
   ============================== */

/* Contenedor para los botones superiores */
.top-controls {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 10001;
    pointer-events: none; /* Permitir clics a través del contenedor */
}

/* Grupo izquierdo (ayuda + árbol) */
.top-left-buttons {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

/* Grupo derecho (sintetizador) */
.top-right-buttons {
    pointer-events: auto;
}

/* Estilos individuales de botones */
#helpBtn, #treeBtn, #btn-synth-link {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#helpBtn:hover, #treeBtn:hover, #btn-synth-link:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Íconos dentro de botones */
#helpBtn svg, #treeBtn .tree-icon, #btn-synth-link svg {
    width: 20px;
    height: 20px;
    filter: brightness(1.2);
}

#treeBtn .tree-icon {
    object-fit: contain;
}
/* ==============================
   REORGANIZACIÓN VISUAL COMPLETA PARA MÓVILES
   ============================== */

/* CONTENEDOR PRINCIPAL REORGANIZADO */
.content-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* ==============================
   BOTONES SUPERIORES - LADO A LADO
   ============================== */

.top-controls {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    height: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Grupo izquierdo: Ayuda + Árbol (LADO A LADO) */
.top-left-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Grupo derecho: Sintetizador */
.top-right-buttons {
    display: flex;
    align-items: center;
}

/* Botones individuales - TAMAÑO UNIFORME */
#helpBtn, #treeBtn, #btn-synth-link {
    width: 40px;
    height: 40px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#helpBtn:hover, #treeBtn:hover, #btn-synth-link:hover {
    background: rgba(50, 50, 60, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Íconos */
#helpBtn svg, #treeBtn .tree-icon, #btn-synth-link svg {
    width: 22px;
    height: 22px;
    filter: brightness(1.3);
}

#treeBtn .tree-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ==============================
   INTERFACES - VISIBLES Y ORGANIZADAS
   ============================== */

/* Paneles siempre visibles pero reorganizados */


/* Estados de los paneles */
.ts-panel.minimized {
    max-height: 50px;
    overflow: hidden;
}

.ts-panel.expanded {
    max-height: 500px;
}

/* Header de panel - siempre visible */

.ts-panel-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Botón toggle - indica estado */
.ts-panel-toggle {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.ts-panel.expanded .ts-panel-toggle {
    transform: rotate(180deg);
}



/* ==============================
   LAYOUT RESPONSIVE PARA MÓVILES
   ============================== */

@media (max-width: 768px) {
    /* ESPACIO PARA BOTONES SUPERIORES */
    body {
        padding-top: 60px;
    }
    
    .content-container {
        padding: 15px 10px;
        gap: 15px;
    }
    
    /* ==============================
       BOTONES SUPERIORES MÓVIL
       ============================== */
    .top-controls {
        height: 45px;
        padding: 0 10px;
    }
    
    #helpBtn, #treeBtn, #btn-synth-link {
        width: 36px;
        height: 36px;
    }
    
    .top-left-buttons {
        gap: 8px;
    }
    
    /* ==============================
       REORGANIZACIÓN DE SECCIONES
       ============================== */
    
    /* 1. CARTAS DE FECHA ARRIBA */
    .cartas {
        order: 1;
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 10px 0;
        padding: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #carta1, #carta2, #carta3 {
        width: 85px !important;
        height: 130px !important;
        flex-shrink: 0;
    }
    
    /* 2. CONTROLES DE FECHA */
    .datos {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #fecha {
        width: 100%;
        max-width: 250px;
        padding: 10px;
        font-size: 16px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        height: 40px;
    }
    
    /* 3. PANEL THELEMA */
    .thelema-panel {
        order: 3;
        width: 100%;
        margin: 0;
    }
    
    /* 4. PANEL DE CONTROLES */
    #ts-controls-panel {
        order: 4;
    }
    
    /* 5. PANEL DE OSCILADORES */
    #ts-oscillators-panel {
        order: 5;
    }
    
    /* ==============================
       PANELES EN MÓVIL - DISEÑO MEJORADO
       ============================== */
    .ts-panel {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ts-panel.expanded {
        max-height: 400px;
    }
    
    .ts-panel-content {
        max-height: 350px;
        padding: 12px;
    }
    
    /* Grid de controles más compacto */
    .ts-control-group {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .ts-control {
        flex-wrap: wrap;
        margin-bottom: 8px;
    }
    
    .ts-control label {
        flex: 1 0 100%;
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .ts-fader-container {
        flex: 1;
        min-width: 150px;
    }
    
    /* ==============================
       ESPECTROGRAMA Y VISUALIZACIONES
       ============================== */
    #spectro-wrapper {
        order: 6;
        width: 100%;
        height: 200px;
        margin: 10px 0;
        position: relative;
    }
    
    #spectrogram {
        width: 100% !important;
        height: 200px !important;
    }
    
    /* ==============================
       VISTA MANUAL DE CARTAS
       ============================== */
    .manual-view {
        order: 7;
        width: 100%;
        margin: 15px 0;
    }
    
    .manual-arcanos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .manual-card {
        height: 110px;
    }
    
    /* ==============================
       ÁRBOL ASCII RESPONSIVE
       ============================== */
    #treeContainer {
        font-size: 4px;
        max-height: 50vh;
    }
}

/* ==============================
   MÓVILES MUY PEQUEÑOS (<480px)
   ============================== */
@media (max-width: 480px) {
    .top-controls {
        height: 40px;
    }
    
    #helpBtn, #treeBtn, #btn-synth-link {
        width: 32px;
        height: 32px;
    }
    
    .top-left-buttons {
        gap: 6px;
    }
    
    /* Cartas más pequeñas */
    #carta1, #carta2, #carta3 {
        width: 70px !important;
        height: 105px !important;
    }
    
    /* Manual cards más pequeñas */
    .manual-arcanos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .manual-card {
        height: 100px;
    }
    
    /* Paneles más compactos */
    .ts-panel-header {
        padding: 10px 12px;
    }
    
    .ts-panel-header h3 {
        font-size: 0.8em;
    }
    
    .ts-panel-content {
        padding: 10px;
    }
}

/* ==============================
   ORIENTACIÓN HORIZONTAL
   ============================== */
@media (max-height: 500px) and (orientation: landscape) {
    .content-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .cartas, .datos {
        width: 48%;
    }
    
    .ts-panel {
        width: 48%;
        margin: 0 1% 10px 1%;
    }
}

/* ==============================
   MEJORAS DE USABILIDAD
   ============================== */

/* Indicador visual de panel minimizado */
.ts-panel.minimized .ts-panel-header {
    background: rgba(40, 40, 60, 0.7);
}

.ts-panel.minimized .ts-panel-toggle::after {
    content: '+';
    font-weight: bold;
}

.ts-panel.expanded .ts-panel-toggle::after {
    content: '−';
    font-weight: bold;
}

/* Scroll suave */
.ts-panel-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 200, 0.5) transparent;
}

.ts-panel-content::-webkit-scrollbar {
    width: 6px;
}

.ts-panel-content::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 200, 0.5);
    border-radius: 3px;
}

/* ==============================
   ANIMACIONES
   ============================== */

@keyframes panelExpand {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ts-panel.expanded .ts-panel-content {
    animation: panelExpand 0.3s ease-out;
}

/* ==============================
   FOCUS STATES
   ============================== */

#helpBtn:focus,
#treeBtn:focus,
#btn-synth-link:focus,
.ts-panel-toggle:focus {
    outline: 2px solid #44ff44;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}



/* ==============================
   SOLO PANELES A LOS LADOS EN ORDENADOR
   ============================== */

/* EN ESCRITORIO (769px o más) */
@media (min-width: 769px) {
    /* PANEL IZQUIERDO - CONTROLES */
    #ts-controls-panel {
        position: fixed !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 320px !important;
        max-height: 70vh !important;
        z-index: 1000 !important;
    }

    /* PANEL DERECHO - OSCILADORES */
    #ts-oscillators-panel {
        position: fixed !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 500px !important;
        max-height: 70vh !important;
        z-index: 1000 !important;
    }
}

/* EN MÓVIL (768px o menos) - TODO IGUAL QUE AHORA */
@media (max-width: 768px) {
    #ts-controls-panel,
    #ts-oscillators-panel {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }
}

/* ==============================
   ÁRBOL ASCII HIPER RÁPIDO
   ============================== */

#treeContainer.ascii-active .tree-char.hebrew-active {
    color: #ffd86b !important;
    text-shadow:
        0 0 8px rgba(255, 220, 120, 0.9),
        0 0 15px rgba(255, 220, 160, 1) !important;
    transform:
        translateY(var(--rnd-dy, 0px))
        rotate(var(--rnd-rot, 0deg))
        scale(var(--rnd-scale, 1)) !important;
    transition: all 0.05s linear !important; /* Transición ultra rápida */
    animation: hebrewFlash 0.1s ease-in-out !important;
}

@keyframes hebrewFlash {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Asegurar que los caracteres sean más visibles */
#treeContainer .tree-char {
    display: inline-block !important;
    min-width: 0.4em !important;
    font-weight: bold !important;
}

/* Más brillo en hover */
#treeContainer.ascii-active .tree-char:hover {
    color: #ff5500 !important;
    text-shadow: 0 0 20px #ff5500 !important;
    transform: scale(1.5) !important;
    z-index: 1000 !important;
    position: relative !important;
}

/* ==============================
   RESPONSIVE SOLO PARA ÁRBOL DE LA VIDA Y ÁRBOL ASCII
   ============================== */

/* ==============================
   ÁRBOL ASCII - MOBILE FIRST
   ============================== */
#treeContainer {
    font-family: 'Courier New', monospace;
    line-height: 1;
    color: #dedede;
    text-align: center;
    white-space: pre;
    overflow: auto;
    background: #11111130;
    border-radius: 8px;
    padding: 10px;
    max-height: 80vh;
}

/* MOBILES PEQUEÑOS (< 400px) */
@media (max-width: 399px) {
    #treeContainer {
        font-size: 2.5px !important;
        padding: 8px !important;
        max-height: 70vh !important;
    }
}

/* MOBILES NORMALES (400px - 480px) */
@media (min-width: 400px) and (max-width: 480px) {
    #treeContainer {
        font-size: 3px !important;
        padding: 8px !important;
        max-height: 75vh !important;
    }
}

/* TABLETS (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    #treeContainer {
        font-size: 4px !important;
        padding: 12px !important;
        max-height: 80vh !important;
    }
}

/* ESCRITORIO (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    #treeContainer {
        font-size: 5px !important;
        padding: 15px !important;
        max-height: 85vh !important;
    }
}

/* ESCRITORIO GRANDE (> 1024px) */
@media (min-width: 1025px) {
    #treeContainer {
        font-size: 6px !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
}

/* ==============================
   ANIMACIÓN ASCII MÁS RÁPIDA
   ============================== */
#treeContainer .tree-char {
    display: inline-block;
    transition: all 0.05s linear !important; /* ¡ULTRA RÁPIDO! */
}

#treeContainer.ascii-active .tree-char.hebrew-active {
    color: #ffd86b !important;
    text-shadow: 0 0 6px rgba(255, 220, 120, 0.9) !important;
    transform: translateY(var(--rnd-dy, 0px)) rotate(var(--rnd-rot, 0deg)) !important;
    animation: hebrewFlash 0.08s ease-in-out !important;
}

@keyframes hebrewFlash {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* ==============================
   MODAL DEL ÁRBOL - RESPONSIVE
   ============================== */
#treeOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: auto;
}

#treeModal {
    background: #0a0a0a;
    color: #000000;
    border-radius: 12px;
    overflow: auto;
    position: relative;
    box-shadow: 0 0 30px rgba(9, 9, 9, 0.4);
}

/* MOBILES (< 768px) */
@media (max-width: 768px) {
    #treeModal {
        width: 95vw !important;
        height: 90vh !important;
        padding: 1rem !important;
        margin: 10px !important;
    }
    
    #closeTree {
        top: 10px !important;
        right: 10px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
}

/* ESCRITORIO (≥ 769px) */
@media (min-width: 769px) {
    #treeModal {
        width: 90vw !important;
        height: 90vh !important;
        padding: 2rem !important;
        max-width: 1200px !important;
    }
    
    #closeTree {
        top: 15px !important;
        right: 15px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 16px !important;
    }
}

/* ==============================
   BOTÓN DEL ÁRBOL - RESPONSIVE
   ============================== */
#treeBtn {
    position: fixed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: box-shadow 0.3s;
    background: rgba(0, 0, 0, 0);
}

#treeBtn .tree-icon {
    display: block;
    object-fit: contain;
    box-shadow: 0 0 8px rgba(207, 207, 207, 0), 0 0 16px rgba(253, 253, 253, 0.6);
}

/* MOBILES (< 768px) */
@media (max-width: 768px) {
    #treeBtn {
        top: 16px !important;
        left: 70px !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    #treeBtn .tree-icon {
        width: 32px !important;
        height: 32px !important;
    }
}

/* ESCRITORIO (≥ 769px) */
@media (min-width: 769px) {
    #treeBtn {
        top: 20px !important;
        left: 80px !important;
        width: 45px !important;
        height: 45px !important;
    }
    
    #treeBtn .tree-icon {
        width: 38px !important;
        height: 38px !important;
    }
}

/* ==============================
   ÁRBOL KABBALAH - RESPONSIVE
   ============================== */
#kabbalah-tree-container {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    mix-blend-mode: screen;
}

.kabbalah-visible {
    opacity: 1;
}

/* MOBILES (< 768px) - ÁRBOL PEQUEÑO Y CENTRADO */
@media (max-width: 768px) {
    #kabbalah-tree-container {
        width: 180px !important;
        height: 270px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    #kabbalah-tree {
        transform: scale(0.8);
    }
    
    .kabbalah-sefirah {
        r: 14px !important;
        stroke-width: 1px !important;
    }
    
    .kabbalah-path {
        stroke-width: 1.5px !important;
    }
}

/* ESCRITORIO (≥ 769px) - ÁRBOL NORMAL */
@media (min-width: 769px) {
    #kabbalah-tree-container {
        width: 220px !important;
        height: 420px !important;
        top: 100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    #kabbalah-tree {
        transform: scale(1);
    }
    
    .kabbalah-sefirah {
        r: 18px !important;
        stroke-width: 1.5px !important;
    }
    
    .kabbalah-path {
        stroke-width: 2px !important;
    }
}

/* ==============================
   CANVAS DEL ÁRBOL DE LA VIDA - RESPONSIVE
   ============================== */
#treeOfLifeCanvas {
    position: absolute;
    pointer-events: none;
    z-index: 5000;
}

/* MOBILES (< 768px) */
@media (max-width: 768px) {
    #treeOfLifeCanvas {
        top: 50px !important;
        left: 0 !important;
        width: 100% !important;
        height: 300px !important;
    }
}

/* ESCRITORIO (≥ 769px) */
@media (min-width: 769px) {
    #treeOfLifeCanvas {
        top: 70px !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* ==============================
   ORIENTACIÓN HORIZONTAL
   ============================== */
@media (max-height: 500px) and (orientation: landscape) {
    #treeContainer {
        font-size: 3px !important;
        max-height: 85vh !important;
    }
    
    #treeModal {
        width: 95vw !important;
        height: 95vh !important;
        padding: 1rem !important;
    }
    
    #kabbalah-tree-container {
        width: 150px !important;
        height: 225px !important;
        top: 60px !important;
    }
}

/* ==============================
   TOUCH FRIENDLY
   ============================== */
@media (hover: none) and (pointer: coarse) {
    #treeBtn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    #closeTree {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
}
/* ==============================
   SECUENCIADOR 3x22
   ============================== */

#sequencer-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 95vw);
  height: 320px;

  /* Misma estética que ts-panel / cart */
  background: url('cart.jpg') !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-attachment: local !important;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(205, 205, 205, 0.78);
  border-radius: 16px;

  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  font-family: "Fira Code", "Courier New", monospace;
}

/* HEADER DEL SECUENCIADOR */
.sequencer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid rgba(212, 255, 120, 0.25);
}

.sequencer-header h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f5f5f5;
}

/* CONTROLES SUPERIORES (PLAY / STOP / CLEAR / RANDOM) */
.sequencer-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.seq-btn {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(212, 255, 120, 0.45);
  color: #d4ff78;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: "Fira Code", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
}

.seq-btn:hover {
  background: rgba(212, 255, 120, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(212, 255, 120, 0.5);
}

.seq-btn.active {
  background: rgba(212, 255, 120, 0.35);
  color: #ffffff;
}

/* ZONA PRINCIPAL: PISTAS + PARÁMETROS */
.sequencer-main {
  flex: 1;
  display: flex;
  padding: 8px 12px 12px 12px;
  gap: 10px;
}

/* LISTA DE TRACKS (22 columnas) */
.sequencer-tracks {
  flex: 3;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 4px;
}

/* Cada fila/pista */
.sequencer-track {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  gap: 6px;
}

/* Etiqueta de pista (nombre arcano) */
.seq-track-label {
  min-width: 90px;
  text-align: right;
  font-size: 11px;
  color: #f0f0f0;
  opacity: 0.9;
}

/* Contenedor de steps */
.seq-steps {
  display: flex;
  gap: 4px;
}

/* STEP individual (celda de secuenciador) */
.seq-step {
  width: 26px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid rgba(212, 255, 120, 0.2);
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-step:hover {
  border-color: rgba(212, 255, 120, 0.5);
  transform: scale(1.05);
}

.seq-step.active {
  background: rgba(212, 255, 120, 0.35);
  border-color: rgba(212, 255, 120, 0.9);
  box-shadow: 0 0 12px rgba(212, 255, 120, 0.8);
}

/* Step que está sonando en este momento (playhead) */
.seq-step.playing {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 1px;
}

/* PANEL DE PARÁMETROS (BPM, SWING, VOLUMEN, ETC.) */
.sequencer-settings {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(212, 255, 120, 0.22);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.95)
  );
}

.seq-setting-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 11px;
  color: #e5e5e5;
}

.seq-setting-group label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.seq-setting-group input[type="range"] {
  width: 100%;
  accent-color: #d4ff78;
}

.seq-setting-value {
  font-size: 10px;
  opacity: 0.8;
}

/* RESPONSIVE PARA TABLET / MÓVIL */
@media (max-width: 900px) {
  #sequencer-panel {
    width: 98vw;
    height: 260px;
    bottom: 12px;
  }

  .sequencer-main {
    flex-direction: column;
  }

  .sequencer-settings {
    width: 100%;
    padding-left: 0;
    padding-top: 6px;
    border-left: none;
    border-top: 1px solid rgba(212, 255, 120, 0.25);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .seq-setting-group {
    flex: 1;
    min-width: 120px;
  }

  .seq-steps {
    overflow-x: auto;
  }

  .seq-step {
    width: 22px;
    height: 28px;
  }
}

/* ===========================
   BOTÓN TOGGLE DEL SECUENCIADOR
   =========================== */

#toggle-sequencer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 1px solid rgba(212, 255, 120, 0.6);
  background: radial-gradient(
    circle at 30% 30%,
    rgba(212, 255, 120, 0.23),
    rgba(0, 0, 0, 0.96)
  );
  color: #d4ff78;

  font-size: 1.4rem;
  cursor: pointer;

  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  z-index: 1500; /* por encima de paneles, árbol, etc. */
  transition: all 0.2s ease;
}

#toggle-sequencer:hover {
  background: rgba(212, 255, 120, 0.3);
  transform: translateY(-1px) scale(1.08);
}

/* Versión móvil del botón */
@media (max-width: 768px) {
  #toggle-sequencer {
    bottom: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* ===========================
   PANEL REDUCIDO SEQUENCER 3×22
   =========================== */

#sequencer-panel {
  position: fixed;
  right: 10px;
  bottom: 5px;
  width: 440px;
  max-width: 210vw;
  height: 373px;

  display: none;          /* se abre con el botón ♪ */
  flex-direction: column;

  background: rgba(5, 5, 10, 0.96);
  border: 1px solid rgba(212, 255, 120, 0.5);
  border-radius: 14px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.9);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  z-index: 1400;
  overflow:scroll;
}

/* Header gótico compacto */
.sequencer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.685);
  background: radial-gradient(
    circle at 0% 0%,
    rgba(187, 187, 187, 0.951),
    rgba(5, 5, 10, 0.98)
  );
}

/* Bloque de título */
.sequencer-title-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.seq-title-small {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.75);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tipografía gótica solo para el título del secuenciador */
.seq-title-gothic {
  font-family: "UnifrakturMaguntia", system-ui, serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 16px;
  text-transform: none;
  color: #f5ffe0;
  margin: 0;
}

/* Zona de botones */
.sequencer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botones tipo juego / solo SVG */
.seq-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;

  border-radius: 8px;
  border: 1px solid rgba(198, 255, 100, 0.65);
  background: radial-gradient(circle at 30% 20%, #141414, #050505);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.seq-btn svg {
  width: 10px;
  height: 10px;
  stroke: #dffb83;
  stroke-width: 1.5;
  fill: none;
}

/* Play triangular relleno */
#seq-play svg polygon {
  fill: #dffb83;
  stroke: none;
}

.seq-btn:hover {
  transform: translateY(-1px);
  border-color: #f7ff9c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
}

.seq-btn:hover svg {
  stroke: #ffffff;
}

/* Cuerpo del panel (respetando tu lógica anterior) */
.sequencer-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Ajuste responsivo para móvil */
@media (max-width: 900px) {
  #sequencer-panel {
    width: 98vw;
    height: 260px;
    bottom: 12px;
    right: 1vw;
  }

  .sequencer-main {
    flex-direction: column;
  }

  .sequencer-settings {
    width: 100%;
    padding-left: 0;
    padding-top: 6px;
    border-left: none;
    border-top: 1px solid rgba(212, 255, 120, 0.25);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}


