* {
    box-sizing: border-box;
}

h1, h2 {
    font-family: 'Domine';
}

p, button, label{
    font-family: 'Nixie One';
}

h1{
    text-align: center;
    margin: 20px 0 45px;
}

body{
    margin: 0;
    padding: 30px 20px;
    background-color: #faf8fc;
    color: #241c29;
}

p{
    text-align: center;
}

#email-template-container{
    display: flex;
    justify-content: center; 
}

#fields{
    display: flex;
    flex-direction: column; 
    gap: 16px; 
}

.field-group{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#preview{
    min-height: 120px;
    padding: 15px;
    background-color: #fdfbfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    white-space:pre-wrap;
    font-family:'Nixie One';
    line-height: 1.6;
}

#template{
    width: 100%;
    min-height: 180px;
    padding: 14px;

    border: 1px solid #d8d1dc;
    border-radius: 8px;

    font-family: monospace;
    line-height: 1.6;
    resize: vertical;
}

.field-group input{
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Nixie One';
}

.field-group label {
    text-transform: capitalize;
}

#email-template-container, #fields-container, #preview-container {
    margin: 25px auto;
    padding: 20px;
    max-width: 700px;

    background: white;
    border: 1px solid #ddd6e1;
    border-radius: 16px;

    box-shadow: 0 8px 25px rgba(48, 33, 55, 0.04);
}

button {
    padding: 10px 16px;
    color: #45384b;
    background-color: #eee9f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background-color: #dfd4e5;
    transform: translateY(-1px);
}

input:focus, textarea:focus {
    outline: 2px solid #7c5cff;
}

@media (max-width: 600px) {
    body {
        padding: 20px 14px;
    }

    #email-template-container,
    #fields-container,
    #preview-container {
        padding: 20px;
    }

    #template {
        width: 100%;
    }
}

main {
    width: min(100%, 800px);
    margin: 0 auto;
}

#email-template {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#generate {
    color: white;
    background-color: #6e4b80;
}

#generate:hover {
    background-color: #583867;
}

h2 {
    margin-top: 0;
    margin-bottom: 20px;
}