*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Segoe UI', sans-serif;
    background:#f7f1e8;
    color:#5d4037;
    line-height:1.6;
}

.container{
    max-width:1000px;
    margin:auto;
    padding:25px;
}

/* ===== HEADER ===== */

header{
    background:#ff7b00;
    color:white;
    text-align:center;
    padding:30px 20px;
    border-radius:18px;
    margin-bottom:25px;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}

h1{
    font-size:2.5rem;
    margin-bottom:10px;
}

.subtitle{
    font-size:1rem;
    margin-bottom:5px;
}

.subtitle-small{
    font-size:.95rem;
    opacity:.9;
}

/* ===== DEMO ===== */

#demo-bar{
    background:#fffaf5;
    padding:18px;
    border-radius:18px;
    margin-bottom:25px;
    box-shadow:0 3px 10px rgba(0,0,0,.05);
}

#demo-content{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
}

.demo-box{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
}

#demo-text{
    font-weight:600;
    color:#6d4c41;
}

.demo-item{
    background:#ff9800;
    color:white;
    padding:8px 15px;
    border-radius:8px;
    font-weight:600;
}

#demo-log{
    color:#bf360c;
    font-weight:bold;
    margin-top:10px;
}

/* ===== BOTONES ===== */

#reset-btn{
    margin-top:15px;
    background:#e65100;
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

#reset-btn:hover{
    background:#bf360c;
}

.run-btn{
    background:#ff7b00;
    color:white;
    border:none;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.run-btn:hover{
    background:#ef6c00;
}

/* ===== TABLA ===== */

.table-wrap{
    background:white;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 4px 12px rgba(0,0,0,.06);
}

table{
    width:100%;
    border-collapse:collapse;
}

thead{
    background:#8d6e63;
    color:white;
}

th{
    padding:15px;
    text-align:left;
}

td{
    padding:15px;
}

tbody tr:nth-child(even){
    background:#fff5e6;
}

tbody tr:hover{
    background:#ffe8c5;
}

.num{
    color:#ff7b00;
    font-weight:bold;
    font-size:1.1rem;
    text-align:center;
}

.desc{
    color:#5d4037;
}

.code{
    background:#fffaf5;
    padding:6px 10px;
    border-radius:6px;
    color:#8d6e63;
    font-family:Consolas, monospace;
}

.action{
    text-align:center;
}

/* ===== FOOTER ===== */

footer{
    text-align:center;
    margin-top:25px;
    padding:15px;
    color: white;
    background:#ff7b00;
}

/* ===== RESPONSIVE ===== */

@media(max-width:768px){

    .container{
        padding:15px;
    }

    h1{
        font-size:2rem;
    }

    #demo-content{
        flex-direction:column;
        align-items:flex-start;
    }

    th,
    td{
        padding:10px;
        font-size:.9rem;
    }

    .run-btn{
        width:100%;
    }
}