﻿*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    background-color: rgba(214, 208, 208, 0.485);
    color: rgb(54, 54, 54);
    line-height: 1.6;
}

h1 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3.125rem);
    color: rgb(54, 54, 54);
    margin: clamp(2rem, 5vw, 3.5rem) auto 1rem;
    padding: 0 1.5rem;
}

h2 {
    color: rgb(63, 57, 57);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 0 0 1rem;
}

.container {
    width: calc(100% - 2rem);
    max-width: 1100px;
    margin: 2.5rem auto;
    background-color: white;
    padding: 2rem;
    border: none;
    border-radius: 15px;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 2rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.vl {
    width: 1px;
    background-color: rgba(214, 208, 208, 0.7);
    align-self: stretch;
    min-height: 200px;
}

.encryption,
.decryption,
.encrypted,
.decrypted {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text {
    background-color: rgba(235, 235, 235, 0.844);
    width: 100%;
    font-size: 1rem;
    border: none;
    outline: 2px solid transparent;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    resize: vertical;
    border-radius: 10px;
}

.text:focus {
    outline-color: rgb(178, 178, 178);
}

textarea.text {
    min-height: 220px;
}

p.text {
    min-height: 220px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.encrypt-button,
.decrypt-button {
    border: none;
    border-radius: 8px;
    background-color: rgb(46, 221, 46);
    padding: 0.85rem 1.75rem;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    align-self: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.encrypt-button:hover,
.decrypt-button:hover,
.encrypt-button:focus,
.decrypt-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(46, 221, 46, 0.35);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    text-align: center;
}

.readme {
    color: rgb(83, 80, 80);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.credits {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.credits > div {
    flex: 1 1 200px;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        padding: 1.75rem;
    }

    .vl {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        line-height: 1.5;
    }

    h1 {
        padding: 0 1rem;
        margin: 1.75rem auto 0.75rem;
    }

    .container {
        width: calc(100% - 1.5rem);
        max-width: 600px;
        margin: 1.5rem auto;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .text {
        font-size: 0.95rem;
    }

    textarea.text,
    p.text {
        min-height: 180px;
    }

    .encrypt-button,
    .decrypt-button {
        width: 100%;
        align-self: stretch;
    }

    .credits {
        flex-direction: column;
        gap: 1.5rem;
    }
}

