body {
    background-color: rgb(11, 17, 32);
    color: rgb(226, 232, 240);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 20px;
    padding: 20px;
    margin: 0;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
}

header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    gap: 15px;
    background-color: rgb(21, 30, 48);
    padding: 20px;
    border: 1px solid rgb(38, 52, 77);
    border-radius: 12px;
}

header h1 {
    color: rgb(56, 189, 248);
    font-size: 40px;
}

header span {
    color: rgb(165, 180, 252);
    font-weight: bold;
    font-size: 20px;
}

nav {
    background-color: rgb(21, 30, 48);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgb(38, 52, 77);
    border-radius: 10px;
}

nav button {
    background-color: rgb(32, 44, 66);
    color: rgb(203, 213, 225);
    border: 1px solid rgb(52, 68, 95);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

nav button.activo {
    background-color: rgb(37, 99, 235);
    color: rgb(255, 255, 255);
    border-color: rgb(56, 189, 248);
    box-shadow: 0 0 10px rgb(37, 99, 235);
}

nav button:hover {
    border-color: rgb(56, 189, 248);
}

#navMoviles {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    margin: auto;
    width: fit-content;
    transition: bottom 0.5s ease-in-out;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.tarjeta {
    background-color: rgb(21, 30, 48);
    border: 1px solid rgb(38, 52, 77);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}

.tarjeta:hover {
    border-color: rgb(56, 189, 248);
    transform: translateY(-4px);
}

.detalles {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 15px;
    align-items: center;
    padding: 20px;
}

.tarjeta .detalles div {
    display: flex;
    flex-direction: column;
}

.detalles>div:first-child {
    background-color: rgb(30, 58, 95);
    border: 1px solid rgb(38, 80, 120);
    border-radius: 10px;
    min-height: 120px;
    align-items: center;
    justify-content: center;
}

.icon {
    color: rgb(56, 189, 248);
    font-size: 55px;
}

.detalles h2 {
    color: rgb(241, 245, 249);
    font-size: 20px;
    margin: 5px 0;
}

.detalles p {
    color: rgb(148, 163, 184);
    line-height: 1.5;
    font-size: 15px;
}

.criterios {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
}

.criterios span {
    background-color: rgb(32, 44, 66);
    color: rgb(203, 213, 225);
    border: 1px solid rgb(52, 68, 95);
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 13px;
}

.botones {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
}

.tarjeta .detalles div button {
    border: 1px solid rgb(37, 99, 235);
    background-color: rgb(29, 78, 216);
    color: rgb(255, 255, 255);
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.tarjeta .detalles div button:hover {
    background-color: rgb(37, 99, 235);
}

.botones span {
    cursor: pointer;
}

.favorito,
.nofavorito {
    color: rgb(250, 204, 21);
    font-size: 22px;
}

.facil {
    background-color: rgb(20, 83, 45) !important;
    color: rgb(134, 239, 172) !important;
    border-color: rgb(34, 197, 94) !important;
}

.medio {
    background-color: rgb(113, 63, 18) !important;
    color: rgb(253, 224, 71) !important;
    border-color: rgb(234, 179, 8) !important;
}

.dificil {
    background-color: rgb(127, 29, 29) !important;
    color: rgb(252, 165, 165) !important;
    border-color: rgb(239, 68, 68) !important;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(11, 17, 32);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: 0.5s;
}

#loader.oculto {
    opacity: 0;
    visibility: hidden;
}

#loader h2 {
    color: rgb(56, 189, 248);
}

#loader p {
    color: rgb(148, 163, 184);
}

.spinner {
    font-size: 55px;
    color: rgb(56, 189, 248);
    animation: girar 1s linear infinite;
}

.tarjeta.completado {
    background-color: rgb(15, 45, 37);
    border: 1px solid rgb(34, 197, 94);
}

.tarjeta.completado:hover {
    border-color: rgb(74, 222, 128);
    box-shadow: 0 0 12px rgb(22, 101, 52);
}

.tarjeta.completado .detalles>div:first-child {
    background-color: rgb(20, 83, 45);
    border-color: rgb(34, 197, 94);
}

.tarjeta.completado .icon {
    color: rgb(74, 222, 128);
}

.tarjeta.completado h2 {
    color: rgb(134, 239, 172);
}

.tarjeta.completado .estado-completado {
    background-color: rgb(20, 83, 45);
    color: rgb(134, 239, 172);
    border-color: rgb(34, 197, 94);
}

.tarjeta.completado .botones button {
    background-color: rgb(22, 101, 52);
    border-color: rgb(34, 197, 94);
}

.tarjeta.completado .botones button:hover {
    background-color: rgb(21, 128, 61);
}

.tarjeta {
    animation: aparecer 0.4s ease both;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes girar {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1080px) {
    main {
        grid-template-columns: 1fr 1fr;
    }

    .detalles {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 720px) {

    main {
        grid-template-columns: 1fr;
        padding-bottom: 150px;
    }

    header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #navMoviles {
        bottom: 20px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin: 20px;
    }

    #navDefault {
        display: none;
    }
}