/* assets/css/main.css */
:root {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 0.5rem 1.25rem;
  display: flex;
  justify-content: center;
}

.container {
  max-width: 1040px;
  width: 100%;
  margin-top: 0.5rem;
}

/* Cabecera */

.header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.1rem;
  text-align: center;
  letter-spacing: 0.03em;
}

.subtitle {
  text-align: center;
  color: #9ca3af;
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}

/* Layout dos columnas */

.layout {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.game-column {
  flex: 4;
  min-width: 0;
}

.info-column {
  flex: 2;
  min-width: 220px;
}

/* Tarjeta del juego */

.card {
  background: #020819;
  border-radius: 12px;
  padding: 0.95rem 0.9rem 1rem;
  border: 1px solid #111827;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.sentence {
  margin-bottom: 0.5rem;
  line-height: 1.4;
  font-size: 0.95rem;
}

.sentence--secondary {
  display: none;
}

.hint {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: #cbd5f5;
  display: none;
}

.hint.visible {
  display: block;
}

/* Barra larga del hueco de la palabra */
.sentence-blank {
  letter-spacing: 0.2rem;
  border-bottom: 2px solid #94a3b8;
  display: inline-block;
  padding: 0 0.3rem 0.15rem;
}

/* Input + botón */

.input-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.7rem 0;
}

input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}

input[type="text"]::placeholder {
  color: #6b7280;
}

button {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  background: #0ea5e9;
  color: #0b1120;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  background: #0284c7;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Tablero — grande y legible */

.board {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.row {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

/* Desktop: casillas grandes */
.cell {
  width: 56px;          /* antes 40px */
  height: 46px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
}


/* Estados de las celdas */

.cell.correct {
  background: #22c55e;
  border-color: #22c55e;
  color: #022c22;
}

.cell.present {
  background: #eab308;
  border-color: #eab308;
  color: #1f2937;
}

.cell.absent {
  background: #111827;
  border-color: #111827;
  color: #9ca3af;
}

/* Celdas de muestra en la leyenda */

.cell--sample {
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
}

/* Leyenda (columna derecha) */

.legend {
  margin-top: 0.8rem;
  padding-top: 0.55rem;
  border-top: 1px solid #111827;
}

.legend-title {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e5e7eb;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #d1d5db;
}

/* Mensajes, acciones, stats */

.status {
  margin-top: 0.55rem;
  font-size: 0.85rem;
}

.status.success {
  color: #4ade80;
}

.status.fail {
  color: #f97373;
}

.actions-row {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-start;
}

.stats {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #cbd5f5;
}

/* Columna derecha: info */

.about {
  background: #020617;
  border-radius: 12px;
  padding: 0.85rem 0.8rem 0.9rem;
  border: 1px solid #111827;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
}

.about h2 {
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: #e5e7eb;
}

/* ======================
   RESPONSIVE
   ====================== */

/* Tablets / portátiles pequeños */
@media (max-width: 1024px) {
  .container {
    margin-top: 0.4rem;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .subtitle {
    font-size: 0.82rem;
  }

  .card {
    padding: 0.9rem 0.8rem 0.95rem;
  }

  .about {
    padding: 0.8rem;
  }

 .cell {
    width: 48px;
    height: 42px;
    font-size: 0.95rem;
  }
}

/* Móviles y tablets en vertical */
@media (max-width: 768px) {
  body {
    padding: 0 0.5rem 1.5rem;
  }

  .layout {
    flex-direction: column;
  }

  .card {
    padding: 0.85rem 0.8rem 0.95rem;
  }

  .board {
    gap: 0.25rem;
  }

  .cell {
    width: 40px;
    height: 34px;
    font-size: 0.9rem;
  }

  .about {
    margin-top: 0.9rem;
  }
}

/* Móviles muy pequeños */
@media (max-width: 480px) {
  .header h1 {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.78rem;
    margin-bottom: 0.7rem;
  }

  .card {
    padding: 0.8rem 0.7rem 0.9rem;
  }

  .sentence {
    font-size: 0.86rem;
  }

  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
    justify-content: center;
  }

    .cell {
    width: 32px;
    height: 30px;
    font-size: 0.85rem;
  }

  .legend-item {
    font-size: 0.76rem;
  }
}
