/* ============================================================
   BRERA REBEL EDITION — stylesheet
   Stile: street art / graffiti pop, colorato, per ragazzi
   ============================================================ */

:root{
  --ink: #14121a;
  --paper: #fdf8ef;
  --paper-2: #fff;
  --yellow: #ffd400;
  --pink: #ff2d78;
  --orange: #ff6a13;
  --blue: #1f7ae0;
  --green: #17b978;
  --purple: #7b2ff7;
  --red: #ee2b3d;

  --accent: var(--pink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --radius: 18px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 64px;
  padding-bottom: 84px;
}

h1, h2, h3{
  font-family: 'Archivo Black', sans-serif;
  line-height: 1.05;
  margin: 0 0 .5em;
}

img{ max-width: 100%; display: block; }

/* ---------- background decor blobs ---------- */
.bg-decor{ position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob{ position: absolute; border-radius: 50%; filter: blur(50px); opacity: .35; }
.blob-1{ width: 420px; height: 420px; background: var(--yellow); top: -120px; left: -100px; }
.blob-2{ width: 380px; height: 380px; background: var(--blue); bottom: -140px; right: -120px; }
.blob-3{ width: 300px; height: 300px; background: var(--pink); top: 40%; left: 60%; }

/* ---------- top bar ---------- */
.topbar{
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 4px solid var(--yellow);
}
.menu-btn{
  background: var(--yellow); color: var(--ink); border: none; border-radius: 10px;
  width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}
.menu-btn:active{ transform: translate(2px,2px); box-shadow: none; }
.topbar-logo{ font-family: 'Bangers', cursive; letter-spacing: 1px; font-size: 1.4rem; color: var(--paper); display:flex; gap:6px; }
.logo-brera{ color: var(--yellow); }
.logo-rebel{ color: var(--pink); transform: rotate(-3deg); display:inline-block; }
.topbar-progress{
  background: var(--pink); color: var(--paper); font-weight: 700; font-size: .75rem;
  padding: 6px 12px; border-radius: 20px; white-space: nowrap; max-width: 130px; overflow:hidden; text-overflow: ellipsis;
  border: 2px solid var(--ink);
}

/* ---------- drawer menu ---------- */
.drawer{
  position: fixed; top: 0; left: -320px; width: 300px; height: 100%; z-index: 300;
  background: var(--ink); color: var(--paper); transition: left .28s ease;
  box-shadow: 6px 0 0 var(--yellow);
  overflow-y: auto;
}
.drawer.open{ left: 0; }
.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 16px; font-family:'Archivo Black', sans-serif; font-size:.9rem;
  border-bottom: 3px solid var(--pink); color: var(--yellow);
}
.drawer-head button{ background:none; border:none; color: var(--paper); font-size:1.3rem; cursor:pointer; }
.drawer-list{ list-style:none; margin:0; padding: 8px; }
.drawer-item{
  width:100%; text-align:left; background:transparent; border:none; color: var(--paper);
  padding: 12px 10px; font-family:'Space Grotesk',sans-serif; font-weight:600; font-size: .95rem;
  border-radius: 10px; cursor:pointer; display:flex; align-items:center; gap:10px;
  transition: background .15s;
}
.drawer-item:hover, .drawer-item:focus{ background: rgba(255,255,255,.08); }
.drawer-item.active{ background: var(--pink); color: var(--ink); }
.d-num{
  font-family:'Bangers', cursive; color: var(--yellow); font-size: 1.1rem; width: 28px; text-align:center; flex-shrink:0;
}
.drawer-item.active .d-num{ color: var(--ink); }
.drawer-overlay{
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 250;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.show{ opacity: 1; pointer-events: auto; }

/* ---------- main stage / screens ---------- */
#mainStage{ max-width: 720px; margin: 0 auto; padding: 20px 16px 10px; }
.screen{ display: none; animation: fadeUp .4s ease; }
.screen.active{ display: block; }
@keyframes fadeUp{ from{ opacity:0; transform: translateY(14px);} to{opacity:1; transform:none;} }

.stage-card{
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 26px 22px 30px;
  position: relative;
}

.eyebrow{
  display:inline-block; background: var(--ink); color: var(--yellow);
  font-weight: 800; font-size: .72rem; letter-spacing: 2px; padding: 5px 12px;
  border-radius: 20px; margin-bottom: 14px;
}

/* ---------- cover ---------- */
.cover-card{ padding: 14px 14px 24px; text-align:center; }
.cover-figure{ margin: 0 0 18px; }
.cover-figure img{
  border-radius: 14px; border: 3px solid var(--ink); box-shadow: var(--shadow-hard);
  width: 100%; height: auto;
}

/* ---------- intro ---------- */
.intro-card{ text-align:center; }
.hero-title{ font-size: 2.5rem; color: var(--ink); }
.hero-rebel{
  color: var(--pink); -webkit-text-stroke: 2px var(--ink);
  display:inline-block; transform: rotate(-2deg);
  font-size: 1.05em;
}
.hero-sub{ font-size: 1.15rem; font-weight: 700; color: var(--blue); margin: 6px 0 2px; }
.hero-tag{
  font-family:'Bangers', cursive; letter-spacing: 2px; color: var(--orange); font-size: 1.3rem; margin: 6px 0 0;
}
.spray-divider{
  height: 10px; margin: 20px auto; width: 70%; border-radius: 10px;
  background: repeating-linear-gradient(90deg, var(--pink) 0 14px, var(--yellow) 14px 28px, var(--blue) 28px 42px);
}
.intro-text{ text-align:left; font-size: 1rem; line-height: 1.6; margin: 0 0 14px; }
.map-figure img{ border-radius: 12px; }
.legend-grid{
  list-style:none; padding:0; margin: 20px 0; display:grid;
  grid-template-columns: repeat(2, 1fr); gap: 10px; text-align:left;
}
.legend-grid li{
  display:flex; align-items:center; gap:8px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px;
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: transform .15s;
}
.legend-grid li:hover{ transform: translateY(-2px); background: var(--yellow); }
.legend-num{
  font-family:'Bangers', cursive; background: var(--pink); color:#fff; border-radius: 50%;
  width: 24px; height: 24px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size: .9rem;
}

/* ---------- buttons ---------- */
.btn-rebel{
  font-family:'Archivo Black', sans-serif; font-size: .95rem; letter-spacing: .5px;
  background: var(--pink); color:#fff; border: 3px solid var(--ink);
  padding: 14px 24px; border-radius: 14px; cursor:pointer;
  box-shadow: var(--shadow-hard-sm); transition: transform .12s, box-shadow .12s;
  display:inline-flex; align-items:center; gap:10px; justify-content:center;
  width:100%; margin-top: 8px;
}
.btn-rebel:hover{ transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.btn-rebel:active{ transform: translate(2px,2px); box-shadow: none; }
.btn-start{ background: var(--yellow); color: var(--ink); }
.btn-quiz{ background: var(--purple); color:#fff; }
.btn-memory{ background: var(--green); color:#fff; }
.btn-ghost{
  background: transparent; border: none; color: var(--ink); font-weight: 700;
  padding: 10px; cursor:pointer; width: 100%; margin-top: 10px; font-size: .88rem;
  display:flex; align-items:center; justify-content:center; gap:8px;
  text-decoration: underline;
}

/* ---------- audio player ---------- */
.audio-player{
  background: var(--ink); border-radius: 14px; padding: 12px 14px 14px;
  margin: 14px 0 20px; border: 3px solid var(--accent);
}
.audio-label{
  margin: 0 0 8px; color: var(--yellow); font-family:'Bangers', cursive;
  letter-spacing: 1.5px; font-size: 1rem; display:flex; align-items:center; gap:8px;
}
.audio-player audio{
  width: 100%; display:block; height: 40px;
  border-radius: 8px;
}
.audio-player audio::-webkit-media-controls-panel{
  background-color: #fff;
}

/* ---------- stop pages ---------- */
.stop-kicker{
  font-family:'Bangers', cursive; color: var(--accent); font-size: 1.1rem; letter-spacing:2px; margin:0;
}
.stop-title{ font-size: 1.9rem; margin: 4px 0 6px; }
.stop-credit{ font-size: .92rem; color: #555; margin: 0 0 18px; }
.stop-figure{ margin: 0 0 20px; text-align: center; }
.stop-figure img{
  margin: 0 auto;
  border-radius: 12px; border: 3px solid var(--ink); box-shadow: var(--shadow-hard-sm);
  max-height: 480px; object-fit: contain; background:#111;
}
.stop-figure figcaption{ font-size: .8rem; color:#666; margin-top: 8px; }

.block{
  background: var(--paper); border-left: 6px solid var(--ink); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px;
}
.block h3{
  font-family:'Space Grotesk', sans-serif; font-weight: 700; font-size: .78rem;
  letter-spacing: 1.5px; margin: 0 0 6px; display:flex; align-items:center; gap:8px;
  text-transform: uppercase; color:#333;
}
.block p{ margin:0; line-height:1.55; }
.block-regola{ border-left-color: var(--red); background: #fff0f1; }
.block-regola h3{ color: var(--red); }
.block-rottura{ border-left-color: var(--orange); background: #fff5eb; }
.block-rottura h3{ color: var(--orange); }
.block-ribellione{ border-left-color: var(--pink); background: #fff0f7; }
.block-ribellione h3{ color: var(--pink); }
.block-curiosita{ border-left-color: var(--blue); background: #eef6ff; }
.block-curiosita h3{ color: var(--blue); }
.block-etu{ border-left-color: var(--green); background: #edfff5; }
.block-etu h3{ color: var(--green); }

.reflection{
  width:100%; margin-top: 10px; border-radius: 10px; border: 2px solid var(--ink);
  padding: 10px; font-family: inherit; font-size: .9rem; resize: vertical; min-height: 60px;
  background:#fff;
}

/* ---------- finale ---------- */
.finale-card{ text-align:center; }
.finale-title{ font-size: 2.1rem; color: var(--ink); }
.finale-text{ font-size: 1rem; line-height:1.6; text-align:left; margin: 0 0 12px; }
.finale-question{ font-size: 1.05rem; line-height:1.6; margin: 18px 0; text-align:left; }

/* ---------- quiz ---------- */
.quiz-card{ text-align:center; }
.quiz-title{ font-size: 1.7rem; }
.quiz-intro{ text-align:left; line-height:1.6; }
.quiz-player{ text-align:left; margin-top: 10px; }
.quiz-progress-bar{ height: 10px; background:#eee; border-radius: 10px; overflow:hidden; border:2px solid var(--ink); }
.quiz-progress-fill{ height:100%; background: linear-gradient(90deg, var(--pink), var(--purple)); width:0%; transition: width .3s; }
.quiz-step{ font-size: .8rem; font-weight:700; color: var(--purple); margin: 10px 0 4px; }
.quiz-question{ font-size: 1.25rem; margin-bottom: 16px; }
.quiz-options{ display:flex; flex-direction: column; gap: 10px; }
.quiz-option{
  text-align:left; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  padding: 12px 14px; cursor:pointer; font-size: .95rem; font-weight: 600;
  transition: transform .12s, background .12s;
}
.quiz-option:hover{ background: var(--yellow); transform: translateX(3px); }
.quiz-option.selected{ background: var(--pink); color:#fff; }

/* ---------- result ---------- */
.result-card{ text-align:center; }
.result-heading{ font-size: 1.5rem; }
.result-stamp{
  display:inline-block; background: var(--yellow); border: 4px solid var(--ink);
  transform: rotate(-3deg); padding: 14px 20px; border-radius: 14px; margin: 6px 0 20px;
  box-shadow: var(--shadow-hard-sm);
}
.result-stamp span{
  font-family:'Bangers', cursive; font-size: 1.7rem; letter-spacing: 1px; color: var(--pink);
}
.result-figure img{ max-height: 380px; }
#resultDescBlock{ text-align:left; }

/* ---------- memory room ---------- */
.memory-card{ text-align:center; }
.memory-heading{ font-size: 1.6rem; }
.memory-sub{ font-size: .95rem; color:#555; }
.memory-form{ display:flex; flex-direction:column; gap: 10px; text-align:left; margin: 16px 0; }
.memory-form label{ font-weight:700; font-size: .85rem; }
.memory-form input{
  padding: 12px; border-radius: 10px; border: 2px solid var(--ink); font-family: inherit; font-size: 1rem;
}
.memory-plaque{
  background: var(--ink); color: var(--paper); border-radius: 16px; padding: 22px;
  margin: 20px 0; border: 4px solid var(--yellow); text-align:center;
}
.plaque-line1{ font-family:'Bangers', cursive; letter-spacing:2px; color: var(--yellow); font-size:1.1rem; margin:0; }
.plaque-date{ font-size: .85rem; color: #ccc; margin: 4px 0 14px; }
.plaque-line2{ font-size: .78rem; letter-spacing: 1.5px; color: #aaa; margin: 0; }
.plaque-profile{ font-family:'Archivo Black', sans-serif; color: var(--pink); font-size: 1.5rem; margin: 6px 0 14px; }
.plaque-name{ font-size: 1.1rem; font-weight:700; margin: 0 0 6px; }
.plaque-challenge{ font-size: .85rem; color:#ddd; font-style: italic; margin:0; }

.memory-wall{ margin-top: 26px; text-align:left; }
.memory-wall h3{ font-size: 1.05rem; display:flex; align-items:center; gap:8px; }
.wall-sub{ font-size: .82rem; color:#666; margin-top:0; }
.wall-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wall-card{
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 10px;
  font-size: .78rem;
}
.wall-card .wc-name{ font-weight:800; }
.wall-card .wc-profile{ color: var(--pink); font-weight:700; }
.wall-card .wc-date{ color:#888; font-size: .7rem; }

/* ---------- bottom nav ---------- */
.bottom-nav{
  position: fixed; bottom:0; left:0; right:0; height: 68px; background: var(--ink);
  display:flex; align-items:center; justify-content:space-between; padding: 0 12px; z-index: 100;
  border-top: 4px solid var(--pink);
}
.nav-btn{
  background: var(--yellow); border: none; border-radius: 12px; padding: 10px 14px;
  font-family:'Space Grotesk', sans-serif; font-weight: 800; font-size: .8rem; cursor:pointer;
  display:flex; align-items:center; gap:6px; color: var(--ink);
}
.nav-btn:disabled{ opacity: .3; cursor: default; }
.nav-dots{ display:flex; gap:4px; overflow-x:auto; max-width: 40%; }
.nav-dots span{
  width:8px; height:8px; border-radius:50%; background:#555; flex-shrink:0;
}
.nav-dots span.on{ background: var(--pink); }

/* ---------- responsive ---------- */
@media (min-width: 640px){
  .hero-title{ font-size: 3.2rem; }
  .stop-title{ font-size: 2.3rem; }
  .legend-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px){
  .topbar-logo{ font-size: 1.15rem; }
  .hero-title{ font-size: 2.1rem; }
  .stop-title{ font-size: 1.6rem; }
  .wall-grid{ grid-template-columns: 1fr; }
}
