html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* evita scroll */
  font-family: Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

#game {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
}


/* Imagen objetivo */
#target-area img {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) contrast(1.2); /* silueta negra */
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

/* Tablero de opciones */
#options-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  width: 100%;
  max-width: 1000px;
  margin-top: 10px;
}

.option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  background: #fff;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


.option img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}

/* En PC más columnas */
@media (min-width: 1024px) {
  #options-area {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    max-width: 1000px;
    overflow-y: hidden; /* en PC no hay scroll */
  }
}

/* En móviles menos columnas */
@media (max-width: 600px) {
  #options-area {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    max-width: 100%;
  }
}

/* Opciones */
.option {
  border: 2px solid #ccc;
  padding: 5px;
  cursor: pointer;
  transition: transform 0.2s;
  text-align: center;
}

.option img {
  width: 100%;
  height: 100px;
  object-fit: contain;
}

.option.correct {
  background-color: lightgreen;
  pointer-events: none;
}

.option.wrong {
  background-color: lightcoral;
}

.option:hover {
  transform: scale(1.05);
}


/* Panel de estado fijo abajo */
#status {
  background: linear-gradient(90deg, #1f1c2c, #928dab);
  color: #fff;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  text-align: center;
  padding: 10px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
}

#status p {
  margin: 5px 0;
}

#status button {
  background: #ff9800;
  color: #fff;
  transition: transform 0.2s;
  margin: 5px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#status button:hover {
  transform: scale(1.1);
}

#restart {
  background-color: #4CAF50;
  color: white;
}

#close {
  background-color: #f44336;
  color: white;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: pop 0.4s ease;
}

.modal-buttons button {
  margin: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#retryBtn {
  background-color: #4CAF50;
  color: white;
}

#exitBtn {
  background-color: #f44336;
  color: white;
}

@keyframes pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#helpBtn {
  background-color: #2196F3;
  color: white;
}

#helpModal .modal-content {
  width: 350px;
  background: #f9f9f9;
  color: #333;
}
#helpModal h2 {
  margin-bottom: 10px;
}
#closeHelp {
  margin-top: 15px;
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
}