/* ============ IT 工具（纯前端）通用样式 ============ */
.tool-hero {
    text-align: center; padding: 40px 20px 28px; max-width: 1200px; margin: 0 auto;
}
.tool-hero h1 { font-size: 26px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; }
.tool-hero p { font-size: 14px; color: #888; line-height: 1.8; }

.tool-body {
    max-width: 1200px; margin: 0 auto 40px; padding: 0 20px;
}
.tool-card {
    background: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.tool-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #f0f0f0;
}
.tool-btn {
    padding: 7px 16px; border-radius: 6px; font-size: 13px;
    border: 1px solid #d9d9d9; background: #fff; color: #555;
    cursor: pointer; transition: all .15s; font-family: inherit; line-height: 1.6;
}
.tool-btn:hover { border-color: #1b8efc; color: #1b8efc; }
.tool-btn.primary {
    background: linear-gradient(135deg, #1b8efc, #4774f0);
    border-color: #1b8efc; color: #fff;
}
.tool-btn.primary:hover { opacity: .9; color: #fff; }
.tool-btn.danger:hover { border-color: #ff4d4f; color: #ff4d4f; }
.tool-btn:disabled { opacity: .5; cursor: not-allowed; }

.tool-meta { margin-left: auto; font-size: 12px; color: #999; }
.tool-meta .ok { color: #52c41a; }
.tool-meta .err { color: #ff4d4f; }

/* 状态提示条 */
.tool-status {
    margin-top: 14px; padding: 10px 14px; border-radius: 8px;
    border: 1px solid #ffccc7; background: #fff2f0; color: #ff4d4f;
    font-size: 13px; line-height: 1.6; word-break: break-all; white-space: normal;
}
.tool-status.ok {
    border-color: #b7eb8f; background: #f6ffed; color: #389e0d;
}
.tool-status.info {
    border-color: #91d5ff; background: #e6f7ff; color: #096dd9;
}

/* 双栏文本编辑区 */
.editor-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 双向转换：中间方向列，直观展示两侧互转方向 */
.dual-wrap { display: grid; grid-template-columns: 1fr 72px 1fr; gap: 16px; }
.dual-dir { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #b0b6c0; }
.dual-dir .arr { font-size: 20px; line-height: 1; }
.dual-dir .cap { font-size: 12px; text-align: center; line-height: 1.5; }
@media (max-width: 900px) { .dual-wrap { grid-template-columns: 1fr; } .dual-dir { display: none; } }
.editor-box h3 {
    font-size: 13px; font-weight: 500; color: #888; margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.editor-box h3 .badge {
    font-size: 11px; padding: 1px 7px; border-radius: 10px;
    background: #f0f0f0; color: #999; font-weight: normal;
}
.editor-box textarea {
    width: 100%; height: 420px; padding: 14px; border-radius: 8px;
    border: 1px solid #e8eaed; font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 13px; line-height: 1.6; resize: vertical;
    background: #fafbfc; color: #222; transition: border-color .15s; box-sizing: border-box;
}
.editor-box textarea:focus { outline: none; border-color: #1b8efc; background: #fff; }
.editor-box textarea.error { border-color: #ff4d4f; background: #fff2f0; }
.editor-box textarea.readonly { background: #f5f7fa; }

/* 表单字段 */
.tool-field { margin-bottom: 16px; }
.tool-field label {
    display: block; font-size: 13px; color: #555; font-weight: 500; margin-bottom: 8px;
}
.tool-field input[type="text"],
.tool-field input[type="number"],
.tool-field input[type="password"],
.tool-field select {
    width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid #e8eaed;
    font-size: 13px; color: #222; background: #fafbfc; box-sizing: border-box;
    font-family: inherit; transition: border-color .15s;
}
.tool-field input:focus, .tool-field select:focus { outline: none; border-color: #1b8efc; background: #fff; }
.tool-field .tool-hint { font-size: 12px; color: #999; margin-top: 6px; line-height: 1.6; }
.tool-field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.tool-field-row .tool-field { flex: 1 1 200px; }

/* 单列结果区 */
.output-area {
    margin-top: 16px;
}
.output-area h3 {
    font-size: 13px; font-weight: 500; color: #888; margin-bottom: 8px;
}
.output-area pre, .output-area .output-box {
    min-height: 96px; padding: 14px; border-radius: 8px; border: 1px solid #e8eaed;
    background: #fafbfc; color: #222; font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 13px; line-height: 1.7; word-break: break-all; white-space: pre-wrap; margin: 0;
}
.output-area .output-box.empty { color: #bbb; }

/* 时间戳工具：结果行样式 */
.ts-row {
    display: grid;
    grid-template-columns: 130px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f5;
    transition: background .15s;
}
.ts-row:last-child { border-bottom: none; }
.ts-row:hover { background: #f8f9fb; }
.ts-row-primary {
    background: #f0f7ff;
    border-bottom-color: #d6e8ff;
}
.ts-row-primary:hover { background: #e8f3ff; }
.ts-label {
    font-size: 12px; color: #888; font-weight: 500;
    white-space: nowrap;
}
.ts-value {
    font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 14px; color: #1a2233; font-weight: 600;
    word-break: break-all;
}
.ts-row-primary .ts-value { color: #1b6def; font-size: 15px; }
.ts-tag {
    font-size: 11px; padding: 1px 7px; border-radius: 10px;
    background: #eef1f6; color: #8a94a6; white-space: nowrap;
}
.ts-row-primary .ts-tag { background: #d6e8ff; color: #1b6def; }
.ts-copy {
    font-size: 12px; padding: 2px 10px; border-radius: 6px;
    border: 1px solid #e0e3e8; background: #fff; color: #888;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.ts-copy:hover { border-color: #1b8efc; color: #1b8efc; }
.ts-copy:active { transform: scale(0.96); }

/* 时间戳工具：实时时间戳条 */
.ts-live {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f9ff 100%);
    border: 1px solid #d6e8ff; margin-bottom: 20px;
}
.ts-live-item { display: flex; align-items: center; gap: 8px; }
.ts-live-label { font-size: 12px; color: #6a9fd4; white-space: nowrap; }
.ts-live-item code {
    font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 14px; color: #1b6def; font-weight: 600;
}
.ts-mini-btn {
    font-size: 11px; padding: 2px 8px; border-radius: 4px;
    border: 1px solid #d9d9d9; background: #fff; color: #888;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.ts-mini-btn:hover { border-color: #1b8efc; color: #1b8efc; }
.ts-mini-btn:active { transform: scale(0.95); }
.ts-mini-fill { margin-left: auto; border-color: #1b8efc; color: #1b8efc; font-weight: 500; }

/* 时间戳工具：双向转换输入区 */
.ts-convert-wrap {
    display: grid; grid-template-columns: 1fr 60px 1fr; gap: 12px;
    align-items: start; margin-bottom: 20px;
}
.ts-input-card {
    border: 1px solid #e8eaed; border-radius: 8px; padding: 12px 14px;
    background: #fafbfc; transition: border-color .15s;
}
.ts-input-card:focus-within { border-color: #1b8efc; background: #fff; }
.ts-input-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ts-input-title { font-size: 13px; font-weight: 600; color: #333; }
.ts-input-badge {
    font-size: 11px; padding: 1px 7px; border-radius: 10px;
    background: #eef1f6; color: #8a94a6;
}
.ts-input-card input[type="text"] {
    width: 100%; padding: 10px 12px; border-radius: 6px;
    border: 1px solid #e0e3e8; background: #fff;
    font-family: "SF Mono", Consolas, Monaco, monospace;
    font-size: 14px; color: #1a2233; box-sizing: border-box;
    transition: border-color .15s;
}
.ts-input-card input[type="text"]:focus { outline: none; border-color: #1b8efc; }
.ts-input-hint { font-size: 12px; color: #b0b6c0; margin-top: 6px; }

.ts-convert-dir {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; padding-top: 38px;
}
.ts-dir-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid #d9d9d9; background: #fff; color: #1b8efc;
    font-size: 16px; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center;
}
.ts-dir-btn:hover { border-color: #1b8efc; background: #1b8efc; color: #fff; }
.ts-dir-btn:active { transform: scale(0.93); }

/* 时间戳工具：结果区 */
.ts-result-section { margin-top: 4px; }
.ts-result-head {
    font-size: 13px; font-weight: 600; color: #555; margin-bottom: 10px;
}
.ts-result-body {
    border: 1px solid #e8eaed; border-radius: 8px; overflow: hidden;
    background: #fff;
}

@media (max-width: 900px) {
    .editor-wrap { grid-template-columns: 1fr; }
    .ts-convert-wrap { grid-template-columns: 1fr; }
    .ts-convert-dir { flex-direction: row; padding-top: 0; }
}