/* =========================================================
   在线 RC6 加密解密 —— 纯前端工具样式
   作用域：.rc6-tool
   ========================================================= */

.rc6-tool {
    --rc6-brand: #0f766e;
    --rc6-brand-dark: #0b5d57;
    --rc6-brand-weak: #eaf3f2;
    --rc6-line: #e3e8ee;
    --rc6-ink: #0f172a;
    --rc6-ink2: #475569;
    --rc6-ink3: #94a3b8;
    --rc6-err-bg: #fef2f2;
    --rc6-err-ink: #b91c1c;
    --rc6-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    width: 100%;
    color: var(--rc6-ink);
    font-size: 13px;
    line-height: 1.6;
}

.rc6-tool [hidden] {
    display: none !important;
}

.rc6-tool *,
.rc6-tool *::before,
.rc6-tool *::after {
    box-sizing: border-box;
}

.rc6-tool button {
    -webkit-tap-highlight-color: transparent;
}

.rc6-tool button:focus {
    outline: none;
}

.rc6-tool button:focus-visible {
    outline: 2px solid var(--rc6-brand);
    outline-offset: 2px;
}

.rc6-card {
    margin-bottom: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--rc6-line);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.rc6-card-title {
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rc6-ink);
    background: #f8fafc;
    border-bottom: 1px solid var(--rc6-line);
}

.rc6-card-body {
    padding: 16px;
}

.rc6-input,
.rc6-select,
.rc6-textarea {
    font-family: inherit;
    color: var(--rc6-ink);
    background: #fff;
    border: 1px solid var(--rc6-line);
    border-radius: 7px;
    outline: none !important;
    box-sizing: border-box;
}

.rc6-input:focus,
.rc6-select:focus,
.rc6-textarea:focus {
    border-color: var(--rc6-brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}

.rc6-textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    padding: 11px 12px;
    font-family: var(--rc6-mono);
    font-size: 12.5px;
    line-height: 1.7;
    resize: vertical;
    word-break: break-all;
}

.rc6-textarea-lg {
    min-height: 150px;
}

.rc6-textarea[readonly] {
    background: #f8fafc;
}

.rc6-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 14px;
}

.rc6-group {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.rc6-group-label {
    display: flex;
    flex: 0 0 84px;
    align-items: center;
    justify-content: center;
    height: 40px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rc6-ink2);
    background: #fff;
    border: 1px solid var(--rc6-line);
    border-right: 0;
    border-radius: 7px 0 0 7px;
}

.rc6-group .rc6-input,
.rc6-group .rc6-select {
    flex: 1 1 auto;
    width: 0;
    height: 40px;
    border-radius: 0 7px 7px 0;
}

.rc6-select:disabled {
    color: var(--rc6-ink3);
    background: #f8fafc;
    cursor: not-allowed;
}

.rc6-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rc6-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rc6-ink2);
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--rc6-line);
    border-radius: 7px;
    cursor: pointer;
    outline: none !important;
}

.rc6-btn:hover {
    color: var(--rc6-brand);
    border-color: var(--rc6-brand);
}

.rc6-btn-primary {
    color: #fff;
    background: var(--rc6-brand);
    border-color: var(--rc6-brand);
}

.rc6-btn-primary:hover {
    color: #fff;
    background: var(--rc6-brand-dark);
    border-color: var(--rc6-brand-dark);
}

.rc6-btn-quiet {
    font-weight: 400;
    color: var(--rc6-ink3);
    border-color: transparent;
    background: transparent;
}

.rc6-btn-quiet:hover {
    color: var(--rc6-brand);
    border-color: var(--rc6-line);
    background: #fff;
}

.rc6-status {
    margin-left: auto;
    font-size: 12px;
    color: var(--rc6-ink3);
}

.rc6-hint {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--rc6-ink3);
}

.rc6-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--rc6-err-ink);
    background: var(--rc6-err-bg);
    border: 1px solid #fecaca;
    border-radius: 7px;
}

.rc6-notice.is-info {
    color: var(--rc6-brand-dark);
    background: var(--rc6-brand-weak);
    border-color: #a7d8d1;
}

.rc6-notice.is-info .rc6-notice-close {
    color: var(--rc6-brand-dark);
}

.rc6-notice.is-info .rc6-notice-close:hover {
    background: rgba(15, 118, 110, .1);
}

.rc6-notice-close {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    font-size: 17px;
    line-height: 20px;
    color: var(--rc6-err-ink);
    text-align: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.rc6-notice-close:hover {
    background: rgba(185, 28, 28, .1);
}

.rc6-fallback-msg {
    margin-bottom: 12px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: var(--rc6-brand-dark);
    background: var(--rc6-brand-weak);
    border-radius: 6px;
}

.rc6-selftest {
    margin-top: 14px;
    padding: 10px 12px;
    font-family: var(--rc6-mono);
    font-size: 11.5px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--rc6-brand-dark);
    background: var(--rc6-brand-weak);
    border-radius: 6px;
}

.rc6-selftest.is-error {
    color: var(--rc6-err-ink);
    background: var(--rc6-err-bg);
}

@media (max-width: 900px) {
    .rc6-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .rc6-card-body { padding: 14px; }
    .rc6-groups { grid-template-columns: 1fr; }
    .rc6-actions { align-items: stretch; flex-direction: column; }
    .rc6-btn { width: 100%; }
    .rc6-status { margin-left: 0; }
    .rc6-group-label { flex-basis: 76px; }
    .rc6-textarea { min-height: 150px; }
}
