
@import url('https://fonts.googleapis.com/css2?family=La+Belle+Aurore&family=UnifrakturMaguntia&display=swap');

:root {
    --parchment: #e8d8b5;
    --parchment-dark: #cbb58d;
    --burgundy: #641D32;
    --ink: #641D32;
    --shadow: rgba(43, 26, 18, 0.35);
}

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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;

    background:
        radial-gradient(ellipse at center, #514034, #211b19);

    color: var(--ink);
}

.letter {
    position: relative;
    width: min(100%, 720px);
    min-height: 650px;
    padding: 65px 55px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.15),
            transparent 45%
        ),
        var(--parchment);

    border: 1px solid var(--parchment-dark);
    box-shadow:
        0 20px 55px var(--shadow),
        inset 0 0 45px rgba(92, 59, 29, 0.15);
}

h1, h2 {
    font-family: 'UnifrakturMaguntia', serif;
    font-weight: normal;
    color: var(--burgundy);
    text-align: center;
}

h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 8px;
}

h2 {
    font-size: 2rem;
    margin: 45px 0 20px;
}

.subtitle {
    font-family: 'La Belle Aurore', cursive;
    font-size: 1.6rem;
    text-align: center;
    color: var(--burgundy);
}

#letter-content {
    margin-top: 35px;
    font-family: 'La Belle Aurore', cursive;
    font-size: 1.45rem;
    line-height: 1.8;
    color: var(--burgundy);
}

#letter-content > p {
    text-align: center;
}

.seal {
    width: 75px;
    height: 75px;
    margin: 35px auto;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--burgundy);
    color: var(--parchment);
    font-size: 2rem;

    box-shadow:
        0 5px 10px rgba(0,0,0,0.3),
        inset 0 0 8px rgba(0,0,0,0.4);
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
}

label {
    text-align: center;
}

input {
    padding: 12px;
    background: rgba(255,255,255,0.25);
    border: none;
    border-bottom: 1px solid var(--burgundy);
    font: inherit;
    color: var(--burgundy);
    text-align: center;
    outline: none;
}

button {
    padding: 12px 20px;
    background: var(--burgundy);
    color: var(--parchment);
    border: 1px solid #451322;
    font-family: 'La Belle Aurore', cursive;
    font-size: 1.25rem;
    cursor: pointer;
}

button:hover {
    background: #7b2941;
}

#error-message {
    margin-top: 15px;
    color: #8b1e2d;
    text-align: center;
}

@media (max-width: 600px) {
    .letter {
        padding: 40px 25px;
    }
}


.letter-text {
    white-space: pre-line;
    text-align: left;
    margin-top: 25px;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

