/* ESTILOS PRINCIPALES (ajusta según ya tengas) */
:root {
  --bg: #000;
  --fg: #fff;
  --card: #fff;
  --text: #000;
  --border: #333;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body { font-family: Arial, sans-serif; color: var(--fg); margin: 0; background: var(--bg); }

/* CONTENEDOR PRINCIPAL */
.contenedor { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }

/*------ESTILOS DEL BUSCADOR-------*/

    /* Contenedor filtros */
.filtros {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 25px auto;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(20, 20, 20, 0.85);
    border: 2px solid #ff3c00;
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.4), inset 0 0 10px rgba(255, 140, 0, 0.2);
    max-width: 500px;
}

/* Ícono buscador */
.icono_buscador {
    font-size: 1.2rem;
    color: #FFD700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.7);
    transition: all 0.3s ease;
}

/* Input */
.filtros input[type="text"] {
    flex: 1;
    padding: 12px 15px 12px 15px;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
    border: none;
    outline: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFD700;
    box-shadow: inset 0 0 6px rgba(255, 60, 0, 0.3);
    transition: all 0.3s ease;
}

.filtros input[type="text"]::placeholder {
    color: rgba(255, 215, 0, 0.5);
    font-style: italic;
}

/* Efectos hover y focus */
.filtros input[type="text"]:focus {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.9), inset 0 0 8px rgba(255, 140, 0, 0.5);
}
.filtros input[type="text"]:focus + .icono_buscador,
.filtros:hover .icono_buscador {
    color: #ff3c00;
    text-shadow: 0 0 10px rgba(255, 60, 0, 1);
    transform: scale(1.1);
}

/* ====== Versión modo claro ====== */
body:not(.dark-mode) .filtros {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

body:not(.dark-mode) .filtros input[type="text"] {
    background: #fff;
    color: #333;
    border: 2px solid #d4af37;
    box-shadow: inset 0 0 6px rgba(212, 175, 55, 0.3);
}

body:not(.dark-mode) .filtros input[type="text"]::placeholder {
    color: rgba(100, 100, 100, 0.7);
}

body:not(.dark-mode) .icono_buscador {
    color: #d4af37;
}


/*--------------------------------*/

/*------ESTILOS DEL TITULO PERSONAJES.....*/

    /* Contenedor general */
.contenedor_edicion_del_personaje {
    margin: 30px auto;
    text-align: center;
    padding: 12px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.85), rgba(30, 0, 0, 0.9));
    border: 2px solid #ff3c00;
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.6);
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

/* Línea decorativa brillante (arriba y abajo) */
.contenedor_edicion_del_personaje::before,
.contenedor_edicion_del_personaje::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff3c00, transparent);
    box-shadow: 0 0 10px #ff3c00;
}

.contenedor_edicion_del_personaje::before {
    top: 0;
}
.contenedor_edicion_del_personaje::after {
    bottom: 0;
}

/* Texto */
.edicion_del_personaje {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 15px rgba(255, 60, 0, 0.7);
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 4px 12px;
}

/* Hover con glow animado */
.contenedor_edicion_del_personaje:hover {
    box-shadow: 0 0 20px rgba(255, 60, 0, 1), inset 0 0 12px rgba(255, 0, 0, 0.6);
    transform: scale(1.02);
    transition: all 0.3s ease-in-out;
}

/* Versión modo claro */
body:not(.dark-mode) .contenedor_edicion_del_personaje {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 255, 255, 0.95));
    border: 2px solid #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

body:not(.dark-mode) .edicion_del_personaje {
    color: #222;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
}


/*--------------------------------------*/

/* CONTENEDOR DE CUADROS (GRID FLEX) */
.grid-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* espaciado entre cuadros */
  align-items: stretch;
  padding: 6px;
  width: 100%;
  /* Asegura que ocupe todo el ancho disponible */
  box-sizing: border-box;
}

/* Cuadro individual (título arriba, imagen abajo) */
.contenedor-cuadro {
  display: flex;
  flex-direction: column;
  width: 100%;            /* toma ancho de la celda asignada por el layout padre */
  min-height: 180px;
  background: #fff;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.contenedor-titulo {
  padding: 8px 6px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #000;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
.contenedor-titulo span {
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Imagen debajo */
.contenedor-img {
  width: 100%;
  height: 150px;
  background: #c8c8c8;
  display: flex;
}
.contenedor-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay desenfoque/click (opcional) */
.contenedor-desenfoque {
  position: absolute; z-index: 1; width: 100%; height: 100%; top: 0; left: 0;
}
.contenedor-desenfoque a .click { 
    display: none;
    background: green;
    width: 100%;
    position: absolute;
    left: 0%;
    top: 20%;
    transform: translate(0%, 0%);
    margin-top: 30px
}
.contenedor-cuadro:hover .contenedor-img {
    filter: blur(1.5px); 
}
.contenedor-desenfoque:hover .desenfoque, .contenedor-desenfoque:hover .click {
    display: block;
    
}

.contenedor-desenfoque a .click span {
   
    width: 100%;
    height: 100vh;
    color: #fff;
    position: absolute;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
   left: 0;
    top:0;
    }


/* MODAL (mantiene igual) */
.modal {
  display: none; position: fixed; z-index: 10000;
  left: 0; top: 0; width: 100%; height: 100%;
  overflow: auto; background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe; margin: 5% auto; padding: 20px;
  border: 1px solid #888; width: 80%; max-width: 800px;
}
body.dark-mode .modal-content {
    background-color: #000;
}
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; }
.close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; }
iframe { width: 100%; height: 500px; }

/* BREAKPOINTS: FLEXBOX (4/3/2/1) */

/* 4 por fila ≥ 1024px */
@media (min-width: 1024px) {
  .grid-flex > .contenedor-cuadro {
    flex: 0 0 calc((100% - 3 * 16px) / 4);
  }
    
    
}
/* 3 por fila entre 768px y 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-flex > .contenedor-cuadro {
    flex: 0 0 calc((100% - 2 * 16px) / 3);
  }
    
}
/* 2 por fila entre 460px y 767px */
@media (min-width: 461px) and (max-width: 767px) {
  .grid-flex > .contenedor-cuadro {
    flex: 0 0 calc((100% - 1 * 16px) / 2);  
  }
}
/* 1 por fila ≤ 460px */
@media (max-width: 460px) {
  .grid-flex > .contenedor-cuadro {
    flex: 0 0 100%;
  }
    
}


/*-----------ESTILOS DEL EDICION DEL PERSONAJE---------*/

/* Contenedor de sugerencia */
.contenedor_sugerencia {
    max-width: 700px;
    margin: 20px auto;
    padding: 12px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 60, 0, 0.1));
    border: 1.5px solid #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4), inset 0 0 6px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif;
}

/* Texto dentro */
.contenedor_sugerencia p {
    color: #FFD700;
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

/* Detalle decorativo tipo HUD */
.contenedor_sugerencia::before {
    content: "⚡";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #ff3c00;
    text-shadow: 0 0 8px rgba(255, 60, 0, 0.8);
}

/* Animación glow sutil */
@keyframes sugerenciaGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4), inset 0 0 6px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(255, 215, 0, 0.7), inset 0 0 10px rgba(255, 215, 0, 0.5);
    }
}

.contenedor_sugerencia {
    animation: sugerenciaGlow 3s infinite ease-in-out;
}

/* --- Modo claro --- */
body:not(.dark-mode) .contenedor_sugerencia {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

body:not(.dark-mode) .contenedor_sugerencia p {
    color: #444;
    text-shadow: none;
}

body:not(.dark-mode) .contenedor_sugerencia::before {
    color: #d4af37;
    text-shadow: none;
}

/*---------------------*/

/*ESTILOS DE LOS BOTONES 3D, TITULO Y SUBTITULO*/
.contenedor-boton_titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/*.contenedor-titulo {
    flex: 1 1 auto;
    min-width: 0;
}*/

.contenedor-boton button {  
    width: 100%;
    cursor: pointer;
    box-shadow: inset 1px -2px 5px 1px rgba(0,0,0,0.5);
    margin: 3px;
}
.contenedor-boton button img {
    width: 25px;
}

.contenedor-subtitulo {
    text-align: center;
}
/*----------------------*/


/* 4 por fila ≥ 1024px */
@media (min-width: 1024px) {
  .contenedor-cuadro {
    flex: 0 0 calc((100% - 3 * 16px) / 4);
  }
    .contenedor-titulo span {
    font-size: clamp(10px, 1.3vw, 17px);  
}
}

/* 3 por fila entre 768px y 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .contenedor-cuadro {
    flex: 0 0 calc((100% - 2 * 16px) / 3);
  }
    .contenedor-titulo span {
    font-size: clamp(10px, 1.7vw, 20px);
    
        
}
}

/* 2 por fila entre 461px y 767px */
@media (min-width: 461px) and (max-width: 767px) {
  .contenedor-cuadro {
    flex: 0 0 calc((100% - 16px) / 2);  
  }
    .contenedor-titulo span {
    font-size: clamp(10px, 2.3vw, 20px);
    white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        min-width: 0;
}
    
}

/* 1 por fila ≤ 460px */
@media (max-width: 460px) {
  .contenedor-cuadro {
    flex: 0 0 100%;
  }
}


/*-------------------------FIN---------------------------*/