/* ==========================================================================
   DESIGN SYSTEM - TEATRO CTH GIANNI ROSSI
   Estetica Punk Ciclostilato / Collage Taglia & Incolla (1970s-1980s)
   ========================================================================== */

/* Fonts definition */
@font-face {
  font-family: "Courier Prime";
  src: url("CourierPrime-Regular.woff2") format("woff2"),
       url("CourierPrime-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("HankenGrotesk_wght_.woff2") format("woff2"),
       url("HankenGrotesk_wght_.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk Bold";
  src: url("HankenGrotesk_wght_.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base Design Tokens (Theme Variables) */
:root {
  /* Theme "CARTA" (Proposal A - Mimeograph Light Paper) */
  --bg-color: #f1ede4; /* Carta crema ruvida ciclostile */
  --bg-paper-cut: #faf9f6; /* Ritaglio di carta da lettere */
  --text-color: #151515; /* Nero inchiostro concentrato */
  --text-muted: #555555;
  --accent-color: #d33682; /* Magenta ciclostile classico */
  --accent-red: #d01010; /* Rosso volantino ciclostilato */
  --accent-green: #008f39; /* Verde punk zine bilanciato per la carta */
  --stamp-green-text: #ffffff; /* Testo bianco su sfondo verde scuro */
  --accent-yellow: rgba(255, 230, 0, 0.85); /* Evidenziatore giallo */
  --accent-pink: rgba(245, 40, 145, 0.7); /* Evidenziatore rosa */
  --border-color: #151515;
  --shadow-color: rgba(0, 0, 0, 0.12);
  --tape-color: rgba(230, 220, 180, 0.5); /* Nastro adesivo ingiallito */
  --halftone-contrast: 130%;
  
  --font-mono: "Courier Prime", "Courier New", Courier, monospace;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-sans-bold: "Hanken Grotesk Bold", "Helvetica Neue", Arial, sans-serif;
  
  --transition-speed: 0.3s;
}

/* Theme "MURO" (Proposal B - Street Poster Dark Wall) */
body.dark-theme {
  --bg-color: #121212; /* Cemento o poster notturno */
  --bg-paper-cut: #1c1c1c; /* Cartone/volantino scuro applicato sul muro */
  --text-color: #efefef; /* Bianco gesso stancil */
  --text-muted: #aaaaaa;
  --accent-color: #f62987; /* Neon Magenta ancora più acceso */
  --accent-red: #ff3c3c;
  --accent-green: #39ff14; /* Neon Punk Green fluorescente e vibrante */
  --stamp-green-text: #121212; /* Testo scuro su sfondo neon per massima leggibilità */
  --accent-yellow: rgba(230, 200, 0, 0.7);
  --accent-pink: rgba(245, 40, 145, 0.6);
  --border-color: #efefef;
  --shadow-color: rgba(255, 255, 255, 0.05);
  --tape-color: rgba(255, 255, 255, 0.15); /* Scotch grigio/opaco sul muro */
  --halftone-contrast: 160%;
}

/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 60px;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  position: relative;
  overflow-x: hidden;
}

/* Subtle background noise overlay to mimic paper grain */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans-bold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-color);
  margin-bottom: 1rem;
}

p, li, span {
  font-family: var(--font-mono);
}

a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

/* Stencil marker underline for links */
a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  transform: scaleX(0.98);
  transform-origin: left;
  transition: transform 0.2s;
}

a:hover {
  color: var(--accent-color);
}

a:hover::after {
  height: 4px;
  background-color: var(--accent-color);
  transform: scaleX(1);
}

/* Layout Core Elements */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Stencil Logo CTH */
header {
  border-bottom: 5px solid var(--border-color);
  padding: 30px 0;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1020px; /* Spostiamo gli elementi del menu e del logo leggermente più verso il centro */
  margin: 0 auto;
}

/* Brand area */
.brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-link {
  display: block;
}

.logo-link::after {
  display: none; /* Rimuove sottolineatura sul logo */
}

/* Logo scanned frame */
.logo-img-container {
  background-color: #000; /* La scansione originale ha sfondo nero */
  padding: 4px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1) invert(0);
}

/* Invert logo color in dark theme if necessary, but actually the logo is already black-backed white text, so it looks perfect! */

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 2.2rem;
  margin-bottom: 0;
  color: var(--text-color);
  letter-spacing: -0.05em;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
}

/* Tactile Mimeograph Toggle Switcher (Theme) */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: bold;
  background-color: var(--bg-paper-cut);
  color: var(--text-color);
  border: 3px solid var(--border-color);
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--border-color);
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.1s, background-color var(--transition-speed);
}

.theme-switch-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--border-color);
}

.theme-switch-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--border-color);
}

/* Navigation Menu */
nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  flex-wrap: wrap;
}

nav a {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 5px 0;
}

/* Header Right Layout (Menu & Theme Switcher Horizontal Row) */
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

@media (max-width: 950px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }
  
  .brand {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .brand-text {
    align-items: center;
  }
  
  .header-right {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }
  
  nav ul {
    justify-content: center;
  }
}

/* Grid & Collage Asymmetric Sections */
.collage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  margin-top: 60px;
}

@media (max-width: 850px) {
  .collage-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Paper Cutout Box: mimics raw typewritten sheets pasted together */
.paper-cut {
  background-color: var(--bg-paper-cut);
  border: 3px solid var(--border-color);
  padding: 40px;
  border-radius: 5px 7px 5px 8px / 8px 5px 7px 5px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 12px 35px -10px rgba(0, 0, 0, 0.15),
    0 15px 25px -18px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

/* Random asymmetry triggers */
.tilt-left {
  transform: rotate(-0.6deg);
}

.tilt-right {
  transform: rotate(0.8deg);
}

.z-high {
  z-index: 10;
}

/* Highlighter Highlights */
.highlight-yellow {
  background-color: var(--accent-yellow);
  padding: 2px 6px;
  color: #000 !important; /* Sempre leggibile */
}

.highlight-magenta {
  background-color: var(--accent-pink);
  padding: 2px 6px;
  color: #fff !important; /* Sempre leggibile */
}

/* Monochromatic / Halftone Image with Grayscale hover */
.grayscale-hover {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--border-color);
  background-color: #000;
  display: inline-block;
  width: 100%;
}

.grayscale-hover img {
  width: 100%;
  display: block;
  filter: none;
  /* Transizione OUT: più lenta e morbida anche all'uscita del mouse */
  transition: filter 0.65s ease-in-out, transform 0.65s ease-in-out;
  image-rendering: high-quality;
}

.grayscale-hover:hover img {
  filter: none;
  transform: scale(1.03);
  /* Transizione IN: leggero ritardo prima di partire, poi fluida */
  transition: filter 0.65s ease-in-out, transform 0.65s ease-in-out;
  transition-delay: 0.08s;
}

/* Polaroid style photo frame */
.polaroid-frame {
  background-color: var(--bg-paper-cut);
  border: 3px solid var(--border-color);
  padding: 15px 15px 35px 15px;
  border-radius: 2px 4px 2px 4px / 4px 2px 4px 2px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 25px -8px rgba(0, 0, 0, 0.18),
    0 5px 15px -10px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.polaroid-caption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 15px;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
}

/* Adhesive Scotch Tape CSS Effect */
.taped {
  position: relative;
}

.taped::before {
  content: "";
  position: absolute;
  width: 84px;
  height: 25px;
  background-color: var(--tape-color);
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05);
  border-left: 2px dashed rgba(0, 0, 0, 0.1);
  border-right: 2px dashed rgba(0, 0, 0, 0.1);
  z-index: 20;
}

.taped-corner-left::before {
  content: "";
  position: absolute;
  width: 63px;
  height: 21px;
  background-color: var(--tape-color);
  top: -7px;
  left: -14px;
  transform: rotate(-35deg);
  z-index: 20;
  border-left: 2px dashed rgba(0, 0, 0, 0.08);
  border-right: 2px dashed rgba(0, 0, 0, 0.08);
}

.taped-corner-right::after {
  content: "";
  position: absolute;
  width: 63px;
  height: 21px;
  background-color: var(--tape-color);
  top: -7px;
  right: -14px;
  transform: rotate(35deg);
  z-index: 20;
  border-left: 2px dashed rgba(0, 0, 0, 0.08);
  border-right: 2px dashed rgba(0, 0, 0, 0.08);
}

/* Pushpins (Puntine da disegno) on the opposite corner of the tape */
.taped-corner-left::after {
  content: "";
  position: absolute;
  width: 18px; /* Aumentato del 20% da 14px per maggior realismo */
  height: 18px;
  border-radius: 50%;
  top: var(--pin-top, -8px);
  right: var(--pin-right, -6px);
  z-index: 25;
  background: radial-gradient(circle at 5px 5px, #ffffff 0%, var(--pin-color, var(--accent-red)) 40%, #000000 100%);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.45);
  opacity: 1 !important;
  transition: background-color var(--transition-speed), top 0.2s, right 0.2s;
}

.taped-corner-right::before {
  content: "";
  position: absolute;
  width: 18px; /* Aumentato del 20% da 14px per maggior realismo */
  height: 18px;
  border-radius: 50%;
  top: var(--pin-top, -8px);
  left: var(--pin-left, -6px);
  z-index: 25;
  background: radial-gradient(circle at 5px 5px, #ffffff 0%, var(--pin-color, var(--accent-green)) 40%, #000000 100%);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: -1px 3px 5px rgba(0, 0, 0, 0.45);
  opacity: 1 !important;
  transition: background-color var(--transition-speed), top 0.2s, left 0.2s;
}

/* Regole estetiche mirate per pagina e sezione: */

/* 1. Pagine HOME ed EVENTI: Solo SCOTCH su entrambi gli angoli, rimuovi le puntine da disegno.
   Quando c'è lo scotch su un solo lato, ne aggiungiamo uno specchiato sul lato opposto! */
.page-home .taped-corner-left::after,
.page-eventi .taped-corner-left::after {
  content: "" !important;
  position: absolute !important;
  width: 63px !important;
  height: 21px !important;
  background-color: var(--tape-color) !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  top: -7px !important;
  right: -14px !important;
  left: auto !important;
  transform: rotate(35deg) !important;
  z-index: 20 !important;
  box-shadow: none !important;
  border-left: 2px dashed rgba(0, 0, 0, 0.08) !important;
  border-right: 2px dashed rgba(0, 0, 0, 0.08) !important;
}

.page-home .taped-corner-right::before,
.page-eventi .taped-corner-right::before {
  content: "" !important;
  position: absolute !important;
  width: 63px !important;
  height: 21px !important;
  background-color: var(--tape-color) !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  top: -7px !important;
  left: -14px !important;
  right: auto !important;
  transform: rotate(-35deg) !important;
  z-index: 20 !important;
  box-shadow: none !important;
  border-left: 2px dashed rgba(0, 0, 0, 0.08) !important;
  border-right: 2px dashed rgba(0, 0, 0, 0.08) !important;
}

/* 2. Pagina SPETTACOLI - Sezione GLI SPETTACOLI (Timeline): Pinzetta fermadocumenti al CENTRO.
   Rimuoviamo scotch e puntine angolari; la pinzetta è un elemento HTML .binder-clip dedicato. */
.timeline-fanzine .taped-corner-left::before,
.timeline-fanzine .taped-corner-right::after {
  display: none !important;
}

.timeline-fanzine .taped-corner-left::after,
.timeline-fanzine .taped-corner-right::before {
  display: none !important;
}

/* ── PINZETTA FERMADOCUMENTI (Binder Clip) in CSS puro ── */
.binder-clip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 36px;
  z-index: 30;
  pointer-events: none;
  filter: drop-shadow(1px 4px 5px rgba(0,0,0,0.55));
}

/* Corpo principale trapezoidale della pinzetta */
.binder-clip::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  /* Trapezio: base larga 40px in basso, base stretta 24px in alto, altezza 22px */
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 22px solid #1a1a1a;
  /* Sovrascriviamo con clip-path per avere un vero trapezio */
  width: 40px;
  height: 22px;
  border: none;
  clip-path: polygon(6px 0%, 34px 0%, 40px 100%, 0% 100%);
  background: linear-gradient(160deg, #3a3a3a 0%, #111111 45%, #2a2a2a 100%);
}

/* Riflesso metallico sul corpo */
.binder-clip::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 70%);
  border-radius: 1px;
}

/* Archetti metallici superiori — generati tramite SVG inline nel template HTML */
.binder-clip-svg {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  filter: drop-shadow(1px 4px 5px rgba(0,0,0,0.55));
  overflow: visible;
}

/* Biography & Historical Quotes styling */
.bio-hero-block {
  margin-bottom: 2.5rem;
}

.bio-title-large {
  font-size: 3rem;
  color: var(--accent-color);
  letter-spacing: -0.05em;
  margin-bottom: 0.5rem;
}

.bio-subtitle-year {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  display: inline-block;
  padding-bottom: 5px;
}

.quote-fanzine {
  border-left: 8px solid var(--accent-color);
  padding-left: 24px;
  font-style: normal;
  font-size: 1.05rem;
  margin: 30px 0;
  color: var(--text-color);
  position: relative;
}

/* Ink bleed text marker line under lists */
.ink-bullet-list {
  list-style: none;
  margin: 20px 0;
}

.ink-bullet-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
}

.ink-bullet-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-color);
  font-size: 0.95rem;
}

/* Stencil Stamp Text (Volantini Ciclostilati Style) */
.stamp-text {
  font-family: var(--font-sans-bold);
  font-weight: 900;
  background-color: var(--border-color);
  color: var(--bg-color) !important;
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.stamp-text.stamp-green {
  background-color: var(--accent-green) !important;
  color: var(--stamp-green-text) !important;
}

/* Footer construct notice */
footer {
  border-top: 5px solid var(--border-color);
  padding: 40px 0;
  margin-top: 80px;
  text-align: center;
  background-color: var(--bg-color);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer-construct-box {
  background-color: var(--bg-paper-cut);
  border: 2px dashed var(--accent-color);
  padding: 24px;
  max-width: 700px;
  margin: 0 auto 24px auto;
  transform: rotate(-0.5deg);
  border-radius: 4px 6px 4px 6px / 6px 4px 6px 4px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 20px -8px rgba(0, 0, 0, 0.15),
    0 5px 10px -10px rgba(0, 0, 0, 0.1);
}

.footer-construct-box p {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.footer-construct-box p:last-child {
  margin-bottom: 0;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Visual Poetry Gallery (Exhibition) styles */
.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 35px;
  margin-top: 50px;
}

.exhibition-card {
  transition: transform 0.2s ease;
  cursor: pointer;
}

.exhibition-card:hover {
  transform: translateY(-5px) scale(1.02);
  transition-delay: 0.12s; /* Ritardo elegante di 120ms */
}

.exhibition-intro-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 45px;
  align-items: center;
  margin-bottom: 50px;
}

@media (max-width: 850px) {
  .exhibition-intro-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* LIGHTBOX (Visualizzatore foto a schermo intero) */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.lightbox-content {
  position: relative;
  max-width: 82%;
  max-height: 82%;
  border: 4px solid #fff;
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
}

.lightbox-caption {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-align: center;
  padding: 15px;
  background-color: #000;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -5px;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  font-weight: bold;
}

/* Theater Timeline (Cronologia Spettacoli 1968-1996) */
.timeline-fanzine {
  margin-top: 60px;
  position: relative;
}

.timeline-fanzine::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 45px;
}

.timeline-item::before {
  content: "■";
  position: absolute;
  left: 13px;
  top: 0;
  color: var(--accent-color);
  background-color: var(--bg-color);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 2px;
  transition: background-color var(--transition-speed);
}

.timeline-year {
  font-family: var(--font-sans-bold);
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
  display: inline-block;
  background-color: var(--border-color);
  color: var(--bg-color);
  padding: 2px 10px;
}

.timeline-shows {
  background-color: var(--bg-paper-cut);
  border: 2px solid var(--border-color);
  padding: 20px;
  border-radius: 3px 5px 3px 5px / 5px 3px 5px 3px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 18px -8px rgba(0, 0, 0, 0.12),
    0 5px 10px -10px rgba(0, 0, 0, 0.08);
  transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.show-entry {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.show-entry:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.show-title {
  font-weight: bold;
  color: var(--text-color);
}

.show-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Cassette Realista in CSS Puro (Fanzine Vector Style) */
.cassette-player-container {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

/* ── SCOCCA FISICO DECK REGISTRATORE A CASSETTE ── */
.audio-deck-housing {
  background: linear-gradient(180deg, #2a2a2a 0%, #1c1c1c 60%, #111 100%);
  border: 3px solid #111;
  border-radius: 8px;
  box-shadow:
    0 2px 0 #444 inset,        /* bordo superiore highlight */
    0 -2px 0 #000 inset,       /* bordo inferiore ombra */
    4px 0 0 #333 inset,        /* bordo sinistro */
    -4px 0 0 #333 inset,       /* bordo destro */
    0 12px 40px -5px rgba(0,0,0,0.7),
    0 4px 10px rgba(0,0,0,0.4);
  padding: 0;
  width: 580px;
  max-width: 100%;
  overflow: hidden;
  transition: background var(--transition-speed), border-color var(--transition-speed);
}

/* Barra superiore: branding + VU meter */
.audio-deck-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 6px;
  background: linear-gradient(90deg, #1a1a1a, #222, #1a1a1a);
  border-bottom: 2px solid #000;
}
.audio-deck-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.audio-deck-brand-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--accent-color);
  letter-spacing: 0.12em;
}
.audio-deck-brand-model {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #888;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* VU Meter barre */
.audio-deck-top-controls {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.vu-meter {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}
.vu-meter span {
  display: block;
  width: 4px;
  background: #2a5c2a;
  border-radius: 1px;
  transition: transform 0.08s ease, opacity 0.08s ease;
  transform-origin: bottom;
  opacity: 0; /* Spento di default */
}
.vu-meter span:nth-child(1) { height: 4px; }
.vu-meter span:nth-child(2) { height: 8px; }
.vu-meter span:nth-child(3) { height: 14px; background: #3a7a3a; }
.vu-meter span:nth-child(4) { height: 10px; background: #3a7a3a; }
.vu-meter span:nth-child(5) { height: 18px; background: #6aaa2a; }
.vu-meter span:nth-child(6) { height: 12px; background: #6aaa2a; }
.vu-meter span:nth-child(7) { height: 7px; background: #c8a000; }
.vu-meter span:nth-child(8) { height: 3px; background: #c84000; }

/* VU animato quando in play: animazione sweep sinistra/destra avanti/indietro */
.vu-meter.playing span {
  opacity: 1;
}
.vu-meter.playing span:nth-child(1) { animation: vu-sweep-1 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(2) { animation: vu-sweep-2 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(3) { animation: vu-sweep-3 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(4) { animation: vu-sweep-4 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(5) { animation: vu-sweep-5 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(6) { animation: vu-sweep-6 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(7) { animation: vu-sweep-7 1.2s ease-in-out infinite; }
.vu-meter.playing span:nth-child(8) { animation: vu-sweep-8 1.2s ease-in-out infinite; }

/* Sfalsamento canali per effetto stereo */
#vu-meter-right.playing span {
  animation-delay: -0.2s;
}

@keyframes vu-sweep-1 {
  0%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  6%, 94% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-2 {
  0%, 5%, 95%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  12%, 88% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-3 {
  0%, 11%, 89%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  18%, 82% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-4 {
  0%, 17%, 83%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  25%, 75% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-5 {
  0%, 24%, 76%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  31%, 69% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-6 {
  0%, 30%, 70%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  37%, 63% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-7 {
  0%, 36%, 64%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  43%, 57% { opacity: 1; transform: scaleY(1); }
}
@keyframes vu-sweep-8 {
  0%, 42%, 58%, 100% { opacity: 0.15; transform: scaleY(0.2); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Pannello principale (cassette bay + right panel) */
.audio-deck-main-panel {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #222 0%, #1a1a1a 100%);
}

/* Vano cassetta (slot fisico) */
.audio-deck-cassette-bay {
  position: relative;
  background: #111;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.8),
    inset 0 0 0 1px #333;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 200px;
}
/* Sportellino del vano (etichetta) */
.audio-deck-bay-door {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
}
.audio-deck-bay-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #555;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* Il cassette-deck dentro il vano perde il bordo generico */
.audio-deck-cassette-bay .cassette-deck {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  gap: 0;
}

/* Pannello destra: counter + luci */
.audio-deck-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 6px 14px;
  min-width: 100px;
  gap: 12px;
}
/* Counter nastro (stile retrò meccanico) */
.audio-deck-counter {
  background: #0a0a0a;
  border: 1px solid #000;
  border-radius: 3px;
  padding: 6px 10px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.9), 0 1px 0 #333;
  width: 100%;
}
.audio-deck-counter-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: #555;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.audio-deck-counter-digits {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: #e8e000;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 0 8px rgba(232,224,0,0.6);
}
.audio-deck-counter-reset {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  background: #222;
  color: #666;
  border: 1px solid #333;
  border-radius: 2px;
  padding: 2px 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s, color 0.2s;
}
.audio-deck-counter-reset:hover { background: #333; color: #aaa; }

/* Luci di stato (pallini LED) */
.audio-deck-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.audio-deck-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #333;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  transition: background 0.2s, box-shadow 0.2s;
}
.audio-deck-dot.active-play {
  background: #00c853;
  box-shadow: 0 0 6px rgba(0,200,83,0.8);
}
.audio-deck-dot-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: #555;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Pannello pulsantiera in basso */
.audio-deck-controls-panel {
  padding: 10px 16px 12px;
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border-top: 2px solid #000;
}
.audio-deck-controls-panel .deck-controls {
  flex-wrap: wrap;
}

/* cassette-deck standalone (vecchio stile, usato fuori dal deck housing) */
.cassette-deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background-color: var(--bg-paper-cut);
  border: 3px solid var(--border-color);
  padding: 30px;
  border-radius: 6px;
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.05),
    0 15px 35px -15px rgba(0,0,0,0.1);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.cassette-body {
  position: relative;
  width: 360px;
  height: 220px;
  background: linear-gradient(135deg, #2c2c2c 0%, #151515 100%);
  border: 4px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.1);
  /* PUNTO 5: cassetta caricata nel deck → 'schiacciata' (più piccola) */
  transform: translateY(4px) scale(0.88);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease, border-color var(--transition-speed);
}

/* Cassetta espulsa/smontata: torna a grandezza piena, esce fuori dal deck */
.cassette-body.ejected {
  transform: translateY(0px) scale(1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  pointer-events: none; /* Disattiva le interazioni finché non caricata */
}

/* Dettagli Angoli: Viti della cassetta */
.screw {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: #666;
  border: 1.5px solid #111;
  border-radius: 50%;
}
.screw::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1.5px;
  background-color: #222;
  transform: translateY(-50%) rotate(45deg);
}
.screw-tl { top: 8px; left: 8px; }
.screw-tr { top: 8px; right: 8px; }
.screw-bl { bottom: 8px; left: 8px; }
.screw-br { bottom: 8px; right: 8px; }

/* Etichetta Write-on Vintage */
.cassette-label-area {
  position: relative;
  width: 100%;
  height: 95px;
  background-color: #f7f4ec; /* Carta invecchiata */
  border: 2px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cassette-label-lines {
  border-top: 2px solid #3b5998; /* Linea blu vintage */
  border-bottom: 2px solid #d01010; /* Linea rossa vintage */
  height: 45px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cassette-label-title {
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 0.85rem;
  color: #111;
  text-transform: uppercase;
  text-align: center;
}

.cassette-label-brand {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: bold;
  font-family: var(--font-sans-bold);
  color: #555;
  text-transform: uppercase;
}

/* Finestra Trasparente Centrale */
.cassette-window-glass {
  position: relative;
  width: 190px;
  height: 62px;
  background-color: #111;
  border: 3px solid var(--border-color);
  border-radius: 4px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

/* Metro di misurazione del nastro stampato sul vetro */
.cassette-window-glass::before {
  content: "I  I  I  0  I  I  I";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: #555;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Nastro Magnetico Avvolto (Marrone) */
.tape-wind {
  position: absolute;
  width: 65px;
  height: 65px;
  background-color: #4a2f13; /* Colore nastro magnetico ossido di ferro */
  border-radius: 50%;
  z-index: 1;
}
.tape-wind-left {
  left: 15px;
  width: 60px; /* Più nastro a sinistra all'inizio */
  height: 60px;
}
.tape-wind-right {
  right: 15px;
  width: 42px; /* Meno nastro a destra */
  height: 42px;
}

/* Bobine rotanti (Ingranaggi Ciclostilati CSS) */
.cassette-hub {
  position: relative;
  width: 34px;
  height: 34px;
  background-color: #eee;
  border: 3px solid #333;
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hub-teeth {
  width: 100%;
  height: 100%;
  position: absolute;
  border-radius: 50%;
  border: 3.5px dashed #111;
  animation: spin-hub 4s linear infinite paused;
}

.cassette-body.playing .hub-teeth {
  animation-play-state: running;
}

/* Animazione ingranaggi */
@keyframes spin-hub {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Foro centrale passante */
.hub-center {
  width: 14px;
  height: 14px;
  background-color: #111;
  border-radius: 50%;
  border: 2px solid #555;
  z-index: 3;
}

/* Trapezio in basso tipico della cassetta */
.cassette-bottom-plate {
  width: 140px;
  height: 25px;
  background-color: #1f1f1f;
  border-top: 3px solid var(--border-color);
  margin: 0 auto;
  border-radius: 3px 3px 0 0;
  position: relative;
}

/* Controlli del Deck */
.deck-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.cassette-btn {
  font-family: var(--font-sans-bold);
  font-size: 0.85rem;
  font-weight: bold;
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  padding: 6px 16px;
  cursor: pointer;
  border-radius: 3px;
  text-transform: uppercase;
  transition: transform 0.1s, background-color var(--transition-speed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-play {
  transform: translateY(-0.5px); /* Allineamento millimetrico triangolo */
}

.btn-icon-stop {
  transform: translateY(-0.5px); /* Allineamento millimetrico quadrato */
}

.cassette-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.cassette-btn:active {
  transform: scale(0.95);
}

.cassette-btn.active {
  background-color: var(--accent-color) !important;
  color: #fff !important;
  transform: scale(0.95);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
}

@keyframes mute-blink {
  0%, 100% {
    background-color: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
  }
  50% {
    background-color: var(--bg-color);
    color: var(--accent-red);
    border-color: var(--accent-red);
  }
}

.cassette-btn.muted {
  animation: mute-blink 1.5s infinite;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4) !important;
}

/* LED di stato del registratore */
.led-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.led-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #444; /* Spento (Grigio scuro) */
  border: 1.5px solid var(--border-color);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* LED acceso: Rosso fluorescente con bagliore realistico */
.led-light.active {
  background-color: #ff3c3c;
  box-shadow: 
    0 0 8px #ff3c3c,
    0 0 3px rgba(255, 60, 60, 0.5);
}

.led-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Cassette/Media placeholders */
.media-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.media-item-box {
  background-color: var(--bg-paper-cut);
  border: 3px solid var(--border-color);
  padding: 30px;
  border-radius: 3px 4px 3px 5px / 5px 3px 4px 3px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 8px 18px -8px rgba(0, 0, 0, 0.15),
    0 5px 10px -10px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: background-color var(--transition-speed);
}

.media-item--inactive {
  filter: grayscale(1);
  opacity: 0.42;
}
.media-item--inactive .cassette-btn,
.media-item--inactive button {
  pointer-events: none;
  cursor: not-allowed;
}

.media-type-tag {
  position: absolute;
  top: -15px;
  right: 20px;
  font-family: var(--font-sans-bold);
  font-size: 0.75rem;
  background-color: var(--accent-color);
  color: #fff;
  padding: 2px 8px;
  text-transform: uppercase;
  font-weight: bold;
  border: 2px solid var(--border-color);
}

/* Custom list items for timeline */
.shows-fanzine-title {
  border-bottom: 4px double var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 24px;
}

/* ==========================================================================
   VINTAGE VHS PLAYER (CRT TV + VCR DECK)
   ========================================================================== */
.vhs-player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  margin: 40px auto;
  max-width: 880px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 500px) {
  .vhs-player-container {
    gap: 15px;
  }
}

/* CRT TV Bezels and Cabinet */
.crt-tv {
  width: 100%;
  background: #2b2b2b; /* Cabinet in legno finto o plastica scura */
  border: 4px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 
    0 10px 25px rgba(0,0,0,0.3),
    inset 0 4px 10px rgba(255,255,255,0.05);
  position: relative;
}

.crt-bezel {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 25px;
  background: #1a1a1a;
  border: 3px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  align-items: center;
}

@media (max-width: 500px) {
  .crt-bezel {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* CRT Screen Area */
.crt-screen-container {
  position: relative;
  aspect-ratio: 4 / 3; /* Rapporto storico 4:3 */
  background-color: #0c0c0c;
  border: 4px solid #333;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.9);
}

.crt-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

/* Scanlines and screen curve effects */
.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.12) 50%
  ), linear-gradient(
    90deg, 
    rgba(255, 0, 0, 0.04), 
    rgba(0, 255, 0, 0.02), 
    rgba(0, 0, 255, 0.04)
  );
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 12;
}

/* CRT Static Noise Overlay (Animated) */
.crt-noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 10;
}

/* Simulated CRT TV Snow (When no tape loaded) */
.crt-noise-overlay.snowing {
  opacity: 0.85;
  animation: crt-snow 0.25s steps(4) infinite;
  background-color: #333;
}

@keyframes crt-snow {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-0.4px, 0.2px); }
  100% { transform: translate(0.4px, -0.2px); }
}

/* TV Controls Dial */
.crt-tv-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  justify-content: center;
}

.tv-dial {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #333;
  border: 3px solid var(--border-color);
  position: relative;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.tv-dial::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-family: var(--font-primary), monospace;
  font-weight: 600;
  color: #ccc;
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0.8;
}

.tv-dial-channel::after {
  top: -16px;
}

.tv-dial-volume::after {
  bottom: -16px;
}

.dial-marker {
  position: absolute;
  width: 4px;
  height: 12px;
  background-color: var(--border-color);
  top: 4px;
  left: calc(50% - 2px);
  border-radius: 2px;
  transform-origin: bottom center;
}

/* Speaker Grille */
.tv-speaker-grille {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 60px;
  margin-top: 10px;
}

.tv-speaker-grille span {
  display: block;
  height: 3px;
  background-color: var(--border-color);
  width: 100%;
  opacity: 0.7;
}

/* VCR DECK cabinet */
.vcr-deck {
  width: 100%;
  background: #1f1f1f;
  border: 4px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.25),
    inset 0 2px 5px rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vcr-front-panel {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  align-items: center;
}

@media (max-width: 500px) {
  .vcr-front-panel {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* VHS Loading Slot */
.vhs-slot-container {
  background-color: #0c0c0c;
  border: 3px solid var(--border-color);
  height: 60px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vhs-slot-door {
  width: 96%;
  height: 84%;
  background-color: #2c2c2c;
  border: 1px solid #444;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: top center;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.vhs-slot-door.loaded {
  transform: rotateX(-90deg) translate3d(0, -5px, 0);
  background-color: #050505;
}

.vhs-slot-text {
  font-family: var(--font-mono);
}

/* VCR Digital LED Display */
.vcr-led-display {
  background-color: #0a1f0a; /* Display verde fluorescente retrò */
  border: 3px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: #39ff14; /* Verde fosfori attivi */
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.6);
  min-height: 50px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.vcr-display-status {
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.08em;
}

.vcr-display-time {
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Power Indicator */
.vcr-power-led-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--text-color);
}

.vcr-power-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ff3c3c; /* Rosso di stand-by */
  box-shadow: 0 0 4px rgba(255, 60, 60, 0.5);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.vcr-power-led.active {
  background-color: #39ff14; /* Verde di accensione */
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.8);
}

/* VCR Buttons Controls */
.vcr-controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  border-top: 2px dashed var(--border-color);
  padding-top: 15px;
}

/* Fissa la larghezza del bottone STOP per evitare shift quando diventa PAUSE */
.btn-vhs-stop {
  min-width: 98px;
}

.vcr-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  background-color: var(--bg-paper-cut);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 2px 2px 0px var(--border-color);
  transition: transform 0.1s, box-shadow 0.1s, background-color var(--transition-speed);
  display: flex;
  align-items: center;
  gap: 6px;
}

.vcr-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--border-color);
  transition-delay: 0.12s;
}

.vcr-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--border-color);
}

.vcr-btn.active {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.5);
}


/* CRT Standby Screen with glitched logo */
.crt-standby-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0c0c0c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  overflow: hidden;
}

.crt-standby-logo {
  width: 42%;
  height: auto;
  opacity: 0.8;
  filter: drop-shadow(0 0 10px var(--accent-color));
  animation: crt-logo-glitch 5s infinite;
}

@keyframes crt-logo-glitch {
  0%, 40%, 45%, 90%, 95%, 100% {
    opacity: 0.85;
    transform: scale(1) skewX(0deg);
    filter: drop-shadow(0 0 10px var(--accent-color)) grayscale(0);
  }
  41% {
    opacity: 0.1;
    transform: scale(1.05) skewX(10deg);
    filter: drop-shadow(0 0 15px var(--accent-red)) grayscale(0.5);
  }
  42% {
    opacity: 0.8;
    transform: scale(0.95) skewX(-5deg);
  }
  43% {
    opacity: 0.4;
    transform: scale(1) skewX(0deg);
  }
  44% {
    opacity: 0.9;
    transform: scale(1.02) skewX(3deg);
  }
  91% {
    opacity: 0;
    transform: scale(1.1) skewX(15deg);
    filter: drop-shadow(0 0 20px var(--accent-color));
  }
  92% {
    opacity: 0.7;
    transform: scale(0.9) skewX(-10deg);
  }
  93% {
    opacity: 0.1;
    transform: scale(1) skewX(0deg);
  }
  94% {
    opacity: 0.85;
    transform: scale(1.03) skewX(-2deg);
  }
}

/* ─── Hamburger Button ────────────────────────────────────────────── */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  z-index: 201;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--text-color);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7.75px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.75px) rotate(-45deg); }

/* Overlay scuro dietro il menu (blocca lo scroll touch su iOS) */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  /* z-index < header (100): l'overlay copre il contenuto ma resta
     SOTTO lo stacking context dell'header — menu e toggle rimangono visibili */
  z-index: 90;
  cursor: pointer;
}
.menu-overlay.visible { display: block; }

/* ─── Mobile Layout (≤ 768px) ────────────────────────────────────── */

@media (max-width: 768px) {

  .menu-toggle { display: flex; }

  header { padding: 12px 0; }

  /* Override la regola 950px: barra compatta su una riga */
  .header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
  }

  .logo-img-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .brand-text { min-width: 0; }

  .brand-title {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-subtitle { display: none; }

  /* Dropdown: position:fixed, top calcolato in JS — nessun problema
     di containing block o stacking context dell'header sticky */
  .header-right {
    display: none;
    position: fixed;
    top: 74px; /* fallback, sovrascritto da JS con getBoundingClientRect */
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    border-bottom: 4px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 8px;
    z-index: 200;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-right.nav-open { display: flex; }

  nav { width: 100%; }

  nav ul {
    flex-direction: column;
    gap: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  nav ul li { border-bottom: 1px solid var(--border-color); }
  nav ul li:last-child { border-bottom: none; }

  nav a {
    display: block;
    padding: 15px 20px;
    font-size: 1rem;
    text-align: left;
  }

  .theme-switch-wrapper {
    padding: 10px 20px 0;
    width: 100%;
    justify-content: flex-start;
  }

  .theme-switch-btn { width: 100%; }

  /* Contenuto */
  .container { padding: 0 14px; }
  .paper-cut { padding: 20px 18px; }
  .collage-grid { margin-top: 24px; gap: 22px; }

  /* Timeline */
  .timeline-fanzine::before { left: 12px; }
  .timeline-entry { padding-left: 40px; }

  /* ── Cassette audio deck ─────────────────────────────────────────── */
  /* Pannello principale: da riga a colonna su mobile */
  .audio-deck-main-panel {
    flex-direction: column;
    align-items: center;
    padding: 10px 10px 8px;
  }
  .audio-deck-cassette-bay {
    min-height: unset;
    width: 100%;
  }
  /* Scala la cassette-body (360×220) al 75%: 270×165 px visuali.
     Margini negativi compensano lo spazio di layout lasciato dal transform. */
  .audio-deck-cassette-bay .cassette-body {
    transform: scale(0.75);
    transform-origin: center;
    margin: calc((1 - 0.75) * -220px / 2) calc((1 - 0.75) * -360px / 2);
  }
  /* Pannello counter: in riga, centrato sotto la cassetta */
  .audio-deck-right-panel {
    flex-direction: row;
    min-width: unset;
    width: 100%;
    padding: 0;
    gap: 16px;
    justify-content: center;
    align-items: center;
  }
  .audio-deck-counter { width: auto; }

  /* ── VCR controls ────────────────────────────────────────────────── */
  .vcr-controls {
    justify-content: space-evenly;
    gap: 8px;
  }
}
