/* tools.css — 工具箱 */

.tool-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tool-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.25); color: var(--text-soft); font-size: 0.82rem; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
[data-theme="dark"] .tool-tab { background: rgba(255,255,255,0.06); }
.tool-tab:hover { color: var(--accent); border-color: var(--accent); }
.tool-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tool-panel { display: none; }
.tool-panel.active { display: block; }

/* Markdown 速记板 */
.md-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.md-input { width: 100%; min-height: 240px; padding: 14px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.3); color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; resize: vertical; }
[data-theme="dark"] .md-input { background: rgba(255,255,255,0.08); }
.md-input:focus { outline: none; border-color: var(--accent); }
.md-preview { min-height: 240px; padding: 14px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.2); overflow-y: auto; max-height: 400px; }
[data-theme="dark"] .md-preview { background: rgba(255,255,255,0.05); }

/* 番茄钟 */
.pomo-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0; position: relative; }
.pomo-ring { transform: rotate(0deg); }
.pomo-time { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.8rem; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.pomo-label { font-size: 0.82rem; color: var(--text-soft); margin-top: 60px; }
.pomo-ctrl { display: flex; gap: 10px; justify-content: center; }
.pomo-done { text-align: center; font-size: 0.8rem; color: var(--text-soft); margin-top: 12px; }

/* 转换器 */
.conv-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.conv-sub { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.2); color: var(--text-soft); font-size: 0.78rem; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
[data-theme="dark"] .conv-sub { background: rgba(255,255,255,0.06); }
.conv-sub.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.conv-pane { display: none; flex-direction: column; gap: 8px; }
.conv-pane.active { display: flex; }
.conv-pane label { font-size: 0.74rem; color: var(--text-soft); margin-top: 6px; }
.conv-pane textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.3); color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 0.82rem; resize: vertical; }
[data-theme="dark"] .conv-pane textarea { background: rgba(255,255,255,0.08); }
.conv-pane textarea:focus { outline: none; border-color: var(--accent); }
.conv-pane textarea[readonly] { opacity: 0.8; }

/* AI 贴士 */
.tip-box { padding: 22px; border-radius: 14px; background: rgba(255,255,255,0.2); border: 1px solid var(--card-border); font-size: 1rem; line-height: 1.7; color: var(--text); min-height: 80px; margin-bottom: 14px; }
[data-theme="dark"] .tip-box { background: rgba(255,255,255,0.06); }
.tip-box.show { animation: tipIn 0.4s ease; }
@keyframes tipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tip-ctrl { display: flex; gap: 10px; }

@media (max-width: 768px) {
    .md-wrap { grid-template-columns: 1fr; }
    .md-input, .md-preview { min-height: 180px; }
    .tool-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tool-tab { white-space: nowrap; }
    .conv-subs { overflow-x: auto; flex-wrap: nowrap; }
    .conv-sub { white-space: nowrap; }
}
