/* 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; }

/* BARRA DE FILTROS (si ya la tienes, conserva) */
/* ========================
   BUSCADOR ESTILO PUBG - OTROS
======================== */
.filtros {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
    padding: 6px 12px;
    border: 2px solid #d71920;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px rgba(215,25,32,0.6), inset 0 0 6px rgba(0,0,0,0.5);
    transition: 0.3s;
}

body.dark-mode .filtros {
    border: 2px solid #d71920;
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 14px rgba(215,25,32,0.7), inset 0 0 8px rgba(0,0,0,0.6);
}

.filtros:hover {
    box-shadow: 0 0 16px #d71920, inset 0 0 8px rgba(0,0,0,0.6);
}

.icono_buscador {
    color: #d71920;
    font-size: 18px;
}

body.dark-mode .icono_buscador {
    color: #ff3d3d;
}

.filtros input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: none;
    outline: none;
    border-radius: 4px;
    font-size: 14px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: 0.3s;
}

body.dark-mode .filtros input[type="text"] {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.filtros input[type="text"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.filtros input[type="text"]:focus {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 8px #d71920;
}

body.dark-mode .filtros input[type="text"]:focus {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 10px #ff3d3d;
}


/*----------------------*/

/*----------TITULO----------*/
/* ========================
   CONTENEDOR EDICIÓN DEL PERSONAJE - PUBG ANIMADO
======================== */
.contenedor_edicion_del_personaje {
    width: 100%; /* ocupa todo el ancho */
    max-width: 100%;
    margin: 20px 0;
    padding: 14px 16px;
    border: 2px solid #d71920;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(215,25,32,0.2), rgba(0,0,0,0.1));
    box-shadow: 0 0 12px rgba(215,25,32,0.6), inset 0 0 6px rgba(0,0,0,0.5);
    text-align: center;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Glow animado */
.contenedor_edicion_del_personaje::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #ff005f, #ff7300, #ffd400, #3cff66, #00e5ff, #4b6cff, #ff4bda);
    opacity: 0.3;
    transform: rotate(0deg);
    animation: glowRotate 5s linear infinite;
    z-index: 0;
}

@keyframes glowRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenido sobre el glow */
.edicion_del_personaje {
    position: relative; /* sobre el pseudo-elemento */
    font-family: 'Fjalla One', sans-serif;
    font-size: 18px;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(0,0,0,0.7), 0 0 8px #d71920;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

/* Hover efecto extra */
.contenedor_edicion_del_personaje:hover {
    box-shadow: 0 0 20px #d71920, inset 0 0 10px rgba(0,0,0,0.6);
    transform: scale(1.02);
}

body.dark-mode .contenedor_edicion_del_personaje {
    background: linear-gradient(145deg, rgba(215,25,32,0.4), rgba(0,0,0,0.5));
    border-color: #ff3d3d;
    box-shadow: 0 0 14px rgba(215,25,32,0.8), inset 0 0 8px rgba(0,0,0,0.6);
}

body.dark-mode .edicion_del_personaje {
    text-shadow: 0 0 8px rgba(0,0,0,0.8), 0 0 10px #ff3d3d;
}


/*-----------------------------*/

/* 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-boton-titulo {
    display: flex;
    border-bottom: 1px solid #C8C8C8;
    
}

.contenedor-boton button {
    /*background: #DC0101;*/
    cursor: pointer;
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
    color: #f8f9fa;
    border-color: #f8f9fa;
    box-shadow: inset 1px -2px 5px 1px rgba(0,0,0,0.5);
    
}

.contenedor-titulo {
  margin: auto;
  font-weight: bold;
  color: #000;
  background: #fff;
}
.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: 80%; top: 40; left: 0;
    background: rgba(0,0,0,0.5);
    display: none;
}
.contenedor-cuadro:hover .contenedor-desenfoque {
    display: block;
}

.contenedor-cuadro .contenedor-desenfoque:hover  textarea {
    display: block;
    
}

.contenedor-desenfoque .click textarea {
    display: none;
    background: none;   
    color: white;
    width: 100%;
    margin: 5px;
    border: none;
    font-size: 13px;
    }


/* MODAL (mantiene igual) */
.modal {
  display: none; position: fixed; z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  overflow: auto; background-color: rgba(0,0,0,0.4); z-index: 10000;
}
.modal-content {
  background-color: #fefefe; margin: 5% auto; padding: 20px;
  border: 1px solid #888; width: 80%; max-width: 800px;
}
.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 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---------------------------*/