.tc-tool-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #3b82f6; --p-text: #0f172a; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; }
.tc-header-main { font-size: 1.6rem; font-weight: 800; color: var(--p-text); margin-bottom: 8px; text-align: center; }
.tc-subtitle { color: #64748b; font-size: 0.95rem; padding-bottom: 20px; border-bottom: 1px solid var(--p-border); margin-bottom: 24px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.tc-layout { display: flex; flex-direction: column; gap: 24px; }
.tc-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media(max-width: 950px) { .tc-workspace { grid-template-columns: 1fr; } }

.tc-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important; }

.tc-live-dashboard { background: #f8fafc; border: 1px solid var(--p-border); border-radius: 16px; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.tc-live-title { font-weight: 700; color: #334155; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.tc-live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tc-live-item { display: flex; flex-direction: column; gap: 4px; background: #ffffff; border: 1px solid var(--p-border); padding: 12px 16px; border-radius: 12px; min-width: 0;}
.tc-live-label { font-size: 0.8rem; font-weight: 600; color: #64748b; }
.tc-live-val { font-size: 1.25rem; font-weight: 800; color: var(--p-primary); transition: color 0.2s; word-break: break-all; }
.tc-live-val:active { color: #1e3a8a; }

.tc-panel { display: flex; flex-direction: column; background: #ffffff; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; box-sizing: border-box; }
.tc-panel-title { font-size: 1.05rem; font-weight: 700; color: #334155; padding: 16px 20px; border-bottom: 1px solid var(--p-border); background: #f8fafc; margin: 0; }
.tc-panel-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; }

.tc-form-group { display: flex; flex-direction: column; gap: 8px; }
.tc-label { font-size: 0.9rem; font-weight: 600; color: #475569; }
.tc-help-text { font-size: 0.8rem; color: #94a3b8; }
.tc-link { font-size: 0.85rem; color: var(--p-primary); cursor: pointer; font-weight: 600; transition: 0.2s; }
.tc-link:hover { text-decoration: underline; }
.tc-quick-actions { display: flex; gap: 12px; margin-top: 4px; }

.tc-input-group { display: flex; gap: 12px; align-items: stretch; width: 100%; box-sizing: border-box;}
.tc-input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff; color: var(--p-text); font-size: 1rem; outline: none; transition: 0.2s; box-sizing: border-box; }
.tc-input:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.tc-btn-primary { background: var(--p-primary); color: white; border: none; padding: 0 20px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: 0.2s; white-space: nowrap; display: flex; align-items: center; justify-content: center; box-sizing: border-box;}
.tc-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2); }

.tc-result-box { display: flex; flex-direction: column; gap: 12px; background: #f1f5f9; padding: 20px; border-radius: 12px; border: 1px dashed #cbd5e1; box-sizing: border-box;}
.tc-result-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.tc-result-label { min-width: 110px; font-size: 0.85rem; font-weight: 600; color: #64748b; text-align: right; }
.tc-result-input { background: #ffffff; flex: 1; min-width: 0; color: var(--p-primary); font-weight: 600; cursor: text; }
.tc-btn-icon { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 6px; width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.tc-btn-icon:hover { background: #e2e8f0; border-color: #94a3b8; }

@media(max-width: 650px) {
    .tc-tool-wrapper { padding: 16px; }
    .tc-header-main { font-size: 1.25rem; line-height: 1.4; gap: 8px; }
    .tc-live-grid { grid-template-columns: 1fr; }
    .tc-input-group { flex-direction: column; }
    .tc-btn-primary { width: 100%; padding: 12px; }
    .tc-result-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .tc-result-label { min-width: auto; text-align: left; }
    .tc-panel-body { padding: 16px; }
}

[data-theme="dark"] .tc-tool-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .tc-header-main, [data-theme="dark"] .tc-live-title, [data-theme="dark"] .tc-panel-title { color: #f8fafc; }
[data-theme="dark"] .tc-live-dashboard { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .tc-live-item { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .tc-live-val { color: #60a5fa; }
[data-theme="dark"] .tc-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .tc-panel-title { background: #1e293b; border-bottom-color: #475569; }
[data-theme="dark"] .tc-label { color: #cbd5e1; }
[data-theme="dark"] .tc-input { background: #020617; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .tc-result-box { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .tc-result-input { background: #0f172a; color: #60a5fa; border-color: #334155; }
[data-theme="dark"] .tc-btn-icon { background: #334155; border-color: #475569; }
[data-theme="dark"] .tc-btn-icon:hover { background: #475569; border-color: #64748b; }