body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #a4c5e4;
    color: black;
    padding: 20px;
}

.contenedor {
    max-width: 1100px;
    margin: auto;
}

.nav, .tarjeta {
    background: white;
    border: 1px solid black;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    gap: 20px;
    font-weight: bold;
}

.filtros {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filtros select, .filtros button {
    flex: 1;
    padding: 8px;
    background: white;
    border: 1px solid black;
    transition: 0.2s;
}

.facil { color: #168348; border-color: #168348; }
.medio { color: #b88700; border-color: #d6a500; }
.dificil { color: #d13b3b; border-color: #d13b3b; }

.filtros button.activo.facil { background: #168348; color: white; }
.filtros button.activo.medio { background: #d6a500; color: white; }
.filtros button.activo.dificil { background: #d13b3b; color: white; }

.tarjetas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tarjeta {
    transition: transform 0.2s;
}

.tarjeta:hover {
    transform: translateY(-4px);
}

.tarjeta.resuelto {
    border-color: #168348;
}

.banner {
    padding: 15px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.banner-algoritmos { background: #2879a8; }
.banner-web { background: #6f42c1; }
.banner-datos { background: #208c76; }
.banner-seguridad { background: #b03a48; }

.contenido {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.informacion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.informacion h2 {
    width: 100%;
    font-size: 18px;
}

.dificultad {
    font-size: 12px;
    padding: 2px 8px;
    border: 1px solid;
}

.descripcion {
    font-size: 14px;
    color: #555;
}

.etiquetas {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.etiquetas span {
    background: #eee;
    padding: 3px 7px;
    font-size: 12px;
}

.acciones {
    display: flex;
    gap: 8px;
}

.acciones button {
    padding: 8px;
    border: none;
}

.resolver {
    flex: 1;
    background: #222;
    color: white;
}

.resolver:hover { 
    background: #444;
}

.resolver:disabled { 
    background: #168348;
}

.favorito {
    width: 36px;
    background: #eee;
}

.favorito:hover { 
    background: #ffd6d6; 
    color: #d13b3b;
}

.cargando {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 6767;

}.cargando p {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.cargando-icono {
    font-size: 60px;
    color: white;
    animation: girar 0.2s linear infinite;
}

.footer {
    display: none;
}

@keyframes girar {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@media (max-width: 600px) {
    .nav {
        flex-direction: column; gap: 10px;
    }
    
    .filtros {
        display: grid; grid-template-columns: repeat(3, 1fr);
    }

    .filtros select { 
        grid-column: 1 / 4; 
    }
    
    .tarjetas {
        grid-template-columns: 1fr;
    }

    .footer {
        display: block;
        position: fixed;
        bottom: 10px;
        left: 20px;
        right: 20px;
        background-color: white;
        border: 2px solid black;
        z-index: 10;
    }

    .barra {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 5px;
    }

    .barra div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 13px;
    }

    .barra i {
        font-size: 20px;
    }
}