.tool-section {
    padding: 2rem 0 5rem;
    background: #fff;
}

/* ========== 模式切换栏 ========== */
.basex-mode-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.basex-mode-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-right: 0.25rem;
}
.basex-mode-btn {
    padding: 0.45rem 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.basex-mode-btn:hover {
    border-color: #818cf8;
    color: #4f46e5;
}
.basex-mode-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    font-weight: 600;
}

/* ========== 面板 ========== */
.basex-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.basex-panel-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.basex-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    cursor: pointer;
    outline: none;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}
.basex-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.basex-textarea {
    width: 100%;
    flex: 1;
    min-height: 160px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.85rem;
    color: #334155;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.basex-textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.basex-textarea::placeholder {
    color: #cbd5e1;
}

.basex-output {
    flex: 1;
    min-height: 160px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.85rem;
    color: #334155;
    background: #f8fafc;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-y: auto;
}
.basex-placeholder {
    color: #cbd5e1;
}

.basex-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}
.basex-char-count {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: auto;
}
.basex-status {
    font-size: 0.75rem;
    font-weight: 500;
}
.basex-status.success { color: #16a34a; }
.basex-status.error { color: #dc2626; }

/* ========== 示例卡片 ========== */
.basex-example-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
}
.basex-example-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basex-example-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}
.basex-example-tag:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #4f46e5;
}

/* ========== 格式说明卡片 ========== */
.basex-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
}
.basex-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}
.basex-info-item {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}
.basex-info-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    margin-bottom: 0.25rem;
}
.basex-info-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .tool-section { padding: 1.5rem 0 3rem; }
    .basex-info-grid { grid-template-columns: 1fr; }
    .basex-textarea, .basex-output { min-height: 120px; }
}
