*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Segoe UI', sans-serif;
    background: #eef2f7;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.main-header{
    background: #4f46e5;
    color: white;
    text-align: center;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.main-header h1{
    margin-bottom: 10px;
}

.nav-links{
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
}

.nav-links a{
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    transition: .3s;
}

.nav-links a:hover{
    background: rgba(255,255,255,.2);
}

/* MAIN */
main{
    flex: 1;
    padding: 20px 0;
}

/* TABLA */
table{
    width: 95%;
    margin: auto;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
}

th{
    background: #6366f1;
    color: white;
    padding: 14px;
}

td{
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

tr:nth-child(even){
    background: #f8fafc;
}

tr:hover{
    background: #e0e7ff;
}

/* CÓDIGO */
code{
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    color: #7c3aed;
}

/* BOTONES */
.btn-funcion{
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
}

.btn-funcion:hover{
    background: #16a34a;
    transform: translateY(-2px);
}

/* CAJAS DE EJEMPLO */
#hide, #show, #fadeO, #fadeI,
#fadeT, #fadet, #slide,
#sld, #sldt, #anm,
#css, #ac, #rc,
#txt, #html{
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 10px;
}

/* CLASES */
.color-rojo{
    background: #ef4444 !important;
    color: white;
}

.color-rosa{
    background: #ec4899;
    color: white;
}

/* FOOTER */
.main-footer{
    background: #4f46e5;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

/* RESPONSIVE */
@media (max-width: 900px){
    table{
        display: block;
        overflow-x: auto;
    }

    .nav-links{
        flex-direction: column;
        gap: 10px;
    }
}