@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
    color-scheme: light dark;
    --background: #ffffff;
    --foreground: #1c1c1c;
    --muted-border: #ececec;
    --input-background: #ffffff;
    --accent: #f40552;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #000000;
        --foreground: #f5f5f5;
        --muted-border: #2a2a2a;
        --input-background: #171717;
    }
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
}

#icon {
    font-size: 2em;
    text-align: center;
    width: 100%;
    color: var(--accent);
    padding: 1.5em 0;
}

#image {
    display: block;
    margin-bottom: 1em;
    border-radius: 6px;
    text-align: center;
    width: min(80%, 720px);
    height: auto;
}

iframe#image {
    aspect-ratio: 16 / 9;
    border: 0;
}

#phrase-container {
    padding: clamp(2.5em, 8vw, 4em) 0;
    border-radius: 10px;
    width: min(80%, 720px);
}

#phrase {
    padding: 0 clamp(1.5em, 8vw, 4em);
    font-size: clamp(1.2em, 3vw, 1.5em);
    font-family: "Instrument Serif", serif;
}

#phrase-container.phrase-only #phrase {
    font-size: clamp(2.25em, 8vw, 4.5em);
    line-height: 1.05;
}

#author {
    font-style: italic;
    color: var(--accent);
    text-align: center;
    margin-top: 1.5em;
}

#date {
    opacity: 0.5;
    font-family: "Inter", sans-serif;
}

footer {
    opacity: 0.5;
    padding: 4em 1.5em;
    text-align: center;
    font-size: 0.8em;
    font-weight: 400;
}

.formulario {
    margin: 2em 1em;
    display: flex;
    align-items: center;
    text-align: center;
    border-radius: 6px;
    overflow: hidden;
    width: min(calc(100% - 2em), 520px);
    border: 1px solid var(--muted-border);
}

.formulario > input {
    flex: 1;
    min-width: 180px;
    height: 55px;
    padding: 0 1.5em;
    outline: none;
    border: none;
    background: var(--input-background);
    color: var(--foreground);
    transition: border 0.3s;
}

.formulario > button {
    flex: 0 0 auto;
    padding: 1em 1.5em;
    height: 55px;
    border: none;
    background-color: var(--accent);
    color: white;
}

@media (max-width: 600px) {
    #icon {
        padding: 1em 0;
    }

    #image,
    #phrase-container {
        width: calc(100% - 2em);
    }
}

@media (max-width: 420px) {
    .formulario {
        flex-direction: column;
        overflow: visible;
        width: calc(100% - 2em);
        border-radius: 10px;
        overflow: hidden;
    }

    .formulario > input,
    .formulario > button {
        min-width: 0;
        width: 100%;
        min-height: 55px;
    }

    .formulario > input {
        padding: 0 1.5em;
        line-height: 55px;
    }
}

@media (max-width: 600px) {
    #phrase {
        font-size: 1.2em;
        padding: 0 1.5em;
    }
}
