/* ==========================================================================
   CERO CLUB — Landing Page & Pestañas con Contorno Vivo de Cuadrados
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Vídeo fuente dentro del viewport para evitar pausado automático en Safari/iOS */
#bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  opacity: 0.001;
  pointer-events: none;
  z-index: 0;
}

/* Capas del escenario a pantalla completa */
#pixelCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
  image-rendering: pixelated;
}

#stringsCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 12;
  pointer-events: none;
}

#cutoutsContainer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 13;
  pointer-events: none;
}

#mosaicCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  pointer-events: none;
}

.vhs-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 25;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08),
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
}

#fxCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 50;
  pointer-events: none;
}

/* ==========================================================================
   RECORTES DE PAPEL COLGANDO DEL TECHO
   ========================================================================== */

.hanging-cutout {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  outline: none;
  will-change: transform;
  filter:
    drop-shadow(3px 12px 10px rgba(0, 0, 0, 0.8))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16));
  transition: filter 0.18s ease;
}

.hanging-cutout:hover,
.hanging-cutout:focus-visible {
  z-index: 5;
  filter:
    drop-shadow(5px 17px 14px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
}

.cutout-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Etiqueta colgante de papel para la única fecha activa (Spook) */
.cutout-live-tag {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%) rotate(-2deg);
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 2px 5px 9px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Cartelito mínimo al pasar el ratón sobre cada símbolo */
.cutout-hover-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hanging-cutout.status-activo .cutout-hover-label {
  top: calc(100% + 26px);
}

.cutout-hover-label strong {
  font-weight: 700;
}

.cutout-hover-label em {
  font-style: normal;
  font-weight: 700;
  color: #fd0100;
  margin-left: 5px;
}

.hanging-cutout:focus-visible .cutout-hover-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .hanging-cutout:hover .cutout-hover-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   PESTAÑAS CON ESTÉTICA DE BLOQUES DE ANIMACION_CERO
   (Su borde exterior es el propio contorno vivo de cuadrados en #fxCanvas)
   ========================================================================== */

.tab-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: background 0.24s ease, opacity 0.18s ease;
}

.tab-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(2px);
}

#tabHost {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.96));
}

.event-tab-card {
  position: relative;
  width: min(478px, calc(100vw - 46px));
  max-height: calc(100vh - 46px);
  max-height: calc(100dvh - 46px);
  overflow-y: auto;
  scrollbar-width: none;
  border-radius: 48px;
  border: 0;
  padding: 32px 36px 32px;
  background-color: #000000;
  background-image: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(255, 255, 255, 0.024) 50%
  );
  background-size: 100% 4px;
  color: #ffffff;
  user-select: text;
  transition: opacity 0.14s linear;
}

.event-tab-card::-webkit-scrollbar {
  display: none;
}

/* Separador horizontal de micro-bloques monocromos */
.block-divider {
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #4c4c4c 0 4px,
    transparent 4px 10px
  );
}

/* Cabecera de la pestaña: bloque de estado + cuadrado de cierre */
.tab-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.status-sq {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex-shrink: 0;
}

.tab-status-badge.status-realizado {
  background: #121212;
  color: #c2c2c2;
  border: 1.5px solid #525252;
}

.tab-status-badge.status-realizado .status-sq {
  background: #9c9c9c;
}

.tab-status-badge.status-cancelado {
  background: #fd0100;
  color: #000000;
  border: 1.5px solid #fd0100;
}

.tab-status-badge.status-cancelado .status-sq {
  background: #000000;
}

.tab-status-badge.status-activo {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #ffffff;
}

.tab-status-badge.status-activo .status-sq {
  background: #006afc;
  animation: blockBlink 1.1s steps(2, end) infinite;
}

@keyframes blockBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* Botón de cierre con forma de cuadrado monocromo idéntico a los del contorno */
.tab-close-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e2e2;
  color: #000000;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.tab-close-btn:hover,
.tab-close-btn:focus-visible {
  background: #fd0100;
  color: #ffffff;
  transform: scale(1.06);
  outline: none;
}

/* Símbolo gráfico central del cartel */
.tab-symbol-stage {
  position: relative;
  height: 114px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.tab-hero-svg {
  display: block;
  max-width: 78%;
  max-height: 108px;
  width: auto;
  height: auto;
}

.event-tab-card.status-cancelado .tab-hero-svg {
  opacity: 0.48;
}

.cancelled-tape {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  background: #fd0100;
  color: #000000;
  border: 2px solid #000000;
  padding: 5px 16px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

/* Bloque de datos clave: Fecha, Horario y Local */
.tab-info-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr;
  gap: 12px;
  padding: 13px 0;
}

.info-cell {
  min-width: 0;
}

.info-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #767676;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.info-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: #ffffff;
}

.info-value.struck {
  color: #8a8a8a;
  text-decoration: line-through;
  text-decoration-color: #fd0100;
  text-decoration-thickness: 2px;
}

/* Lineup tipográfico fiel a los carteles originales de CERO CLUB */
.tab-lineup-section {
  margin: 15px 0 20px;
}

.poster-lineup-copy {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(20px, 3.5vw, 24.5px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-top: 6px;
}

.lp-artist {
  display: inline;
}

.lp-sup {
  font-size: 0.5em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  margin: 0 2px;
  letter-spacing: -0.01em;
}

.lp-conn {
  color: #666666;
  font-weight: 400;
}

.lp-affix {
  font-size: 0.86em;
}

/* Pie de pestaña: Píldora oficial Valencia + bloque DICE en Spook */
.tab-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.valencia-poster-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--pill-bg, #006afc);
  color: #000000;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.valencia-poster-pill .pill-city {
  background: #000000;
  color: var(--pill-bg, #006afc);
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 600;
}

.dice-ticket-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f0f0f0;
  color: #000000;
  border: 0;
  padding: 10px 15px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
  line-height: 1;
  transition: background 0.14s ease, transform 0.14s ease;
}

.dice-ticket-btn .btn-sq {
  width: 7px;
  height: 7px;
  background: #006afc;
  flex-shrink: 0;
}

.dice-ticket-btn:hover,
.dice-ticket-btn:focus-visible {
  background: #e0ff03;
  color: #000000;
  transform: translateY(-1px);
  outline: none;
}

.dice-ticket-btn:hover .btn-sq,
.dice-ticket-btn:focus-visible .btn-sq {
  background: #000000;
}

.dice-arrow {
  font-size: 13px;
  line-height: 1;
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL Y PANTALLAS BAJAS
   ========================================================================== */

@media (max-width: 640px) {
  .tab-backdrop {
    padding: 18px;
  }

  .event-tab-card {
    width: calc(100vw - 38px);
    border-radius: 38px;
    padding: 26px 25px 26px;
  }

  .tab-symbol-stage {
    height: 90px;
    margin-bottom: 12px;
  }

  .tab-hero-svg {
    max-height: 84px;
  }

  .tab-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .tab-info-grid .info-cell:first-child {
    grid-column: 1 / -1;
  }

  .poster-lineup-copy {
    font-size: 19px;
  }

  .tab-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .valencia-poster-pill {
    align-self: flex-start;
  }

  .dice-ticket-btn {
    width: 100%;
  }

  .cutout-live-tag {
    font-size: 8px;
    padding: 2px 4px;
    bottom: -17px;
  }

  .hanging-cutout[data-event-id="loco"] .cutout-hover-label {
    left: 0;
    transform: translateX(0) translateY(4px);
  }

  .hanging-cutout[data-event-id="loco"]:hover .cutout-hover-label,
  .hanging-cutout[data-event-id="loco"]:focus-visible .cutout-hover-label {
    transform: translateX(0) translateY(0);
  }

  .hanging-cutout[data-event-id="spook"] .cutout-hover-label {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(4px);
  }

  .hanging-cutout[data-event-id="spook"]:hover .cutout-hover-label,
  .hanging-cutout[data-event-id="spook"]:focus-visible .cutout-hover-label {
    transform: translateX(0) translateY(0);
  }
}

@media (max-height: 680px) {
  .event-tab-card {
    padding: 24px 30px 24px;
  }

  .tab-symbol-stage {
    height: 84px;
    margin-bottom: 10px;
  }

  .tab-hero-svg {
    max-height: 80px;
  }

  .tab-info-grid {
    padding: 10px 0;
  }

  .tab-lineup-section {
    margin: 12px 0 14px;
  }

  .poster-lineup-copy {
    font-size: 19px;
  }
}
