/* 日志过滤工具页面特定样式 */
.filter-controls {
    margin-bottom: 1rem;
}

.filter-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-input-group input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font-family: inherit;
}

.default-filters {
    margin: 20px 0;
}

.filter-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preset-filter {
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-filter:hover {
    background: var(--header-bg);
    transform: translateY(-2px);
}

.active-filters {
    margin-top: 20px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.filter-tag {
    display: flex;
    align-items: center;
    background: var(--column-tag-bg);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-tag.active {
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    color: white;
}

.filter-tag.inactive {
    opacity: 0.6;
    background: var(--column-removed-bg);
}

.filter-name {
    font-weight: bold;
    margin-right: 8px;
}

.filter-regex {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    margin-right: 8px;
}

.filter-toggle, .filter-remove {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    padding: 0 5px;
    margin-left: 5px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toggle:hover, .filter-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

.no-filters {
    color: var(--footer-text);
    font-style: italic;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-stats {
    font-weight: bold;
    color: var(--text-color);
}

.filtered-logs {
    line-height: 1.5;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--code-text);
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

/* 代码高亮样式 */
.filtered-logs .line-number {
    color: #6a9955;
    user-select: none;
    margin-right: 10px;
}

.filtered-logs .error {
    color: #f44747;
    font-weight: bold;
}

.filtered-logs .warning {
    color: #ff8c00;
}

.filtered-logs .info {
    color: #4ec9b0;
}

.filtered-logs .debug {
    color: #9cdcfe;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-input-group {
        flex-direction: column;
    }
    
    .filter-input-group input {
        min-width: 100%;
    }
    
    .filter-presets {
        flex-direction: column;
    }
    
    .preset-filter {
        width: 100%;
    }
}

/* 步骤信息不同部分的颜色 */
.step-main {
    color: #ff4444; /* 红色 - 当前步骤 */
}

.step-key {
    color: #44ff44; /* 绿色 - 步骤key */
}

.step-input {
    color: #4444ff; /* 蓝色 - 入参规则 */
}

.step-output {
    color: #ff44ff; /* 紫色 - 回参规则 */
}

.step-path {
    color: #ffff44; /* 黄色 - 接口路径 */
}

.step-service {
    color: #44ffff; /* 青色 - 关联服务 */
}

/* 确保代码容器支持HTML内容 */
.code-container pre {
    white-space: pre-wrap;
}

.filtered-logs {
    white-space: pre-wrap;
}
/* 过滤器匹配文本样式 */
.filter-match {
    padding: 2px 4px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 亮色主题下的额外样式 */
body:not(.dark-theme) .filter-match {
    background-color: rgba(0, 0, 0, 0.1);
}

/* 暗色主题 */
body.dark-theme {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-theme .filter-match {
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 亮色主题 */
body:not(.dark-theme) .filter-match {
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}