main {
    display: flex;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
    gap: 0;
}

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

h3 {
    margin-bottom: 0.5rem;
}

.encabezado-perfil {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.encabezado-perfil .container {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 10rem;
    padding: 1rem;
}

.foto-perfil {
    width: 6rem;
}

.foto-perfil img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.85);
}

.datos-encabezado-perfil {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.encabezado-perfil .nombre {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: whitesmoke;
}

.nick-perfil {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

.boton-editar-perfil {
    width: fit-content;
    margin-top: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: white;
    background: rgba(22, 38, 56, 0.25);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.profile-tabs {
    background: #e1e5ec;
    color: #4b5c6b;
}

.profile-tabs ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
    padding: 0.25rem 0.5rem;
}

.profile-tabs li {
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(50% - 0.35rem);
}

.profile-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    white-space: nowrap;
}

.profile-tabs i {
    margin-right: 0.3rem;
}

.profile-tabs li.active {
    color: var(--primary);
    border-bottom: 4px solid var(--primary);
}

.editar {
    display: none;
}

.profile-tabs .editar {
    display: none;
}

.profile-tabs .tab-editar {
    display: none;
}

.content-grid {
    padding: 0.25rem 1rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.exito-perfil {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

aside.sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.bio h2 {
    margin-bottom: 0.1rem;
}

.bio {
    grid-column: 1/-1;
    margin: 0;
    border: 1px solid var(--bordes);
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
}

.bio p {
    font-size: 0.9rem;
}

.stats .datos {
    font-style: italic;
    font-weight: bold;
    font-size: 1.75rem;
}

.puntuaciones {
    grid-column: 1/-1;
    width: 100%;
    justify-self: stretch;
}

.panel-puntuaciones-perfil {
    border: 1px solid rgba(195, 207, 217, 0.59);
    background: white;
    padding: 1rem;
    display: grid;
    justify-items: center;
    text-align: center;
    width: 100%;
}

.panel-puntuaciones-perfil h3 {
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bordes);
}

.stats {
    display: contents;
}

.stats .jugados,
.stats .este-ano {
    border: 1px solid var(--bordes);
    padding: 0.85rem 0.5rem;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats h3 {
    margin-bottom: 0;
}

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

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

.puntuaciones-vacias {
    color: #6f7d8c;
    font-size: 0.9rem;
    padding-top: 0.75rem;
}

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

.grafica .barra1 {
    height: 30%;
}

.grafica .barra2 {
    height: 15%;
}

.grafica .barra3 {
    height: 40%;
}

.grafica .barra4 {
    height: 90%;
}

.grafica .barra5 {
    height: 80%;
}

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

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

.favoritos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
}

.favoritos h2 {
    width: 100%;
}

.favoritos .carousel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
}

.favorito {
    width: clamp(7rem, 30vw, 9rem);
    flex-shrink: 0;
    scroll-snap-align: start;
}

.favorito p {
    display: none;
}

section.principal .panel-vacio,
section.principal .panel-vacio-listas {
    border: none;
    background: transparent;
    padding: 1rem 0 1.75rem;
}

section.principal .panel-vacio h2,
section.principal .panel-vacio-listas h2 {
    margin-bottom: 0.75rem;
}

section.principal .panel-vacio p,
section.principal .panel-vacio-listas p {
    margin-bottom: 0;
}

.grid-biblioteca .panel-vacio {
    padding-top: 1.5rem;
}

.cabecera-editar-perfil {
    padding: 0.75rem;
}

.cabecera-editar-perfil .texto-cabecera {
    max-width: 34rem;
}

.bloque-biblioteca.bloque-editar-perfil {
    align-items: start;
    grid-template-columns: 1fr;
    max-width: 48rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.bloque-editar-perfil .formulario-biblioteca {
    width: 100%;
}

.formulario-password-perfil h2 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
}

.form-editar-perfil input[type="file"] {
    padding: 0.55rem 0.7rem;
}

.check-eliminar-imagen {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    width: auto;
    max-width: max-content;
    margin-top: 0.65rem;
    color: #4b5c6b;
    font-weight: 600;
}

.campo .check-eliminar-imagen input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    padding: 0;
    flex: 0 0 auto;
}

.check-eliminar-imagen span {
    white-space: nowrap;
}

.perfil-no-encontrado {
    max-width: 36rem;
    margin: 2rem auto;
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 768px) {

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

    .boton-editar-perfil {
        display: none;
    }

    .profile-tabs ul {
        gap: 1.25rem;
        margin: 0 2rem;
        padding: 0;
        flex-wrap: nowrap;
        justify-content: space-around;
    }

    .profile-tabs li {
        height: 3rem;
        flex: 0 1 auto;
    }

    .profile-tabs .tab-editar {
        display: flex;
        flex-grow: 1;
    }

    .profile-tabs a {
        font-size: 0.95rem;
    }

    .profile-tabs .editar {
        display: block;
        text-decoration: underline;
        text-underline-offset: 3px;
        flex-grow: 1;
        text-align: right;
    }

    aside.sidebar {
        display: grid;
        grid-template-columns: 13rem 1fr 1fr;
        grid-template-rows: 1fr;
        justify-items: center;
        gap: 0;
        margin-top: 0;
    }

    .bio {
        grid-column: span 1;
        grid-row: 1;
        text-align: justify;
        border: none;
        padding: 0;
        background: transparent;
    }

    .stats {
        grid-column: span 1;
        grid-row: 1;
        padding-top: 1rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    .stats .jugados,
    .stats .este-ano {
        border: none;
        padding: 0;
        background: transparent;
    }

    .puntuaciones {
        grid-column: span 1;
        grid-row: 1;
        align-self: stretch;
    }

    .separador {
        width: 100%;
    }

    .favorito {
        width: clamp(8.5rem, 18vw, 10rem);
    }

    .encabezado-perfil .container {
        height: 12rem;
    }

}


@media (min-width: 992px) {

    .profile-tabs ul {
        margin-left: 20rem;
    }

    .encabezado-perfil .container {
        height: 15rem;
    }

    .foto-perfil {
        width: 7.5rem;
    }

    .separador {
        display: none;
    }

    .content-grid {
        display: grid;
        grid-template-columns: 20rem 1fr;
        align-items: stretch;
        align-content: stretch;
        flex: 1;
    }

    .principal{
        padding: 1rem 2rem;
    }

    aside.sidebar {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 1rem 1rem;
        border: 1px solid rgba(195, 207, 217, 0.59);
    }

    .resenas-recientes .carousel {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .resenas-recientes .elemento-carousel {
        width: 100%;
    }

    .favorito {
        width: 10rem;
    }

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

    .bio p{
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--bordes);
    }

    .grafica{
        justify-self: center;
    }


}
