/* ==========================================================================
   tinyMayuLabs - Estilo retrô pixelado
   Paleta: azul #0F1F39 | amarelo #F3AE23 | preto #201F1F
           grafite #2C2F33 | fundo #FFEFD6
   ========================================================================== */

:root {
    --blue: #0F1F39;
    --yellow: #F3AE23;
    --black: #201F1F;
    --graphite: #2C2F33;
    --bg: #FFEFD6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--black);
    font-family: "Press Start 2P", monospace;
    image-rendering: pixelated;
}

/* ---------- Pato ---------- */

.duck {
    image-rendering: pixelated;
}

.duck--corner {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 88px;
    height: auto;
}

.duck--small {
    width: 56px;
    height: auto;
}

/* ---------- Landing ---------- */

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    text-align: center;
}

.title {
    font-size: clamp(36px, 8vw, 72px);
    color: var(--black);
    letter-spacing: 4px;
}

.subtitle {
    font-size: clamp(12px, 2vw, 18px);
    color: var(--graphite);
}

/* ---------- Botões ---------- */

.btn {
    display: inline-block;
    background: var(--black);
    color: var(--bg);
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    padding: 14px 22px;
    border: none;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 4px 4px 0 var(--graphite);
    transition: transform 0.05s ease;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--graphite);
}

.btn--small {
    font-size: 11px;
    padding: 10px 14px;
    background: var(--blue);
}

/* ---------- Topbar (tela encurtar) ---------- */

.topbar {
    padding: 22px 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--black);
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brand__name {
    font-size: 20px;
    letter-spacing: 2px;
}

.brand__tag {
    font-size: 9px;
    color: var(--graphite);
}

/* ---------- Área central (encurtar) ---------- */

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 60vh;
    padding: 20px;
}

.shorten {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(440px, 92vw);
}

.url-input {
    width: 100%;
    font-family: inherit;
    font-size: 11px;
    color: var(--graphite);
    text-align: center;
    padding: 14px 16px;
    background: var(--bg);
    border: 3px solid var(--black);
    border-radius: 10px;
    outline: none;
}

.url-input::placeholder {
    color: #b9a98c;
    letter-spacing: 2px;
}

.url-input:focus {
    border-color: var(--blue);
}

/* ---------- Resultado ---------- */

.result {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: min(440px, 92vw);
    background: var(--yellow);
    border: 3px solid var(--black);
    border-radius: 10px;
    padding: 12px 14px;
}

.result[hidden] {
    display: none;
}

.result__link {
    font-size: 11px;
    color: var(--black);
    word-break: break-all;
    text-decoration: underline;
}

.error {
    font-size: 10px;
    color: #b22222;
    text-align: center;
    max-width: 90vw;
}

/* ---------- Rodapé ---------- */

.footer {
    margin-top: auto;
    padding: 20px 16px;
    text-align: center;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--graphite);
}

.footer a {
    color: var(--blue);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer__handle {
    color: var(--blue);
}

/* ---------- Responsividade ---------- */

@media (max-width: 600px) {
    .duck--corner {
        top: 14px;
        left: 14px;
        width: 60px;
    }

    .duck--small {
        width: 44px;
    }

    .topbar {
        padding: 16px 18px;
    }

    .brand__name {
        font-size: 16px;
    }

    .title {
        letter-spacing: 2px;
    }

    .btn {
        font-size: 12px;
        padding: 12px 18px;
    }

    .center {
        min-height: 55vh;
    }
}
