/* MD5 页只包含文本输入、字母格式和摘要结果样式。 */
.md5-form textarea {
    display: block;
    width: 100%;
    min-height: 176px;
    padding: 15px 16px;
    resize: vertical;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 5px;
    font: 500 15px/1.65 ui-monospace, "Cascadia Code", Consolas, monospace;
    letter-spacing: 0;
}

.md5-form textarea:focus {
    border-color: var(--forest);
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.hash-format {
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}

.hash-format legend {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.hash-format-options {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.hash-format-options label {
    position: relative;
    cursor: pointer;
}

.hash-format-options input {
    position: absolute;
    opacity: 0;
}

.hash-format-options span {
    display: block;
    min-width: 74px;
    padding: 7px 14px;
    text-align: center;
}

.hash-format-options label + label span {
    border-left: 1px solid var(--line);
}

.hash-format-options input:checked + span {
    color: #ffffff;
    background: var(--forest);
}

.hash-format-options input:focus-visible + span {
    outline: 3px solid var(--eye);
    outline-offset: -3px;
}

.md5-result {
    margin-top: 38px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
}

.hash-output {
    min-width: 0;
    color: var(--forest);
    overflow-wrap: anywhere;
    font: 800 27px/1.45 ui-monospace, "Cascadia Code", Consolas, monospace;
    letter-spacing: 1px;
}

.hash-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0 0;
}

.hash-details div {
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.hash-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.hash-details dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

@media (max-width: 640px) {
    .hash-code-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .hash-output {
        font-size: 20px;
    }

    .hash-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
