body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #83a4d4, #b6fbff);  /* Degradado de azul claro a verde claro */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;  /* Añadido para permitir el desplazamiento vertical */
    max-height: 90vh;  /* Limitar la altura máxima del contenido */
    width: 100%;  /* Asegurar que ocupe todo el ancho */
}

.menu {
    width: 20%;
    padding: 20px;
    background: linear-gradient(to bottom, #1cbce8, #a4e4f6);  /* Degradado de morado a azul */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 100vh;  /* Asegura que el menú ocupe toda la altura */
    overflow-y: auto;  /* Permitir el desplazamiento vertical en el menú */
}

.menu h2 {
    text-align: center;
    margin-bottom: 20px;
}

.menu a {
    color: white;
    text-decoration: none;
    text-align: center;
    display: block;
    margin-bottom: 20px;
    font-weight: bold;
}

.menu label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

.menu input, .menu select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #f4f4f4;
}

.menu button {
    width: 100%;
    background: linear-gradient(to right, #ff7e5f, #feb47b);  /* Degradado de naranja a rosado */
    color: white;
    border: none;
    padding: 10px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.menu button:hover {
    background: linear-gradient(to right, #feb47b, #ff7e5f);  /* Inversión del degradado para hover */
}

.menu button.generando {
    background: grey;  /* Color gris mientras se está generando */
}

.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
    margin-top: 20px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #C5CAE9;
}

.timeline-item {
    position: relative;
    width: 45%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:before {
    content: '';
    position: absolute;
    top: 20px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #FF7043;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even):before {
    left: -6px;
}

.timeline-content {
    background: #607d8b;  /* Azul grisáceo */
    color: #fff;
    padding: 20px;
    border-radius: 6px;
    word-wrap: break-word;
}

.creditos, .usuario {
    margin-top: 20px;
    color: white;
    text-align: center;
    font-weight: bold;
}

.creditos {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: green;
    color: white;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    transition: background-color 0.3s;
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        height: 100%;
    }

    .menu {
        width: 100%;
        margin-bottom: 20px;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .main-content {
        width: 100%;
        max-height: none;  /* Ajuste para dispositivos móviles */
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 20px 20px;
    }

    .timeline-item:nth-child(even) {
        left: 0 !important;
    }

    .timeline:before {
        left: 0%;
    }

    .timeline-item:before {
        left: 0%;
        right: auto;
    }
}

@media screen and (min-width: 769px) {
    .container {
        flex-direction: row;
    }

    .main-content {
        width: 80%;
    }

    .menu {
        width: 20%;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}

/* Colores aleatorios */
.timeline-content:nth-child(1) { background: #e57373; }
.timeline-content:nth-child(2) { background: #f06292; }
.timeline-content:nth-child(3) { background: #ba68c8; }
.timeline-content:nth-child(4) { background: #9575cd; }
.timeline-content:nth-child(5) { background: #7986cb; }
.timeline-content:nth-child(6) { background: #64b5f6; }
.timeline-content:nth-child(7) { background: #4fc3f7; }
.timeline-content:nth-child(8) { background: #4dd0e1; }
.timeline-content:nth-child(9) { background: #4db6ac; }
.timeline-content:nth-child(10) { background: #81c784; }
.timeline-content:nth-child(11) { background: #aed581; }
.timeline-content:nth-child(12) { background: #dce775; }
.timeline-content:nth-child(13) { background: #fff176; }
.timeline-content:nth-child(14) { background: #ffd54f; }
.timeline-content:nth-child(15) { background: #ffb74d; }
.timeline-content:nth-child(16) { background: #ff8a65; }
.timeline-content:nth-child(17) { background: #a1887f; }
.timeline-content:nth-child(18) { background: #90a4ae; }
