* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #292929, #292929, #292929);
    color: #f6f4f4;
    font-size: 20px;
    text-align: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.header-titulo {
    width: 100%;
    font-family: 'Orbitron', sans-serif;
    background-color: #aba9a9;
    padding: 10px 0;
    margin-bottom: 40px;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    background-color: #aba9a9;
    font-size: 50px;
    color: #000000;
    letter-spacing: 4px;
    margin: 0;
    animation: aparecer 1.5s ease;
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.contenedor-principal {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.panel.lateral {
    width: 250px;
    background: rgba(137, 135, 135, 0.1);
    padding: 20px;
    border-radius: 15px;
    text-align: left; 
}

item-info p {
    font-size: 16px; 
    color: #ffffff; 
    margin: 5px 0;
}

.item-info code {
    display: block;
    background: #111;
    padding: 12px;   
    border-radius: 4px;
    color: #00ffcc; 
    font-family: monospace;
    font-size: 20px; 
    font-weight: bold;
    border-left: 4px solid #5b8cff;
    text-align: center; 
}


.contenedor {
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
}
.opciones {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; 
}

.card {
    width: 280px;
    text-decoration: none;
    color: rgb(255, 255, 255);
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 15px;
    padding: 15px;
    transition: 0.3s;
    font-size: 20px;
}

.card:hover {
    border-color: #00f2ff;
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    border-radius: 10px;
}

.menu-problemas {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
    width: 100%;
}

.opcion {
    width: 220px;
    background: #44444493;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid #353535;
}

.opcion:hover {
    transform: scale(1.06);
    box-shadow: 0px 10px 25px rgba(0,0,0,0.5);
    border-color: #5b8cff;
}

.opcion img {
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.opcion p {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.problema {
    display: none;
    margin: 40px auto;
    width: 85%;
    max-width: 1100px;
    background: #696868;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #5b8cff;
    box-shadow: 0px 10px 25px rgba(0,0,0,0.4);
}

.problema.activo {
    display: block;
}

.seccion-calculo {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
    width: 100%;
    margin-bottom: 20px;
}

.diagrama-dcl {
    flex: 1;
    background: rgba(10, 10, 10, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px dashed #5b8cff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.imagen-dcl {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 10px;
}

.seccion-calculo > div:last-child {
    flex: 1;
}

input {
    width: 220px;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    background: #060606;
    color: white;
}

input:focus {
    outline: none;
    border-color: #5b8cff;
}

.btn-calcular {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-calcular:hover {
    transform: scale(1.05);
    background: #2563eb;
}

.resultado {
    margin-top: 25px;
    background: #1a1a1a;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #5b8cff;
    font-size: 18px;
    color: #00ffcc;
    box-shadow: 0px 5px 15px rgba(91, 140, 255, 0.2);
}

.volver {
    margin-top: 40px;
    margin-bottom: 40px;
    background: #2d2d2d;
    color: white;
    border: 2px solid #444;
    padding: 12px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.volver:hover {
    background: #5b8cff;
    border-color: #5b8cff;
}

@media (max-width: 900px) {
    .seccion-calculo {
        flex-direction: column;
    }
    .problema {
        width: 95%;
    }
    .opcion {
        width: 160px;
    }
    .opcion p {
        font-size: 16px;
    }
}


canvas {
    margin: 0 !important;        
    border: 2px solid #4b5aff;
    background: #343434;
    display: block;
    margin: 20px auto;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}
.controles-simulador {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    width: fit-content;
    margin: 0 auto;
}
.control-group { text-align: center; }
input[type="range"] { cursor: pointer; }

.btn-lanzar {
    background: #39ff14;
    color: #000;
    border: none;
    padding: 10px 25px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-lanzar:hover { box-shadow: 0 0 15px #39ff14; }

cronometro {
    font-family: 'Orbitron', sans-serif;
    color: #39ff14;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #39ff14;
}

.resultados-dinamicos {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #333;
    width: 780px;
    margin: 10px auto;
}

.datos-bloque-a { color: #00f2ff; text-align: left; }
.datos-bloque-b { color: #ff00ff; text-align: right; }

.layout-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; 
    margin: 20px auto;
}

.panel-info, .resultados-lateral {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    min-width: 200px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    text-align: center;
}

.controles-simulador {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 25px;
    background: #1a1a1a;
    border-radius: 15px;
    border: 1px solid #333;
    width: fit-content;
    margin: 15px auto;
}

.control-group { text-align: center; }

.controles-simulador p { margin: 0 0 10px 0; font-size: 0.9rem; }

input[type="range"] { cursor: pointer; width: 150px; }


.btn-lanzar {
    background: #39ff14;
    color: #000;
    border: none;
    padding: 10px 25px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-lanzar:hover {
    box-shadow: 0 0 15px #39ff14;
}

.control-group input[type="number"] {
    background: #222;
    border: 1px solid #333;
    color: #39ff14; 
    font-family: 'Orbitron', sans-serif;
    padding: 8px;
    border-radius: 5px;
    width: 80px;
    text-align: center;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.control-group input[type="number"]:focus {
    border-color: #00f2ff;
    box-shadow: 0 0 5px #00f2ff;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #00f2ff;
}


