.tool-regex {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.tool-regex .regex-card {
    border: none;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border-left: 4px solid #0ea5e9;
}

.tool-regex .regex-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.tool-regex .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
}

.tool-regex .form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.tool-regex .regex-pattern,
.tool-regex .regex-highlight {
    font-family: Consolas, Monaco, monospace;
}

.tool-regex .btn-regex-go {
    background: #0ea5e9;
    color: #fff !important;
    border: none;
    font-weight: 600;
    border-radius: 0.5rem;
}

.tool-regex .btn-regex-go:hover,
.tool-regex .btn-regex-go:focus {
    background: #0284c7;
    color: #fff !important;
}

.tool-regex .regex-highlight {
    min-height: 6rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
}

.tool-regex .regex-highlight mark {
    background: #bbf7d0;
    color: #14532d;
    border-radius: 0.2rem;
    padding: 0 0.15em;
}

.tool-regex .regex-error {
    color: #b91c1c;
    font-weight: 600;
}

.tool-regex .regex-match {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.tool-regex .regex-match strong {
    display: block;
    margin-bottom: 0.25rem;
}

.tool-regex .regex-group-line {
    margin: 0;
    color: #334155;
}

@media (max-width: 575.98px) {
    .tool-regex .d-flex.gap-2 .btn {
        width: 100%;
    }
}
