/* ══════════════════════════════
   BASE
══════════════════════════════ */
* { box-sizing: border-box; 
  margin: 0; 
  padding: 0; }
body { background: #111; 
  font-family: Georgia, serif; }

/* ══════════════════════════════
   PARETS
══════════════════════════════ */
#pared1, #pared2, #pared3, #pared4, #sostre, #terra {
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  width: min(100vw, 100dvh);
  height: min(100vw, 100dvh);
  margin: auto;
  display: none;
}
#pared1 { 
  background-image: url(img/paret.jpeg);     
  display: block; 
}

#pared2 { 
  background-image: url(img/bany.jpeg); 
}

#pared3 {
  background-image: url(img/llibreria.jpeg); 
}

#pared4 { 
  background-image: url(img/finestra.jpeg); 
}

#sostre { 
  background-image: url(img/techo.jpeg); 
}

#terra  { 
  background-image: url(img/suelo.jpeg); 
}

/* ══════════════════════════════
   BOTONS NAVEGACIÓ
══════════════════════════════ */
.bt_left, .bt_right, .bt_up, .bt_down {
  background-size: cover;
  background-repeat: no-repeat;
  position: absolute;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.bt_left:hover, .bt_right:hover, .bt_up:hover, .bt_down:hover { opacity: 1; }
.bt_left  { 
  background-image: url("img/angle-left-solid (1).svg");  
  top:50%;   
  left:1%;  
  width:5%; 
  height:10%; 
}

.bt_right { 
  background-image: url("img/angle-right-solid (1).svg"); 
  top:50%;   
  right:1%;  
  width:5%; 
  height:10%; 
}

.bt_up    { 
  background-image: url("img/angle-up-solid (1).svg");   
  top:1%;    
  right:45%; 
  width:8%; 
  height:10%; 
}

.bt_down  {
  background-image: url("img/angle-down-solid (1).svg"); 
   bottom:1%; 
   right:45%; 
   width:8%; 
   height:10%; 
  }

/* ══════════════════════════════
   ELEMENTS POLS
══════════════════════════════ */
#pols1 { 
  background-image:url(img/pols.png);
  background-size:cover; 
  position:absolute; width:10%; 
  height:3%; 
  bottom:0%;  
  left:30%;  
  cursor:pointer; 
}

#pols2 {
  background-image:url(img/pols.png); 
  background-size:cover; 
  position:absolute; 
  width:10%; 
  height:2%; 
  top:10%;   
  left:13%;  
  cursor:pointer; 
}

#pols3 { 
  background-image:url(img/pols.png); 
  background-size:cover; 
  position:absolute; 
  width:10%; 
  height:3%; 
  top:17%;   
  right:30%; 
  cursor:pointer; 
}

#pols4 { 
  background-image:url(img/pols.png); 
  background-size:cover; 
  position:absolute; 
  width:10%;
  height:2%; 
  bottom:0%; 
  right:5%;  
  cursor:pointer; 
}

/* ══════════════════════════════
   PLANTES
══════════════════════════════ */
#planta_pocha {
  background-image: url(img/planta_pocha.png); background-size:cover;
  position:absolute; 
  width:11%; 
  height:15%; 
  top:47%; 
  left:75%; 
  cursor:pointer;
}
#planta_sana {
  background-image: url(img/IMG_2456.PNG); background-size:cover;
  position:absolute; 
  width:18%; 
  height: 18%;
  top: 44%; 
  left:75%; 
  display:none;
}

/* ══════════════════════════════
   OBJECTES
══════════════════════════════ */
#pot_buit {
  background-image: url(img/pot.png); 
  background-size:cover;
  position:absolute; 
  width:5%; 
  height:8%; 
  top:51%; 
  left:45%; 
  cursor:pointer;
}

#gerra {
  background-image: url(img/IMG_2426.png); 
  background-size:cover;
  position:absolute; 
  width:16%; 
  height: 18%;
  top: 44%; 
  left:5%; 
  cursor:pointer;
}

/* ══════════════════════════════
   PORTA
══════════════════════════════ */
#porta_sortida {
  position:absolute; 
  width:2.5%; 
  height:2.5%; 
  top:55%; 
  left:10%;
  background: radial-gradient(circle, rgba(255,220,80,1) 0%, rgba(255,180,0,0.3) 70%, transparent 100%);
  border-radius:50%; 
  animation:parpelleig 1.1s ease-in-out infinite; 
  cursor:pointer; 
  display:none;
}

@keyframes parpelleig {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:0.3; transform:scale(0.7); }
}

/* ══════════════════════════════
   RELLOTGE PETIT (a la paret)
   Mateixa aparença que el gran, escala reduïda
══════════════════════════════ */
#rellotge_petit {
  position: absolute;
  bottom: 40%;
  left: 45%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: #c8956b;
  border: 2px solid #8a5a30;
  border-radius: 6px;
  padding: 5px 10px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: filter 0.15s;
}
#rellotge_petit:hover { filter: brightness(1.12); }

.digit_grup_petit {
  display: flex;
  align-items: center;
  justify-content: center;
}
.digit_petit {
  font-family: 'Courier New', monospace;
  font-size: 1em;
  font-weight: bold;
  color: #1a0800;
  width: 0.9em;
  text-align: center;
  line-height: 1;
}
.sep_petit {
  font-family: 'Courier New', monospace;
  font-size: 1em;
  font-weight: bold;
  color: #1a0800;
  margin: 0 1px;
  padding-bottom: 3px;
}

/* ══════════════════════════════
   RELLOTGE GRAN (dins el modal)
══════════════════════════════ */
#rellotge_gran {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #c8956b;
  border: 3px solid #8a5a30;
  border-radius: 10px;
  padding: 18px 28px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
  margin: 12px 0;
}

.digit_grup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.digit_display {
  font-family: 'Courier New', monospace;
  font-size: 3em;
  font-weight: bold;
  color: #1a0800;
  width: 1.05em;
  text-align: center;
  line-height: 1.1;
  transition: transform 0.12s;
}
.digit_display.digit_canvi { transform: scale(1.15); }

.fletxa {
  background: rgba(0,0,0,0.15);
  border: none;
  border-radius: 4px;
  color: #1a0800;
  font-size: 1em;
  cursor: pointer;
  padding: 2px 10px;
  line-height: 1;
  transition: background 0.15s, transform 0.1s;
}
.fletxa:hover { background: rgba(0,0,0,0.3); transform: scale(1.2); }

.rellotge_sep {
  font-family: 'Courier New', monospace;
  font-size: 3em;
  font-weight: bold;
  color: #1a0800;
  margin: 0 4px;
  padding-bottom: 18px;
}

/* ══════════════════════════════
   BOTÓ BARREJAR
══════════════════════════════ */
#btn_barrejar {
  display: none;
  position: fixed;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  background: #ede8df;
  color: #333;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 0.9em;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: background 0.15s;
}
#btn_barrejar:hover { background: #d4c8b0; }

/* ══════════════════════════════
   INVENTARI VISUAL
══════════════════════════════ */
.inv_item {
  display: none;
  position: fixed;
  width: 70px;
  z-index: 40;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
  pointer-events: none;
}

/* ══════════════════════════════
   HUD
══════════════════════════════ */
#hud {
  position: fixed;
  top: 10px; 
  left: 50%; 
  transform: translateX(-50%);
  display: flex; 
  gap: 8px; 
  z-index: 50; 
  pointer-events: none;
}
.hud_bloc {
  background: rgba(0,0,0,0.55); 
  color: #ccc; 
  border: 1px solid #444;
  border-radius: 4px; 
  padding: 5px 12px; 
  font-size: 0.78em;
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
#toast {
  position: fixed; 
  bottom: 90px; 
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,0.8); 
  color: #eee; 
  border: 1px solid #555;
  border-radius: 6px; 
  padding: 9px 20px; 
  font-size: 0.84em;
  max-width: 320px; 
  text-align: center; 
  opacity: 0;
  pointer-events: none; 
  transition: opacity 0.25s, transform 0.25s; 
  z-index: 60;
}

#toast.visible { 
  opacity:1; 
  transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════
   MODALS — disseny mínim beige
══════════════════════════════ */
.modal {
  display: flex; 
  position: fixed; 
  inset: 0;
  background: rgba(0,0,0,0.5); 
  z-index: 100;
  align-items: center; 
  justify-content: center; 
  padding: 20px;
}

.modal_caixa {
  background: #f7f2eb; 
  color: #222;
  border-radius: 8px; 
  padding: 28px 26px;
  max-width: 400px; 
  width: 100%;
}

.modal_caixa h2 { 
  
  font-size: 1.2em; 
  font-weight: 700; 
  margin-bottom: 10px; 
  color: #111; 
}
.modal_caixa p  {
  font-size: 0.9em; 
  line-height: 1.6; 
  color: #444; 
  margin-bottom: 8px; 
}

.modal_tasca {
  font-size: 0.88em; 
  line-height: 1.55;
  color: #555;
  border-top: 1px solid #ddd; 
  margin-top: 12px; 
  padding-top: 12px;
}

.tasca_num { 
  font-size: 0.72em; 
  letter-spacing: 0.08em; 
  color: #999; 
  font-weight: bold; 
  margin-bottom: 4px; 
  font-family: Arial, 
  sans-serif; }

.tasca_text { color: #444; }

.btn_modal {
  background: #222; 
  color: #f0e8d8; 
  border: none; 
  border-radius: 5px;
  padding: 10px 22px; 
  font-size: 0.88em; 
  font-family: Georgia, serif;
  cursor: pointer; 
  margin-top: 16px; 
  transition: background 0.15s;
}
.btn_modal:hover { 
  background: #444; 
}

.modal_victori h2 { 
  color: #5a3e00; 
}

.btn_victori { 
  background: #5a3e00 !important; 
}

.btn_victori:hover { 
  background: #7a5800 !important; 
}

.subtitol_final { 
  font-size: 0.82em !important; 
  color: #999 !important; 
  font-style: italic; 
}

/* ══════════════════════════════
   SPIN
══════════════════════════════ */
#spin_area { 
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  gap:14px; 
  margin:16px 0; 
}

#pot_spin { 
  width:100px; 
  cursor:pointer; 
  transition:transform 0.3s ease; 
  filter:drop-shadow(0 2px 8px rgba(0,0,0,0.2)); 
  user-select:none; 
}

#pot_spin:hover { 
  filter:brightness(1.1) drop-shadow(0 2px 8px rgba(0,0,0,0.3)); 
}

#spin_progress_wrap { 
  width:200px; 
  height:8px; 
  background:#ddd5c4; 
  border-radius:4px; 
  overflow:hidden; 
}

#spin_progress { 
  height:100%; 
  width:0%; 
  background:#a89070; 
  border-radius:4px; 
  transition:width 0.3s ease; 
}

#spin_missatge { 
  font-size:0.88em; 
  color:#666; 
  font-style:italic; 
}
