/* ESTILOS BASE */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
}

.card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: none;
}

/* SOPA DE LETRAS */
#puzzle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.cell {
  width: 30px;
  height: 30px;
  text-align: center;
  border: 1px solid #ddd;
  margin: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  z-index: 1;
  background-color: white;
  transition: all 0.2s ease;
  user-select: none;
}

.cell:hover {
  background-color: #f0f0f0;
}

.cell.selected {
  background-color: #ffeb3b; /* Amarillo para selección */
  transform: scale(1.05);
  z-index: 2;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.cell.found {
  background-color: #a5d6a7 !important; /* Verde para palabras encontradas */
  color: #1b5e20;
  pointer-events: none;
  animation: wordFound 0.5s ease;
}

.cell.solution {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  animation: pulse 1.5s infinite;
}

.cell.disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* LISTA DE PALABRAS */
.word-item {
  padding: 8px 12px;
  margin: 4px;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.word-item.found {
  text-decoration: line-through;
  color: #28a745;
  background-color: #e8f5e9;
  position: relative;
}

/* SISTEMA DE PUNTUACIÓN */
.score-display {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid #28a745;
}

.score-container h3 {
  margin-top: 0;
  color: #343a40;
  font-size: 1.2rem;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
}

.score-value {
  font-size: 2rem;
  font-weight: bold;
  color: #28a745;
  margin: 10px 0;
  text-align: center;
}

.score-details {
  font-size: 0.9rem;
  color: #6c757d;
  text-align: center;
  margin-top: 5px;
}

/* ANIMACIONES */
@keyframes scorePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.score-pop {
  animation: scorePop 0.5s;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes wordFound {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* CELEBRACIÓN */
#celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s;
}

.celebration-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.5s;
  max-width: 90%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .cell {
    width: 25px;
    height: 25px;
    font-size: 0.9rem;
  }
  
  .word-item {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}

/* ERRORES */
#error-message {
  transition: all 0.3s ease;
}

/* ESTILOS PARA EL REPORTE */
.report-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 20px 20px;
}

.stat-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-left: 4px solid #667eea;
}

.words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.word-found {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.word-missing {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@media print {
  .btn, .footer {
    display: none !important;
  }
  
  .stat-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* ESTILOS PARA EL BADGE DE ACTIVIDAD */
.activity-badge {
  font-size: 0.9rem;
  margin-left: 10px;
}

.completion-method {
  font-size: 0.9rem;
  margin-top: 5px;
}

.method-completo {
  color: #28a745;
  font-weight: bold;
}

.method-solucion {
  color: #ffc107;
  font-weight: bold;
}

/* Badges para tipos de actividad */
.badge.bg-primary { background: linear-gradient(135deg, #007bff, #0056b3) !important; }
.badge.bg-danger { background: linear-gradient(135deg, #dc3545, #c82333) !important; }
.badge.bg-success { background: linear-gradient(135deg, #28a745, #1e7e34) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #ffc107, #e0a800) !important; color: #000 !important; }
.badge.bg-info { background: linear-gradient(135deg, #17a2b8, #138496) !important; }