/* 正则表达式工具专用样式 */
.regex-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    margin: auto;
    width: 80%;
}

.input-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.input-group {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-field label {
    font-weight: 500;
    color: #2c3e50;
}

.input-field input, .input-field textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item input {
    margin: 0;
}

.checkbox-item label {
    font-size: 0.9rem;
}

.results-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.results-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    background: #f9f9f9;
    min-height: 200px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.match {
    background-color: #ffeaa7;
    padding: 2px 0;
    border-radius: 2px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.results-table th {
    background-color: #2c3e50;
    color: white;
    text-align: left;
    padding: 10px;
}

.results-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.results-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.regex-info {
    background: #e8f4fc;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

.regex-info h4 {
    margin-top: 0;
    color: #2c3e50;
}

.regex-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.regex-info li {
    margin-bottom: 5px;
}

.reference-link {
    color: #3498db;
    text-decoration: none;
}

.reference-link:hover {
    text-decoration: underline;
}

.regex-cheatsheet {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.cheatsheet-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.cheatsheet-content {
    display: none;
    margin-top: 15px;
}

.cheatsheet-content.active {
    display: block;
}

.cheatsheet-table {
    width: 100%;
    border-collapse: collapse;
}

.cheatsheet-table th, .cheatsheet-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.cheatsheet-table th {
    background-color: #f5f5f5;
}

.cheatsheet-table code {
    background: #f7f7f7;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .cheatsheet-table {
        font-size: 0.85rem;
    }
}