body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #f0f2f5; margin: 0; } #author-info { position: absolute; top: 10px; left: 10px; background-color: #e9ecef; padding: 10px; border-radius: 5px; border: 1px solid #ced4da; font-size: 0.9em; line-height: 1.4; } #author-info p { margin: 0; text-align: left; } .container { display: flex; flex-direction: column; align-items: center; max-width: 1200px; width: 100%; padding: 20px; background-color: #fff; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 10px; margin-top: 80px; } h1 { color: #333; text-align: center; } p { color: #666; text-align: center; } .message-input-container { margin: 15px 0; display: flex; align-items: center; justify-content: center; width: 100%; flex-wrap: wrap; /* Permite que los elementos se envuelvan */ } .message-input-container label { font-weight: bold; color: #555; margin-right: 10px; } .message-input-container input { padding: 8px; border: 1px solid #ccc; border-radius: 5px; width: 60%; max-width: 400px; /* Ancho máximo para no ser demasiado grande en pantallas amplias */ } .main-content { display: flex; justify-content: center; width: 100%; margin-top: 20px; } .column { display: flex; flex-direction: column; align-items: center; width: 30%; } .capas { display: flex; flex-direction: column; gap: 10px; } .capa { background-color: #e9ecef; border: 1px solid #ced4da; border-radius: 5px; padding: 10px; width: 250px; text-align: center; position: relative; transition: background-color 0.3s, transform 0.3s; } .capa.active { background-color: #007bff; color: white; transform: scale(1.05); } .capa.error { background-color: #dc3545; color: white; animation: shake 0.5s infinite; } #error-status { position: absolute; top: -10px; right: -10px; background-color: red; color: white; border-radius: 50%; padding: 5px; font-size: 0.8em; font-weight: bold; display: none; } .middle-section { display: flex; flex-direction: column; align-items: center; width: 40%; margin-top: 20px; } .action-btn { padding: 10px 20px; margin: 5px; border: none; border-radius: 5px; cursor: pointer; background-color: #007bff; color: white; font-size: 1em; transition: background-color 0.3s; } .action-btn:hover { background-color: #0056b3; } .medio-transmision { height: 300px; width: 100%; display: flex; justify-content: center; align-items: center; border-top: 2px dashed #007bff; border-bottom: 2px dashed #007bff; margin-top: 20px; position: relative; } .paquete-oculto { display: none; } .paquete-movil { position: absolute; left: 0; width: 100px; height: 50px; background-color: #28a745; color: white; display: flex; justify-content: center; align-items: center; border-radius: 5px; animation: moverPaquete 4s linear forwards; } .paquete-corrupto { background-color: #dc3545; } .retransmision-movil { animation: moverPaquete 4s linear forwards; } @keyframes moverPaquete { from { left: 0; transform: translateX(0); } to { left: 100%; transform: translateX(-100%); } } @keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } } .info-box { width: 90%; margin-top: 20px; padding: 15px; border: 1px solid #ced4da; border-radius: 5px; background-color: #f8f9fa; } #current-info, .message-raw { text-align: left; } .capa-info-titulo { font-weight: bold; color: #007bff; } .message-raw { white-space: pre-wrap; font-family: 'Courier New', Courier, monospace; font-size: 0.9em; background-color: #e9ecef; padding: 10px; border-radius: 5px; } .header-key { color: #6c757d; font-weight: bold; } .payload { color: #28a745; font-weight: bold; } .binary-data { color: #212529; word-wrap: break-word; } .corrupted-data { color: #dc3545; font-weight: bold; } /* Media query para pantallas pequeñas (móviles) Ajusta el layout para que sea responsive. */ @media (max-width: 768px) { .container { padding: 10px; } h1 { font-size: 1.5em; } .main-content { flex-direction: column; align-items: center; } .column { width: 100%; margin-bottom: 20px; } .middle-section { width: 100%; order: -1; /* Mueve la sección de botones hacia arriba */ margin-bottom: 20px; } .capa { width: 100%; max-width: 350px; } .medio-transmision { height: 100px; /* Reduce la altura en móvil */ } }