body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px; /* Limitar el ancho máximo en pantallas grandes */
    margin: 10px; /* Asegurar un margen en pantallas pequeñas */
}

h1 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.result {
    margin-top: 20px;
    text-align: center;
}

textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
}

/* Media Queries para hacerlo responsive */

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 18px;
    }

    button {
        padding: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        height: auto;
        padding-top: 20px;
    }

    .container {
        padding: 10px;
    }

    h1 {
        font-size: 16px;
    }

    button {
        padding: 6px;
        font-size: 14px;
    }
}

/* Estilos de modo oscuro */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

.container.dark-mode {
    background-color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

button.dark-mode {
    background-color: #444;
    color: #fff;
}

button.dark-mode:hover {
    background-color: #333;
}

textarea.dark-mode, input.dark-mode {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

/* Botón de cambio de tema */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #007bff;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s;
}

#theme-toggle.dark-mode {
    background-color: #444;
}

#theme-toggle:hover {
    background-color: #0056b3;
}

#theme-toggle.dark-mode:hover {
    background-color: #333;
}

.result-box {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* Footer */
.footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.85em;
    color: #666;
}

.footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* Footer en modo oscuro */
body.dark-mode .footer {
    border-top: 1px solid #444;
    color: #aaa;
}

body.dark-mode .footer a {
    color: #66b2ff;
}
