body {
    background-color: #14181c;
    color: #9ab;
    font-family: 'Gelasio', serif;
    margin: 0;
    padding: 40px;
    text-align: center;
}
h1 { color: #fff; }

#catalogo {
    display: grid;
    grid-template-columns: repeat(3, 250px); /* Cajas un poco más grandes para que respiren */
    justify-content: center;
    gap: 40px; /* Separación real y limpia entre juegos */
    margin-top: 30px;
}

.tarjeta-juego {
    background-color: #1c2228;
    border-radius: 8px;
    padding: 15px;
    width: 100%; /* Ahora obedecen a la caja y no se salen */
    box-sizing: border-box; /* El truco mágico para que el relleno no las engorde */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.tarjeta-juego:hover { transform: translateY(-5px); }

.tarjeta-juego img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #2c3440;
}

.titulo {
    color: #fff;
    font-size: 1.1em;
    margin: 15px 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acciones {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

/* --- SISTEMA DE VALORACIÓN (VERSIÓN PRO) --- */
.seccion-valorar {
    margin-top: 30px;
    background-color: #242b33;
    padding: 20px 25px;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid #2c3440;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.seccion-valorar h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #9ab;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.estrellas-contenedor {
    font-size: 3.5em; 
    color: #44515f;
    cursor: pointer;
    display: inline-flex;
    gap: 2px;
}

.estrella {
    transition: transform 0.1s;
    display: inline-block;
}
.estrella:hover { transform: scale(1.1); }

.estrella.activa { color: #00e676; }

.estrella.media {
    background: linear-gradient(to right, #00e676 50%, #44515f 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

#texto-nota {
    margin: 15px 0 0 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    min-height: 1.2em;
}

/* --- BARRA DE NAVEGACIÓN (HEADER) --- */
.cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #111;
    border-bottom: 2px solid #2c3440;
    gap: 20px;
    flex-wrap: wrap;
}
.logo-nav {
    font-size: 1.8em !important; 
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    font-family: 'Gelasio', serif;
}

.navegacion { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center;}

.nav-link {
    color: #9ab;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    padding-bottom: 5px;
    transition: color 0.2s;
}

.nav-link:hover { color: #fff; }

.nav-link.activo {
    color: #00ce7a !important;
    font-weight: bold;
    border-bottom: 2px solid #00ce7a;
    padding-bottom: 5px;
    background-color: transparent;
    border-radius: 0;
}

/* --- FORMULARIO DE REGISTRO / LOGIN --- */
.contenedor-formulario {
    background-color: #1c2228;
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid #2c3440;
    text-align: center;
}

.contenedor-formulario h2 { color: #fff; margin-top: 0; margin-bottom: 20px; }
.grupo-input { margin-bottom: 20px; text-align: left; }
.grupo-input label { display: block; color: #9ab; margin-bottom: 5px; font-size: 0.9em; }

.grupo-input input {
    width: 100%;
    padding: 10px;
    background-color: #14181c;
    border: 1px solid #2c3440;
    color: #fff;
    border-radius: 5px;
    box-sizing: border-box;
}

.grupo-input input:focus { outline: none; border-color: #00e676; }

.btn-verde {
    background-color: #00e676;
    color: #14181c;
    border: none;
    padding: 12px 20px;
    width: 100%;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}
.btn-verde:hover { background-color: #00c766; }
.btn-verde:active { transform: scale(0.98); }

/* --- SECCIÓN DE COMENTARIOS --- */
.seccion-comentarios { margin-top: 40px; border-top: 1px solid #2c3440; padding-top: 30px; }
.seccion-comentarios h3 { color: #fff; margin-top: 0; margin-bottom: 20px; }

.comentario { background-color: #242b33; padding: 15px 20px; border-radius: 8px; margin-bottom: 15px; border-left: 4px solid #00e676; }
.comentario-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9em; color: #9ab; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.comentario-autor { font-weight: bold; color: #fff; }
.comentario-texto { margin: 0; line-height: 1.6; color: #e1e1e1; }

.caja-escribir-comentario { margin-top: 25px; background-color: #1c2228; padding: 20px; border-radius: 8px; border: 1px solid #2c3440; }
.caja-escribir-comentario textarea {
    width: 100%; padding: 15px; background-color: #14181c; border: 1px solid #2c3440;
    color: #fff; border-radius: 8px; box-sizing: border-box; font-family: inherit;
    font-size: 1em; resize: vertical; min-height: 80px;
}
.caja-escribir-comentario textarea:focus { outline: none; border-color: #00e676; }
.btn-comentar { background-color: #00e676; color: #14181c; border: none; padding: 10px 20px; font-size: 1em; font-weight: bold; border-radius: 5px; cursor: pointer; margin-top: 15px; transition: background-color 0.2s; }
.btn-comentar:hover { background-color: #00c766; }

/* --- BUSCADOR EN VIVO --- */
.contenedor-buscador { position: relative; flex: 1; max-width: 500px; min-width: 250px; margin: 0 auto; }
#input-buscador { width: 100%; padding: 10px 15px; background-color: #14181c; border: 1px solid #2c3440; color: #fff; border-radius: 20px; font-family: inherit; font-size: 1em; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
#input-buscador:focus { border-color: #00e676; }
#resultados-busqueda { position: absolute; top: 45px; left: 0; width: 100%; background-color: #242b33; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); z-index: 1000; overflow: hidden; display: none; }
.resultado-item { display: flex; align-items: center; padding: 10px; text-decoration: none; color: #fff; border-bottom: 1px solid #2c3440; transition: background-color 0.2s; }
.resultado-item:last-child { border-bottom: none; }
.resultado-item:hover { background-color: #1c2228; }
.resultado-item img { width: 35px; height: 45px; object-fit: cover; border-radius: 4px; margin-right: 15px; }

/* --- SISTEMA DE NOTIFICACIONES (TOASTS) --- */
#contenedor-toasts { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 9999; }
.toast {
    background-color: #242b33; color: #fff; padding: 20px 30px; border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 20px;
    font-size: 1.3em; border-left: 6px solid #00e676; animation: entrarToast 0.3s ease-out forwards;
}
.toast.error { border-left-color: #ff4040; }
@keyframes entrarToast { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes salirToast { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ==========================================
   ESTILOS PREMIUM PARA TIER LISTS
   ========================================== */
.tier-row { display: flex; align-items: stretch; margin-bottom: 5px; background: #1c2228; border-radius: 5px; overflow: hidden; min-height: 110px; }
.tier-label-container { width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #111; flex-shrink: 0; position: relative; padding: 10px; }
.tier-name { font-weight: bold; font-size: 2em; text-align: center; outline: none; word-break: break-word; cursor: text; }
.tier-controls { opacity: 1 !important; background: rgba(0, 0, 0, 0.7); padding: 8px 12px !important; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.5); display: flex; gap: 8px; margin-top: 10px; }
.tier-color-picker { width: 25px; height: 25px; padding: 0; border: none; border-radius: 50%; cursor: pointer; background: none; }
.btn-borrar-tier { background: rgba(0,0,0,0.3); border: none; color: white; cursor: pointer; border-radius: 4px; padding: 2px 5px; }
.btn-borrar-tier:hover { background: #ff4040; }
.btn-mover-tier { background: rgba(0,0,0,0.3); border: none; color: white; cursor: pointer; border-radius: 4px; padding: 2px 5px; font-size: 0.9em; transition: 0.2s; }
.btn-mover-tier:hover { background: #9ab; color: black; }
.tier-zone { flex-grow: 1; display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; min-height: 110px; transition: background 0.2s; }
.tier-zone.drag-over { background: rgba(255, 255, 255, 0.05); }
.item-arrastrable { width: 75px; height: 105px; border-radius: 4px; object-fit: cover; cursor: grab; box-shadow: 0 4px 8px rgba(0,0,0,0.5); }
.item-arrastrable:active { cursor: grabbing; }

.resultado-tier-item { display: flex; align-items: center; gap: 15px; padding: 10px; cursor: pointer; color: white; border-bottom: 1px solid #444; }
.resultado-tier-item:hover { background: #3d4654; }
.resultado-tier-item img { width: 40px; height: 55px; border-radius: 4px; object-fit: cover; }

/* Botones de Plantillas */
.btn-saga { background: #2c3440; color: #fff; border: 1px solid #444; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-weight: bold; transition: all 0.2s; }
.btn-saga:hover { background: #00e676; color: #111; border-color: #00e676; transform: translateY(-2px); }
.btn-crear-vacia { background: #00e676; color: #111; font-weight: bold; padding: 15px 30px; border-radius: 8px; border: none; cursor: pointer; font-size: 1.2em; width: 100%; margin-bottom: 10px; transition: transform 0.2s, background 0.2s; }
.btn-crear-vacia:hover { background: #00c853; transform: translateY(-2px); }

.grid-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tarjeta-plantilla { background: #1c2228; border: 2px solid #2c3440; border-radius: 10px; padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; position: relative; overflow: hidden; }
.tarjeta-plantilla:hover { border-color: #00e676; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0, 230, 118, 0.15); }
.portada-plantilla { width: 60px; height: 85px; border-radius: 5px; object-fit: cover; margin-bottom: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.6); position: relative; z-index: 2; }
.titulo-plantilla { color: #fff; font-weight: bold; font-size: 1.1em; position: relative; z-index: 2; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.datos-plantilla { color: #00e676; font-size: 0.8em; margin-top: 8px; position: relative; z-index: 2; background: rgba(0,0,0,0.6); padding: 3px 8px; border-radius: 10px; }
.icono-plantilla { font-size: 2.5em; margin-bottom: 10px; }
.btn-borrar-tarjeta { margin-top: 15px; background: #ff4040; color: white; border: none; padding: 5px 15px; border-radius: 4px; cursor: pointer; font-size: 0.9em; position: relative; z-index: 2; }
.btn-borrar-tarjeta:hover { background: #cc0000; }

/* ==========================================
   BOTONES DE ACCIÓN (EFECTO POP Y RESPLANDOR)
   ========================================== */
.btn-accion {
    background: transparent !important;
    border: none !important;
    font-size: 1.8em !important; 
    padding: 5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: grayscale(100%);
    opacity: 0.5;
}
.btn-accion:hover {
    opacity: 1;
    transform: scale(1.3);
}
.btn-accion:active {
    transform: scale(0.9);
}
.activo-corazon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(255, 64, 64, 0.8);
}
.activo-reloj {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(0, 230, 118, 0.8);
}

/* ==========================================
   FILTROS ATRACTIVOS DEL CATÁLOGO (PÍLDORAS)
   ========================================== */
.controles-catalogo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.filtros-pildoras { display: flex; gap: 5px; flex-wrap: wrap; background: #1c2228; padding: 6px; border-radius: 30px; border: 1px solid #2c3440; }
.btn-filtro { background: transparent; border: none; color: #9ab; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; transition: all 0.3s ease; font-size: 0.95em; }
.btn-filtro:hover { color: #fff; background: rgba(255,255,255,0.05); }
.btn-filtro.activo { background: #00e676; color: #111; box-shadow: 0 2px 10px rgba(0, 230, 118, 0.3); }

/* ==========================================
   PAGINACIÓN NUMERADA (ESTILO PROFESIONAL)
   ========================================== */
.contenedor-paginacion { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.btn-pag { background: #1c2228; border: 1px solid #2c3440; color: #9ab; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: all 0.2s ease; font-size: 0.95em; }
.btn-pag:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); color: #fff; border-color: #9ab; }
.btn-pag.activa { background: #00e676; color: #111; border-color: #00e676; cursor: default; }
.btn-pag:disabled { opacity: 0.3; cursor: not-allowed; }

/* ==========================================
   ESTILOS DE LA NUEVA PORTADA (index.html)
   ========================================== */
.seccion-portada { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.titulo-seccion { color: white; font-size: 1.8em; border-bottom: 2px solid #00ce7a; padding-bottom: 10px; margin-bottom: 20px; display: inline-block; }

/* Funciones Gamingbox */
.grid-funciones { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* 3 columnas de igual tamaño */
    gap: 20px; 
    margin-bottom: 50px; 
}
.grid-noticias { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* 3 columnas de igual tamaño */
    gap: 20px; 
    margin-bottom: 50px; 
}.tarjeta-funcion { background: linear-gradient(135deg, #1c2228 0%, #111 100%); padding: 25px; border-radius: 10px; text-align: center; text-decoration: none; color: white; border: 1px solid #2c3440; transition: transform 0.2s, border-color 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.tarjeta-funcion:hover { transform: translateY(-5px); border-color: #00ce7a; }
.tarjeta-funcion h3 { margin: 0 0 10px 0; font-size: 1.4em; color: #00ce7a; }
.tarjeta-funcion p { margin: 0; color: #9ab; font-size: 0.95em; }

/* Noticias */
.tarjeta-noticia { background: #1c2228; border-radius: 10px; overflow: hidden; border: 1px solid #2c3440; transition: 0.2s; cursor: pointer; }
.tarjeta-noticia:hover { border-color: #f5c518; }
.tarjeta-noticia img { width: 100%; height: 180px; object-fit: cover; }
.info-noticia { padding: 15px; }
.info-noticia h4 { margin: 0 0 10px 0; color: white; font-size: 1.2em; }
.info-noticia p { margin: 0; color: #9ab; font-size: 0.9em; line-height: 1.5; }
.fecha-noticia { color: #f5c518; font-size: 0.8em; font-weight: bold; margin-bottom: 5px; display: block; }

/* ==========================================
   CARRUSEL (Ajuste Final y Transición Fade)
   ========================================== */
.carrusel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #111;
    margin-bottom: 40px;
}

#carrusel-destacados { 
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.slide-destacado { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px; 
    display: flex; 
    align-items: flex-end; 
    text-decoration: none; 
    color: white; 
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.02);
    pointer-events: none;
}

.slide-destacado.activa {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
    pointer-events: auto;
}

.slide-destacado img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: 1;
    display: block;
}

.slide-degradado { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 70%; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); 
    z-index: 2; 
}

.slide-info { 
    position: relative; 
    z-index: 3; 
    padding: 30px; 
    width: 100%;
}

.slide-info h2 { margin: 0 0 10px 0; font-size: 2.5em; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.slide-info p { 
    margin: 0; 
    font-size: 1.1em; 
    color: #ccc; 
    max-width: 800px; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carrusel-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(28, 34, 40, 0.9);
    color: white;
    border: 1px solid #444;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.carrusel-flecha:hover { background: #ffffff; border-color: #ffffff; color: black; }
#btn-carrusel-izq { left: 15px; }
#btn-carrusel-der { right: 15px; }

/* ESTILOS PARA LOS DESPLEGABLES DE GÉNERO Y PLATAFORMA */
.select-filtro {
    background-color: #1c2228;
    color: #9ab;
    border: 1px solid #2c3440;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.select-filtro:hover, .select-filtro:focus {
    border-color: #00e676;
    color: #fff;
}

.select-filtro option {
    background-color: #14181c;
    color: #fff;
}

/* ==========================================
   BANDERAS DE IDIOMA
   ========================================== */
.bandera-idioma {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.bandera-idioma:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.bandera-idioma.activa {
    opacity: 1; 
    border-color: #00ce7a; 
    transform: scale(1.1);
}

/* ==========================================
   PERFIL Y MURO DE LA FAMA
   ========================================== */
.top3-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-end; /* Alinea las carátulas por la base */
    gap: 20px !important;
    margin-bottom: 40px !important;
    flex-wrap: nowrap !important; /* Prohíbe terminantemente que salten a otra línea */
}

/* ==========================================
   📱 DISEÑO ADAPTABLE (MÓVILES Y TABLETS) 📱
   ========================================== */

/* 1. TABLETS Y PANTALLAS MEDIANAS (Hasta 900px) */
@media (max-width: 900px) {
    /* Ficha del juego: Pasamos la imagen arriba y la info abajo */
    .contenedor-juego {
        flex-direction: column !important;
        align-items: center;
        padding: 20px !important;
    }
    .portada-grande {
        width: 100% !important;
        max-width: 300px;
        margin-bottom: 20px;
    }
    .info-juego {
        width: 100% !important;
        min-width: 100% !important;
    }
    /* Catálogo: Reducimos el tamaño mínimo de las tarjetas */
    .grid-juegos {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }
    
    .seccion-valorar { 
        min-width: 0 !important; 
        width: 100% !important; 
        box-sizing: border-box; 
        text-align: center !important;
    }
    .seccion-valorar h3 { text-align: left !important; }
    .estrellas-contenedor { 
        font-size: 3.5em !important; 
        gap: 12px !important; 
        display: inline-flex !important; 
        justify-content: center !important; 
        width: 100% !important;
    }
}

/* 2. MÓVILES Y PANTALLAS PEQUEÑAS (Hasta 768px) */
@media (max-width: 768px) {
    /* Cabecera y Navegación */
    body { padding: 10px 5px; } 

    .cabecera {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    .contenedor-buscador {
        width: 100%;
        margin-left: 0 !important;
    }
    /* Busca .navegacion dentro del media query y déjalo así */
    .navegacion {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px !important;
    }
    #zona-usuario {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    /* Catálogo y Filtros */
    .filtros-catalogo {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }
    .grid-juegos {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 15px !important;
    }

    /* Perfil del Usuario */
    .muro-fama {
        flex-direction: column;
    }
    .top3-container { 
        gap: 8px !important; 
    }
    .top3-container > div {
        flex: 1 1 0; 
        max-width: 32%;
        height: 140px !important; /* Reducimos la altura para mantener la proporción de la carátula */
        border-radius: 6px !important;
    }
    /* Reducimos el tamaño y reubicamos la estrella dorada */
    .top3-slot h2 {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.85em !important;
        top: -8px !important;
        left: -8px !important;
        border-width: 1px !important;
    }
    /* Hacemos la palabra "Seleccionar" más pequeña para que quepa */
    .top3-slot span {
        font-size: 0.65em !important;
    }
    /* Forzamos a la imagen a rellenar su nueva caja */
    .top3-container > div img {
        width: 100%;
        height: 100% !important; 
        object-fit: cover;
    }
    .grid-perfil {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    }
    main > div[style*="align-items: center; gap: 20px; margin-bottom: 30px;"] {
        flex-direction: column;
        text-align: center;
    }

    /* Editor de Tier Lists */
    #contenedor-tiers {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .tier-row {
        min-width: 600px; 
    }
    div[style*="display: flex; gap: 15px; margin-bottom: 30px;"] {
        flex-direction: column;
    }
    #papelera-zone {
        width: 100% !important;
        height: 80px;
        flex-direction: row !important;
        gap: 15px;
    }
    #papelera-zone span {
        margin: 0 !important;
    }

    /* Reseñas y Comunidad */
    .resena-comunidad, .comentario {
        flex-direction: column;
    }
    .resena-comunidad img {
        width: 100% !important;
        height: 200px !important;
        margin-bottom: 15px;
    }

    /* Ficha de Juego en Móvil */
    .contenedor-juego {
        padding: 12px !important;
        gap: 12px !important;
        margin: 10px auto !important;
    }
    .info-juego h1 {
        font-size: 1.5em !important; 
        line-height: 1.2;
    }
    .seccion-valorar { 
        padding: 12px !important; 
        margin-bottom: 15px !important; 
        min-width: 0 !important; 
        width: 100% !important; 
        box-sizing: border-box;
        display: block !important;
        text-align: center !important;
    }
    .seccion-valorar h3 { font-size: 0.95em !important; margin-bottom: 8px !important; text-align: left !important; }
    .estrellas-contenedor { 
        font-size: 2.8em !important; 
        gap: 6px !important; 
        display: inline-flex !important; 
        justify-content: center !important; 
        width: 100% !important;
    }
    .acciones { gap: 15px !important; margin-bottom: 15px !important; }
    #catalogo {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    }
    /* Ajuste estricto de 3 columnas en una línea para noticias */
    .grid-noticias {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Cambiamos a 2 columnas */
        gap: 12px !important; /* Damos un poco más de aire entre ellas */
        overflow: hidden !important;
    }
    
    /* Y le devolvemos a la letra un tamaño normal */
    .tarjeta-noticia h3 {
        font-size: 0.85em !important; 
        line-height: 1.2;
        margin-top: 5px;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tarjeta-noticia {
        min-width: 0 !important; /* Permite que la tarjeta se encoja al máximo */
        padding: 6px !important;
    }

    .tarjeta-noticia img {
        height: 70px !important; /* Reducimos la altura de la carátula */
        width: 100%;
        object-fit: cover;
    }

    .tarjeta-noticia h3 {
        font-size: 0.55em !important; /* Texto MUY reducido */
        line-height: 1.1; /* Juntamos más las líneas de texto */
        margin-top: 4px;
        margin-bottom: 0;
        /* Al ser la letra más pequeña, dejamos que ocupe hasta 4 líneas antes de cortarse */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tarjeta-noticia p {
        display: none !important; /* Fuera descripción */
    }

    .grid-funciones {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .tarjeta-funcion {
        padding: 15px 5px !important;
    }

    .tarjeta-funcion h3 {
        font-size: 0.85em !important;
    }

    .tarjeta-funcion p {
        display: none; /* Ocultamos el texto descriptivo en móvil para que quepan en una línea */
    }
}