/* ==========================================
   RESET DI BASE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-yellow: #FEFF00;

  --font-base: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* dimensioni frame di riferimento (da Figma, iPhone 16) */
  --frame-width: 393px;
  --frame-height: 1211px;
}

/* ==========================================
   BODY / STRUTTURA GENERALE
   ========================================== */
body {
  font-family: var(--font-base);
  background-color: var(--color-black);
  color: var(--color-white);

  /* per ora simuliamo la larghezza del frame mobile,
     più avanti la rendiamo responsive */
  max-width: var(--frame-width);
  margin: 0 auto;
  min-height: 100vh;
}

/* ==========================================
   HEADER
   ========================================== */
.app-header {
  padding: 24px 20px;
  display: flex;
  justify-content: center;
}

.logo {
  width: 206px;
  height: 52px;
}

/* ==========================================
   CARD "SCANSIONA UN'OPERA"
   ========================================== */
.scan-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  height: 175px;
  padding: 20px;
  margin: 0 20px;
  border-radius: 20px;
  background: #1E1E1E;
}

.scan-card h2 {
  color: #FFFFFF;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.scan-card p {
  color: #FFFFFF;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.btn-scan {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  gap: 27px;
  width: 106px;
  height: 39px;
  padding: 16px;
  margin-top: 8px;
  border: none;
  border-radius: 30px;
  background: var(--color-yellow);
  color: var(--color-black);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ==========================================
   SEZIONE ARTISTI
   ========================================== */
.artisti {
  padding: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 25px;
  font-weight: 500;
  color: #FFFFFF;
}

.vedi-tutti {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-yellow);
  text-decoration: underline;
}

.artisti-list {
  display: flex;
  gap: 16px;
}

.artista {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.artista-foto {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
}

.artista p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
}

/* ==========================================
   SEZIONE OPERE IN MOSTRA
   ========================================== */
.opere {
  padding: 20px;
}

.opere-list {
  display: flex;
  gap: 16px;
}

.opera {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.opera-foto {
  width: 100%;
  aspect-ratio: 180 / 181;
  border-radius: 55px;
  object-fit: cover;
}

.opera p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
  text-align: center;
}

/* ==========================================
   BOTTOM NAVIGATION
   ========================================== */
.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  background-color: #181818;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
}

.nav-icon {
  width: 20px;
  height: 21px;
}

.nav-item.active {
  color: var(--color-yellow);
}

/* ==========================================
   PAGINA SCANSIONA QR
   ========================================== */
.scan-header {
  position: relative;
  padding: 24px 60px 24px 20px;
}

.back-btn {
  display: inline-block;
  margin-bottom: 16px;
}

.back-icon {
  width: 28px;
  height: 22px;
}

.scan-indicator {
  position: absolute;
  top: 24px;
  right: 20px;
  width: 34px;
  height: 34px;
}

.scan-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.scan-header p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #FFFFFF;
}

/* blocco immagine: striscia sfumata dietro + quadrato nitido sopra, alto 298px */
.scan-image-wrap {
  position: relative;
  width: 100%;
  height: 298px;
  margin-top: 20px;
}

.scan-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.scan-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(72, 72, 72, 0.61);
  z-index: 1;
}

.scan-image-fg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 302px;
  height: 298px;
  object-fit: cover;
  z-index: 2;
}

.scan-footer {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

#btn-avanti {
  width: 183px;
  height: 54px;
  border-radius: 30px;
}

/* ==========================================
   PAGINA ELENCO ARTISTI
   ========================================== */
.artisti-list-header {
  padding: 24px 20px;
}

.artisti-list-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 16px;
}

.artisti-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 30px;
  column-gap: 15px;
  padding: 0 20px 24px;
}

.artista-card {
  position: relative;
  aspect-ratio: 178 / 160;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background-size: cover;
  background-position: center;
  text-decoration: none;
}

.artista-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.6) 100%);
}

.artista-card span {
  position: relative;
  z-index: 1;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
}

/* ==========================================
   PAGINA DETTAGLIO ARTISTA
   ========================================== */
.artista-detail-header {
  position: relative;
  padding: 24px 60px 0 20px;
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 20px;
}

.close-icon {
  width: 20px;
  height: 20px;
}

.artista-detail-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 16px;
}

.artista-photo-wrap {
  padding: 20px;
}

.artista-photo {
  display: block;
  width: 100%;
  aspect-ratio: 153 / 106;
  object-fit: cover;
  border-radius: 36px;
}

.artista-tabs {
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.tabs-row {
  display: flex;
  flex: 1;
  border-bottom: 2px solid #666666;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--color-yellow);
  border-bottom-color: var(--color-yellow);
}

.audio-btn {
  background: none;
  border: none;
  padding-left: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.audio-icon {
  width: 26px;
  height: 26px;
}

.artista-content {
  padding: 16px 20px;
}

.tab-panel {
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #FFFFFF;
}

.tab-panel.active {
  display: block;
}

.opere-artista {
  padding: 20px;
}

/* ==========================================
   PAGINA OPERE GALLERIA
   ========================================== */
.galleria-header {
  padding: 24px 20px;
}

.galleria-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: #FFFFFF;
  margin-top: 16px;
}

.galleria-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 20px 24px;
}

.galleria-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 40px;
  border-radius: 20px;
  background: #1E1E1E;
  text-decoration: none;
}

.galleria-card-img {
  width: 100%;
  max-width: 294px;
  aspect-ratio: 161 / 111;
  object-fit: cover;
  border-radius: 10px;
}

.galleria-card h2 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #FFFFFF;
  text-transform: uppercase;
}

.galleria-card-meta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

.galleria-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
}

/* ==========================================
   PAGINA DETTAGLIO OPERA
   ========================================== */
.opera-detail-header {
  position: relative;
  padding: 24px 20px 0;
}

.opera-detail-header .close-btn {
  position: absolute;
  top: 24px;
  right: 20px;
  z-index: 3;
}

.opera-media {
  position: relative;
  width: 100%;
  aspect-ratio: 393 / 393;
  overflow: hidden;
  margin-top: -44px;
  cursor: pointer;
}

.opera-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opera-media-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
}

.opera-tap-icon {
  width: 100px;
  height: 110px;
  object-fit: contain;
}

.opera-media-overlay p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
  text-align: center;
  text-transform: uppercase;
  max-width: 215px;
}

.opera-media.playing .opera-media-overlay {
  display: none;
}

.opera-media-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  border: none;
  display: none;
}

.opera-media.playing .opera-media-frame {
  display: block;
}

.opera-media-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.opera-media.playing .opera-media-video {
  display: block;
}

/* il <video> vuoto (opere con animazione iframe) non deve intercettare i tocchi */
.opera-media-video:not([src]) {
  display: none !important;
}

.opera-content {
  padding: 20px;
}

.opera-content h1 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
}

.opera-meta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.opera-content .tab-panel p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.text-link {
  color: #FFFFFF;
  text-decoration: underline;
  font-weight: 600;
}

.opera-position-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 8px;
}
