:root {
    --color-fondo: #D8DFE8;
    --color-header: #FFB200;
    --color-header-text: white;
    --color-header-hover: #F2A600;
    --color-boton: #FFB200;
    --color-boton-hover: #B60071;
    --color-encriptacion-fondo: #FFF5E1;
    --color-encriptacion-borde: #FFB200;
    --color-encriptacion-focus: #B60071;
    --color-desencriptacion-fondo: #f0e1e5;
    --color-desencriptacion-borde: #E4003A;
    --color-desencriptacion-button: #B60071;
    --color-desencriptacion-button-hover: #FFB200;
    --color-not-found-fondo: #FFEBEB;
    --color-not-found-text: #B60071;
    --color-footer: #B60071;
    --color-footer-hover: #A00060;
    --color-footer-text: white;
    --color-footer-img: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
    max-height: 100dvh;
    max-width: 100dvw;
}

body {
    background-color: var(--color-fondo);
    height: 100dvh;
    width: 100dvw;
}

/* Header */
.cabezera {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 5%;
    width: 100vw;
    background-color: var(--color-header);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-titulo {
    display: flex;
    align-items: center;
}

.logo-titulo h1 {
    color: var(--color-header-text);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.logo-titulo a {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.logo-titulo img {
    width: 50%;
    transition: transform 0.3s ease;
}

.logo-titulo img:hover {
    transform: scale(1.1);
}

/* Main Content */
.cuerpo-principal {
    height: 90%;
    width: 100%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F2F2F2;
    transition: background-color 0.3s ease;
}

.cuerpo-principal:hover {
    background-color: #e0e0e0;
}

.contenedor-btn {
    display: flex;
    width: 80%;
    height: 20%;
}

.botones {
    color: white;
    border-style: none;
    background-color: var(--color-boton);
    margin: 20px;
    width: 200px;
    height: 50px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.botones:hover {
    background-color: var(--color-boton-hover);
    cursor: pointer;
    transform: scale(1.05);
}

/* Encriptacion */
.contenedor-encriptacion {
    width: 40%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--color-encriptacion-fondo);
    margin-right: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-radius: 32px;
}

.contenedor-encriptacion:hover {
    transform: scale(1.02);
}

.input-encriptado {
    border-radius: 32px;
    font-size: 32px;
    text-align: center;
    width: 100%;
    height: 90%;
    resize: none;
    border: 2px solid var(--color-encriptacion-borde);
    outline: none;
    transition: border-color 0.3s ease;
    align-content: center;
}

.input-encriptado:focus {
    border-color: var(--color-encriptacion-focus);
}

.contenedor-encriptacion p {
    padding-top: 5%;
    font-size: 14px;
    color: #333;
}

/* Parpadeo si el usuario hizo algo mal */
@keyframes parpadeo {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.parpadeo {
    animation: parpadeo 0.5s linear infinite;
}


/* Desencriptacion */
.contenedor-dencriptacion {
    border-radius: 32px;
    width: 40%;
    height: 90%;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--color-desencriptacion-fondo);
    margin-right: 40px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease;
}

.contenedor-dencriptacion.show {
    display: flex;
    opacity: 1;
    transform: scale(1.02);
}

.input-desencriptado {
    border-radius: 32px;
    font-size: 32px;
    text-align: center;
    align-content: center;
    width: 100%;
    height: 90%;
    resize: none;
    border: 2px solid var(--color-desencriptacion-borde);
    transition: border-color 0.3s ease;
}

.input-desencriptado:focus {
    border-color: var(--color-desencriptacion-button-hover);
}

.contenedor-dencriptacion button:hover {
    background-color: var(--color-desencriptacion-button-hover);
}

.contenedor-dencriptacion button {
    background-color: var(--color-desencriptacion-button);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contenedor-dencriptacion button:hover {
    transform: scale(1.05);
}

.img-not-found-contenedor {
    border-radius: 32px;
    width: 20%;
    height: 90%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    background-color: var(--color-not-found-fondo);
    align-items: center;
    justify-content: center;
    gap: 3%;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease;
}

.img-not-found-contenedor.hide {
    opacity: 0;
    transform: scale(0.95);
}

.img-not-found-contenedor h2 {
    font-size: 24px;
    color: var(--color-not-found-text);
}

.img-not-found-contenedor p {
    font-size: 16px;
    color: var(--color-not-found-text);
}

.not-found {
    width: 90%;
}

/* Footer */
.piecera {
    position: absolute;
    text-align: center;
    height: 5%;
    width: 100vw;
    border: 2px solid gray;
    background-color: var(--color-footer);
    color: var(--color-footer-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
}

.piecera:hover {
    background-color: var(--color-footer-hover);
}

.piecera img {
    width: 30px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.piecera a {
    text-decoration: none;
    color: inherit;
}

.piecera a:hover {
    text-decoration: underline;
}

/* Responsive / Media Query */

/* Dispositivos tabletas de 1024px */
@media (max-width: 1024px) {

    .body,
    html {
        height: 100dvh;
        width: 100dvw;
    }

    .cabezera {
        height: 5%;
        width: 100dvw;
    }

    .cuerpo-principal {
        height: 90%;
        width: 100dvw;
        flex-direction: column;
    }

    .contenedor-encriptacion {
        width: 90%;
        height: 70%;
        margin: 3%;
    }

    .contenedor-dencriptacion.show {
        height: 40%;
    }

    .contenedor-dencriptacion.show button {
        width: 90%;
    }

    .contenedor-encriptacion p {
        font-weight: 500;
    }

    #restriccion {
        font-size: 1.1rem;
    }

    .contenedor-btn {
        justify-content: center;
    }

    .not-found {
        display: none;
    }

    .img-not-found-contenedor {
        width: 90%;
        height: 20%;
        padding: 10px;
        margin: 1%;
    }

    footer {
        height: 5%;
        width: 100dvw;
    }

    .piecera {
        height: 5dvh;
    }
}

/* Dispositivos tabletas de 1280px */
@media (max-width: 1280px) {

    .body,
    html {
        height: 100dvh;
        width: 100dvw;
    }

    .cabezera {
        height: 5%;
        width: 100dvw;
    }

    .cuerpo-principal {
        height: 90%;
        width: 100dvw;
        flex-direction: row;
    }

    .contenedor-encriptacion,
    .contenedor-dencriptacion {
        width: 90%;
        height: 80%;
        margin: 3%;
    }

    .contenedor-encriptacion p {
        font-weight: 500;
    }

    #restriccion {
        font-size: 1.1rem;
    }

    .contenedor-btn {
        justify-content: center;
    }

    .not-found {
        display: flex;
    }

    .img-not-found-contenedor {
        width: 40%;
        height: 95%;
        padding: 10px;
        margin: 1%;
    }

    footer {
        height: 5%;
        width: 100dvw;
    }

    .piecera {
        height: 5dvh;
    }
}

/* Tables delgadas de 900px */
@media (max-width: 912px) {

    .cuerpo-principal {
        padding: 5px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        max-height: 100%;
        max-width: 100%;
    }

    .img-not-found-contenedor {
        width: 90%;
        height: 20%;
        padding: 10px;
        margin: 1%;
        gap: 5%;
    }

    .img-not-found-contenedor h2, p {
        font-size: 1.8rem;
    }

    .not-found {
        display: none;
    }
}

/* Dispositivos móviles de 768px */
@media (max-width: 768px) {
    .body {
        height: 100vh;
        width: 100vw;
    }

    .cabezera {
        flex-direction: row;
        height: 5%;
        display: flex;
        justify-content: center;
        margin: 0;
        width: 100%;
    }

    .cabezera a {
        display: flex;
        flex-direction: row;
        justify-content: center;
        height: 50%;
        width: 50%;
        margin: 0;
    }

    .logo-titulo {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .logo-titulo h1 {
        font-size: 1.1rem;
    }

    .logo-titulo img {
        width: 50%;
        height: 80%;
    }

    .cuerpo-principal {
        padding: 5px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        max-height: 100%;
        max-width: 100%;
    }

    .botones {
        width: 150px;
        height: 40px;
        margin: 10px;
    }

    .contenedor-encriptacion,
    .contenedor-dencriptacion {
        width: 90%;
        height: 95%;
        margin: 3%;
    }

    .input-encriptado,
    .input-desencriptado::placeholder {
        align-content: center;
    }

    .input-encriptado,
    .input-desencriptado {
        align-content: center;
        font-size: 24px;
        padding: 5%;
    }

    .contenedor-btn {
        flex-direction: column;
        align-items: center;
        height: 50%;
    }

    .not-found {
        height: 60%;
        width: 60%;
        display: none;
    }

    .img-not-found-contenedor {
        width: 90%;
        height: 20%;
        padding: 10px;
        margin: 1%;
        gap: 5%;
    }

    .piecera {
        font-size: 0.5rem;
        height: 5vh;
        width: 100vw;
    }
}

@media (max-width: 414px) {
    .img-not-found-contenedor h2, p{
        font-size: 1.2rem;
    }
}
