main {
    padding-top: 0;
    margin-top: 0;
    gap: 0;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h3 {
    margin-bottom: 0.5rem;
}

.encabezado-juego {
    background-color: #ebe9ff;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--bordes);
    position: relative;
}

.encabezado-juego::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 32, 0.18);
}

.cabecera-juego {
    display: flex;
    align-items: end;
    gap: 1rem;
    min-height: 13rem;
    padding: 1rem;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.portada-juego {
    width: 6.5rem;
    position: relative;
    margin-bottom: -3rem;
    border: 2px solid rgba(44, 136, 217, 0.55);
    background: #dfe6ed;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.favorito-juego {
    position: absolute;
    right: -0.55rem;
    top: -0.55rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #d65a7c;
    border: 1px solid #f2c8d3;
}

.favorito-form {
    margin: 0;
}

button.favorito-juego {
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

button.favorito-juego.cargando {
    pointer-events: none;
}

button.favorito-juego.pulso {
    transform: scale(1.14);
}

.favorito-juego.active {
    background: #d65a7c;
    color: white;
}

.datos-principales {
    padding-bottom: 0.75rem;
    flex: 1;
}

.datos-principales h1 {
    margin-bottom: 0.35rem;
    font-size: 2.1rem;
    line-height: 1;
    color: white;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.8);
}

.subtitulo {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.content-grid {
    padding: 3.75rem 0.8rem 0 0.8rem;
    display: flex;
    flex-direction: column;
}

aside.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: start;
    order: 3;
}

.estados-juego {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.5rem;
    text-align: center;
}

.estado-form {
    margin: 0;
}

.estado {
    min-width: 0;
    color: #4b5c6b;
    padding: 0.45rem 0.25rem 0.55rem 0.25rem;
    border-bottom: 4px solid transparent;
}

.estado-boton {
    width: 100%;
    background: none;
    border-top: none;
    border-right: none;
    border-left: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.estado i {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.estado span {
    display: block;
    font-size: 0.72rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.estado.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.estado-boton:hover,
.estado-boton:focus-visible {
    color: var(--primary);
    outline: none;
}

.estado-boton.cargando {
    pointer-events: none;
}

.estado-boton.pulso {
    transform: scale(1.03);
}

.puntuaciones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tu-puntuacion,
.media-juego,
.listas-juego,
.informacion-juego,
.sin-resenas,
.juego-vacio {
    border: 1px solid rgba(195, 207, 217, 0.59);
    background: white;
    padding: 1rem;
}

.tu-puntuacion,
.media-juego {
    display: grid;
    justify-items: center;
    text-align: center;
}

.numero-puntuacion {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin: 0.35rem 0 0.6rem 0;
}

.estrellas {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    color: var(--puntuacion);
}

.estrellas .vacia {
    color: white;
    -webkit-text-stroke: 1px var(--bordes);
    text-stroke: 1px var(--bordes);
}

.form-puntuacion-juego {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.selector-puntuacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    width: 100%;
}

.estrella-puntuacion {
    cursor: pointer;
    font-size: 1.65rem;
    color: #cfd6dd;
    line-height: 1;
    transition: color 0.18s ease, transform 0.18s ease;
}

.estrella-puntuacion:hover,
.estrella-puntuacion:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.estrella-puntuacion.activa {
    color: var(--puntuacion);
}

.fila-puntuacion {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.texto-puntuacion {
    margin-bottom: 0;
    font-weight: 600;
    color: #4b5c6b;
}

.limpiar-puntuacion {
    border: none;
    background: none;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

.nota-usuario{
    margin-bottom: 0.5rem;
}

.nota-usuario,
.total-resenas {
    color: #6f7d8c;
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.mensaje-puntuacion-juego {
    margin: 0;
    color: #6f7d8c;
    font-size: 0.85rem;
    font-weight: 600;
}

.mensaje-puntuacion-juego.ok {
    color: #237a3d;
}

.mensaje-puntuacion-juego.error {
    color: #c23b32;
}

.cta-biblioteca {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.cta-biblioteca.secundaria {
    background: #f7f9fa;
    color: #4b5c6b;
    border: 2px solid var(--bordes);
}

.listas-juego h2 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bordes);
}

.listas-juego p {
    color: #6f7d8c;
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

.listas-juego form {
    display: grid;
    gap: 0.55rem;
}

.listas-juego label {
    font-weight: 600;
    font-size: 0.95rem;
}

.listas-juego select {
    width: 100%;
    border: 2px solid var(--bordes);
    border-radius: 6px;
    padding: 0.65rem;
    font-family: inherit;
    background: white;
}

.listas-juego select:focus {
    outline: none;
    border-color: var(--primary);
}

.listas-juego button {
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-family: inherit;
    font-weight: 600;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.listas-juego > a:not(.cta-biblioteca) {
    display: inline-flex;
    margin-top: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.mensaje-juego {
    margin: 0 0 1rem 0;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    order: 0;
}

.mensaje-juego.exito {
    background: #e8f5e9;
    color: #2e7d32;
}

.mensaje-juego.aviso {
    background: #fff6db;
    color: #9d6c00;
}

.media-juego h3,
.tu-puntuacion h2 {
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bordes);
}

.grafica {
    font-size: 0.75rem;
    width: 12rem;
    height: 8rem;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr auto;
    align-content: end;
    text-align: center;
    margin: 0.75rem auto 0 auto;
}

.grafica .barra {
    background-color: #fdf3d3;
    border: 2px solid var(--puntuacion);
    margin-right: -1px;
    margin-left: -1px;
    align-self: end;
    height: 0;
}

.grafica .fa-star {
    color: var(--puntuacion);
}

.separador {
    border: none;
    border-top: 2px solid var(--bordes);
    outline: none;
    width: 10rem;
    margin: 1rem auto;
    order: 2;
}

section.principal {
    display: contents;
}

.informacion-juego {
    order: 1;
}

.resenas-juego {
    order: 4;
}

.metadatos-juego {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lanzamiento {
    width: fit-content;
    border: 2px solid var(--bordes);
    background: #f7f9fa;
    padding: 0.75rem 1rem;
}

.lanzamiento span,
.datos-juego strong {
    display: block;
}

.lanzamiento span {
    font-size: 0.95rem;
    color: #4b5c6b;
    margin-bottom: 0.3rem;
}

.datos-juego {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.datos-juego p {
    line-height: 1.45;
}

.datos-juego strong {
    margin-bottom: 0.15rem;
}

.descripcion-juego {
    font-style: italic;
    line-height: 1.6;
    color: #4b5c6b;
}

.cabecera-resenas-juego {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.resenas-juego h2 {
    margin: 0;
}

.cta-resena-inline {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--bordes);
    border-radius: 999px;
    background: #f7f9fa;
    color: #4b5c6b;
    font-size: 0.88rem;
    font-weight: 600;
}

.resenas-juego .carousel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    overflow: visible;
    scrollbar-width: none;
}

.resenas-juego .mini-portada {
    width: 4.8rem;
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    aspect-ratio: 1 / 1;
    border: 2px solid rgba(132, 51, 208, 0.8);
    border-radius: 999px;
    background: #ead8ff;
}

.resenas-juego .mini-portada img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 999px;
}

.resenas-juego .elemento-carousel {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 0.75rem 1rem;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid var(--bordes);
}

.resenas-juego .elemento-carousel:first-child {
    padding-top: 0;
}

.resenas-juego .elemento-carousel:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.resenas-juego .nombre-puntuacion,
.resenas-juego .username {
    display: none;
}

.resenas-juego .puntuacion-tablet {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.resenas-juego .titulo-puntuacion-wrapper {
    flex: 1;
    display: grid;
    gap: 0.3rem;
}

.resenas-juego .meta-resena-linea {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.resenas-juego .autor-resena {
    color: #6f7d8c;
    font-size: 0.95rem;
    margin: 0;
}

.resenas-juego .titulo-plataforma {
    font-size: 1.05rem;
    line-height: 1.35;
}

.resenas-juego .fecha {
    flex: 0 0 auto;
    color: #999;
    margin-top: 0;
    text-align: right;
    white-space: nowrap;
}

.resenas-juego .texto {
    grid-column: 2;
    grid-row: 2;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.resenas-juego .texto-recortado {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resenas-juego .resena-expandida .texto-recortado {
    display: block;
    overflow: visible;
}

.boton-leer-resena {
    grid-column: 2;
    grid-row: 3;
    width: fit-content;
    border: none;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.boton-leer-resena:hover,
.boton-leer-resena:focus-visible {
    color: #5d22a2;
    outline: none;
    text-decoration: underline;
}

.paginacion-resenas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.paginacion-resenas a {
    min-width: 2.6rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--bordes);
    border-radius: 999px;
    background: white;
    text-align: center;
    font-weight: 600;
}

.paginacion-resenas a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.paginacion-resenas .separador {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    color: #4b5c6b;
    font-weight: 600;
}

.form-eliminar-resena-admin,
.boton-reportar-resena {
    grid-column: 2;
    grid-row: 3;
    width: fit-content;
}

.resena-con-leer .form-eliminar-resena-admin,
.resena-con-leer > .boton-reportar-resena {
    grid-row: 4;
}

.form-eliminar-resena-admin button,
.boton-reportar-resena {
    border: none;
    background: transparent;
    color: #6f7d8c;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.boton-eliminar-resena-admin {
    color: #c84a4a;
}

.form-eliminar-resena-admin button:hover,
.form-eliminar-resena-admin button:focus-visible,
.boton-reportar-resena:hover,
.boton-reportar-resena:focus-visible {
    color: #c84a4a;
    outline: none;
}

.boton-reportar-resena:disabled {
    color: #8fa0ad;
    cursor: default;
}

.modal-reporte[hidden] {
    display: none;
}

.modal-reporte {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-reporte-fondo {
    position: absolute;
    inset: 0;
    background: rgba(20, 31, 42, 0.55);
}

.modal-reporte-panel {
    position: relative;
    width: min(100%, 28rem);
    border: 1px solid var(--bordes);
    background: white;
    padding: 1.2rem;
}

.modal-reporte-panel form {
    display: grid;
    gap: 0.75rem;
}

.modal-reporte-panel h2 {
    margin-bottom: 0;
    font-size: 1.45rem;
}

.texto-modal-reporte {
    color: #5e6d7a;
    font-size: 0.95rem;
}

.modal-reporte-panel label {
    font-weight: 600;
}

.modal-reporte-panel textarea {
    min-height: 7rem;
    resize: vertical;
    border: 2px solid var(--bordes);
    border-radius: 6px;
    padding: 0.7rem;
    font-family: inherit;
    font-size: 1rem;
}

.modal-reporte-panel textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.mensaje-reporte {
    min-height: 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.mensaje-reporte.ok {
    color: #2e7d32;
}

.mensaje-reporte.error {
    color: #c84a4a;
}

.acciones-reporte {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.acciones-reporte button {
    border-radius: 6px;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.boton-cancelar-reporte {
    border: 1px solid var(--bordes);
    background: white;
    color: #4b5c6b;
}

.boton-enviar-reporte {
    border: none;
    background: var(--primary);
    color: white;
}

.boton-enviar-reporte:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sin-resenas,
.juego-vacio {
    text-align: center;
}

@media (min-width: 768px) {
    .cabecera-juego {
        min-height: 19rem;
        padding: 1.5rem 2rem;
        gap: 1.5rem;
    }

    .portada-juego {
        width: 10rem;
        margin-bottom: -4rem;
    }

    .datos-principales h1 {
        font-size: 3.2rem;
    }

    .subtitulo {
        font-size: 1.15rem;
    }

    .content-grid {
        padding: 5rem 2rem 0 2rem;
    }

    .separador {
        width: 100%;
    }

    .metadatos-juego {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    aside.sidebar {
        order: 0;
        width: min(100%, 42rem);
        align-self: center;
    }

    .separador {
        order: 0;
    }

    section.principal {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        order: 0;
    }

    .informacion-juego,
    .resenas-juego {
        order: 0;
    }

    .datos-juego {
        flex: 1;
    }

    .resenas-juego .carousel {
        gap: 1.5rem;
    }

    .resenas-juego .elemento-carousel {
        grid-template-columns: 7rem minmax(0, 1fr);
        gap: 0.75rem 1.5rem;
        padding: 1.5rem 0;
    }

    .resenas-juego .mini-portada {
        width: 7rem;
    }

    .resenas-juego .titulo-puntuacion-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .resenas-juego .titulo-plataforma {
        grid-column: 1;
    }

    .resenas-juego .titulo-plataforma {
        font-size: 1.1rem;
    }

    .resenas-juego .meta-resena-linea {
        grid-column: 1;
    }

    .resenas-juego .titulo-puntuacion-wrapper .estrellas {
        grid-column: 1;
    }

    .resenas-juego .fecha {
        align-self: start;
    }

    .resenas-juego .texto {
        font-size: 1.05rem;
    }

}

@media (min-width: 992px) {
    .cabecera-juego {
        min-height: 24rem;
        padding: 2rem;
        gap: 2rem;
    }

    .portada-juego {
        width: 15rem;
        margin-bottom: -5rem;
    }

    .favorito-juego {
        top: 1rem;
        right: -1.2rem;
    }

    .content-grid {
        display: grid;
        grid-template-columns: 20rem 1fr;
        padding: 5.5rem 0 0 0;
    }

    .mensaje-juego {
        grid-column: 1 / -1;
    }

    .separador {
        display: none;
    }

    aside.sidebar {
        padding: 1rem 1rem;
        border: 1px solid rgba(195, 207, 217, 0.59);
        width: auto;
        align-self: start;
    }

    .estado {
        padding: 0.75rem 0.15rem 0.6rem 0.15rem;
    }

    .estados-juego {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }

    .estado i {
        font-size: 1.1rem;
    }

    .estado span {
        font-size: 0.68rem;
    }

    .numero-puntuacion {
        font-size: 2.4rem;
    }

    .grafica {
        justify-self: center;
    }

    section.principal {
        padding: 0 2rem 1rem 2rem;
        grid-column: 2;
    }

    .descripcion-juego {
        font-size: 0.9rem;
    }

    .resenas-juego .carousel {
        gap: 1.5rem;
    }

    .resenas-juego .elemento-carousel {
        grid-template-columns: 7rem 1fr;
    }

    .form-eliminar-resena-admin,
    .boton-reportar-resena {
        opacity: 0;
        transition: opacity 0.2s ease, color 0.2s ease;
    }

    .resenas-juego .elemento-carousel:hover .form-eliminar-resena-admin,
    .resenas-juego .elemento-carousel:focus-within .form-eliminar-resena-admin,
    .resenas-juego .elemento-carousel:hover .boton-reportar-resena,
    .resenas-juego .elemento-carousel:focus-within .boton-reportar-resena {
        opacity: 1;
    }

    .resenas-juego .elemento-carousel:last-child {
        border-bottom: none;
    }
}
