*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    color: #0f172a;
    padding: 24px;
}

body {
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    padding: 32px 28px;

    display: flex;
    flex-direction: column;
    gap: 16px;
}


body::before {
    content: "Testador de Regex";
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.3px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}

input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background-color: #ffffff;
    border: 3px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-size: 0.9rem;
    outline: none;
}

input[type="text"]:focus {
    border-color: #2563eb;
}

input[type="text"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}


#regexInput {
    font-family: ui-monospace, "Cascadia Code", "Consolas", "Liberation Mono",
        monospace;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}

body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 10px;
}


body::before,
#regexInput {
    grid-column: 1 / -1;
}


#entrada {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
}

#saida1 {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
}

#entrada2 {
    grid-column: 1;
    grid-row: 4;
    min-width: 0;
}

#saida2 {
    grid-column: 2;
    grid-row: 4;
    align-self: center;
}

#submitButton {
    grid-column: 1 / -1;
    grid-row: 5;
}

#saida1, #saida2 {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
}

#saida1:empty, #saida2:empty {
    display: none;
}

button {
    padding: 10px 22px;
    background-color: #030509;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

button:hover {
    background-color: #1e293b;
}

button:active {
    background-color: #0f172a;
}

#saida {
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #475569;
    font-weight: 500;
    min-height: 20px;
}


#saida:empty {
    padding: 0;
    border: none;
    background-color: transparent;
    min-height: 0;
}
