* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background:
        radial-gradient(circle at 12% 8%, rgba(123, 92, 255, .18), transparent 26rem),
        radial-gradient(circle at 88% 20%, rgba(37, 203, 150, .14), transparent 24rem),
        #f5f7fb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dictionary-page {
    display: grid;
    min-height: 100vh;
    padding: 32px 20px;
    place-items: center;
}

.dictionary-card {
    width: min(100%, 760px);
    padding: clamp(28px, 6vw, 56px);
    text-align: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(31, 41, 55, .14);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
}

img.logo {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.eyebrow {
    margin: 0;
    color: #6654dc;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 13ch;
    margin: 0 auto 12px;
    color: #172033;
    font-size: clamp(2rem, 5vw, 3.35rem);
    letter-spacing: -.055em;
    line-height: 1;
}

.intro {
    max-width: 32rem;
    margin: 0 auto 28px;
    color: #647085;
    font-size: 1.05rem;
    line-height: 1.55;
}

.word-input {
    width: min(100%, 570px);
    padding: 17px 20px;
    color: #172033;
    background: #fff;
    border: 1px solid #d8deea;
    border-radius: 15px;
    outline: none;
    box-shadow: 0 5px 14px rgba(24, 34, 56, .05);
    font: inherit;
    font-size: clamp(1.25rem, 3.5vw, 1.7rem);
    font-weight: 700;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.word-input::placeholder {
    color: #a7afbf;
    font-weight: 500;
}

.word-input:focus {
    border-color: #7b5cff;
    box-shadow: 0 0 0 5px rgba(123, 92, 255, .15), 0 9px 22px rgba(31, 41, 55, .1);
    transform: translateY(-1px);
}

.input-hint {
    margin: 9px 0 0;
    color: #8a94a7;
    font-size: .82rem;
}

.result-area {
    min-height: 32px;
    margin-top: 26px;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(1.08rem, 2.7vw, 1.3rem);
    line-height: 1.4;
}

h2.good {
    color: #087a4c;
}

h2.bad,
#not_found {
    color: #c23b3b;
}

div.defs {
    max-width: 590px;
    margin: 0 auto;
    padding: 2px 0;
    color: #3f4a60;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}

.defs p {
    margin: 0;
    padding: 15px 0;
    border-top: 1px solid #e8ebf2;
}

.defs strong {
    color: #202a40;
}

.defs a {
    color: #6654dc;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.hidden {
    display: none;
}

#not_found {
    margin: 8px auto 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

.green-button {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 18px;
    color: #fff;
    background: #087a4c;
    border-radius: 10px;
    box-shadow: 0 7px 16px rgba(8, 122, 76, .2);
    font-size: .95rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.green-button:hover,
.green-button:focus {
    background: #076840;
    transform: translateY(-1px);
}

a.go-back-link {
    display: inline-block;
    margin-top: 30px;
    color: #667188;
    font-size: .94rem;
    font-weight: 700;
    text-decoration: none;
}

a.go-back-link:hover,
a.go-back-link:focus {
    color: #6654dc;
    text-decoration: underline;
    text-underline-offset: 4px;
}

img.def-picture {
    display: none;
    width: 100%;
    max-width: 590px;
    max-height: 420px;
    margin: 0 auto 24px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(24, 34, 56, .15);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 480px) {
    .dictionary-page {
        padding: 16px;
    }

    .dictionary-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .brand {
        margin-bottom: 22px;
    }
}
