/* -------------------- GLOBAL -------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Mountains of Christmas', cursive;
  background: 
    url('../img/background.png') no-repeat center bottom, 
    linear-gradient(to bottom, #a0d8f1, #ffffff);
  background-size: cover;
  color: #020617; /* darker text for better contrast on light background */
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}


/* Bottom decorations */
body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background:
    url('images/christmas-trees.png') repeat-x bottom,
    url('images/gifts.png') repeat-x bottom 20px;
  background-size: auto 100px, auto 60px;
  pointer-events: none;
  z-index: 1;
}

.hidden { display: none; }

button {
  cursor: pointer;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 10px;
  border: none;
  background-color: #facc15;
  color: #222;
  font-weight: bold;
  font-size: 1rem;
  transition: 0.2s all ease;
}
button:hover {
  background-color: #fcd34d;
}

/* -------------------- START SCREEN -------------------- */
#startScreen {
  text-align: center;
  margin-top: 50px;
  z-index: 2;
  position: relative;
}
#startScreen h1 {
  font-size: 2.5rem;
  color: #ef4444; /* bright Christmas red */
}

/* -------------------- GAME CONTAINER -------------------- */
#game {
  width: 90%;
  max-width: 700px;
  margin: 20px auto;
  text-align: center;
  z-index: 2;
  position: relative;
}

/* -------------------- ROOM BOX -------------------- */
.room-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85); /* slightly transparent light blue */
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.room-box i {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #ef4444;
}

.room-name {
  font-size: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.room-story {
  font-size: 1.1rem;
  margin-top: 10px;
  color: #444;
  text-align: center;
}

/* -------------------- PROGRESS BAR -------------------- */
.progress-bar {
  width: 100%;
  background: #b3e5fc;
  border-radius: 10px;
  height: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-bar .progress {
  height: 100%;
  width: 0%;
  background: #ef4444;
  border-radius: 10px;
  transition: 0.3s width ease;
}

/* -------------------- PUZZLE CARDS -------------------- */
.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: left;
  font-weight: 600;
}

.card h3 {
  margin-top: 0;
  color: #ef4444;
}

.card input[type="text"] {
  width: 80%;
  max-width: 300px;
  padding: 10px;
  margin: 10px 0;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #facc15;
  background: #e0f7fa;
  color: #222;
  text-align: center;
}

/* -------------------- RADIO BUTTONS -------------------- */
.card label {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: #222;
  background: #e0f7fa;
  padding: 8px 12px;
  margin: 5px 0;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #facc15;
  transition: 0.2s all ease;
}

.card input[type="radio"] {
  margin-right: 10px;
  accent-color: #ef4444;
}

.card label:hover {
  background-color: #b3e5fc;
}

.card p.correct { color: #22c55e; font-weight: bold; }
.card p.wrong { color: #ef4444; font-weight: bold; }

/* -------------------- BONUS ROOM -------------------- */
.bonus-room {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  padding: 20px;
  margin: 20px auto;
  max-width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  font-weight: 600;
}

.bonus-room h2 {
  font-size: 2rem;
  color: #ef4444;
}

.bonus-puzzle {
  margin: 20px auto;
  max-width: 400px;
}

/* -------------------- FINAL VAULT -------------------- */
#final { text-align: center; margin: 20px auto; }
#lockInputs input {
  width: 40px;
  height: 40px;
  margin: 5px;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #facc15;
  background: #e0f7fa;
  color: #222;
}

/* -------------------- CONFETTI -------------------- */
canvas {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:9999;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 700px) {
  .room-box { padding: 15px; }
  .room-box i { font-size: 2.5rem; }
  .room-name { font-size: 1.2rem; }
  .room-story { font-size: 1rem; }
  .card input[type="text"] { width: 90%; }
  #jigsawGrid, .bonus-puzzle { max-width: 90%; }
}
