body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    padding: 20px;
    color: #333;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

header ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;         /* Pone los números en fila */
    flex-wrap: wrap;      /* Si no caben, bajan a la siguiente fila */
    justify-content: center; /* Los centra */
    gap: 8px;             /* Espacio entre cada botoncito */
}

header ul li {
    background: transparent; /* Quitamos el fondo blanco de aquí */
}

header ul li a {
    background: #3d5874;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 8px 12px;    /* Reducimos el padding para que no sean gigantes */
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 5px;
    display: inline-block; /* Importante para que el padding funcione bien */
    transition: 0.3s;
}

header ul li a:hover {
    background: #3498db;
    transform: translateY(-2px); /* Pequeño efecto al pasar el mouse */
}

footer {
    background: #3d5874;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
}

main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

article {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
}

h2 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 0;
}

cod {
    display: block;
    background: #eee;
    padding: 5px;
    margin: 10px 0;
    font-size: 0.85rem;
    border-radius: 4px;
    color: #c7254e;
}

button {
    cursor: pointer;
    background: #3d5874;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: 0.3s;
    transform: translateY(-2px); 
}

button:hover {
    background: #2980b9;
}

.demo-area {
    min-height: 40px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.resaltado {
    background-color: #f1c40f;
    font-weight: bold;
}