/* Estilo general */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f3f3;
  color: #333;
}

/* Encabezado */
header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 1rem 1rem;          /* Reducido de 2rem a 1rem */
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Texto del header */
header h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 1px;
}

header p {
  margin: 0.5rem 0 1rem;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Animación de fondo – no bloquea clics */
header::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 70%);
  animation: rotate 12s linear infinite;
  pointer-events: none;        /* Permite interactuar con el buscador */
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Buscador encima de la animación */
.buscador {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
}

.buscador input {
  border: none;
  padding: 0.4rem 0.8rem;       /* Padding reducido */
  font-size: 1rem;
  color: white;
  background: transparent;
  width: 200px;
  outline: none;
  transition: width 0.3s ease;
}

.buscador input:focus {
  width: 260px;
}

.buscador button {
  border: none;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  color: #333;
  padding: 0.4rem 1rem;         /* Padding reducido */
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s ease;
}

.buscador button:hover {
  background: linear-gradient(135deg, #fad0c4, #ff9a9e);
}

/* Contenedor principal */
.container {
  padding: 20px;
}

/* Estilo de la cuadrícula */
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
}

/* Cada símbolo */
.symbol-item {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s;
}

.symbol-item:hover {
  transform: scale(1.05);
}

/* Texto del código */
.code {
  display: block;
  font-family: monospace;
  color: #888;
  font-size: 0.9em;
  margin-bottom: 10px;
}

/* Símbolo real */
.symbol {
  font-size: 2rem;
  color: #000;
}

/* --- Modal común --- */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-symbol {
  font-size: 5rem;
  margin-bottom: 20px;
}

.modal-code {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal-code input {
  font-family: monospace;
  font-size: 1rem;
  padding: 5px;
  width: 150px;
}

.modal button {
  padding: 5px 10px;
  cursor: pointer;
}

.close {
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Modal de búsqueda */
.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.search-results li:hover {
  background: #f5f5f5;
}

.search-results .symbol {
  font-size: 1.5rem;
}

.search-results .code {
  font-family: monospace;
  color: #555;
}

