/* 工具页面通用样式 - 暗色主题 */

.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2rem;
    color: #2d7ee7;
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.1rem;
    color: #94a3b8;
}

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    height: 600px;
}

/* 针对单输入框工具的特殊样式 */
.regex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    height: 200px;
}

/* 三输入框工具样式 */
.triple-editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    height: 200px;
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 800px;
    }
    
    .regex-container,
    .triple-editor-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.editor-panel {
    border: 1px solid rgba(45, 126, 231, 0.2);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(22, 30, 45, 0.6);
}

.editor-header {
    background-color: rgba(22, 30, 45, 0.9);
    padding: 10px 15px;
    border-bottom: 1px solid rgba(45, 126, 231, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h3 {
    margin: 0;
    color: #2d7ee7;
}

.editor-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
}

/* 为文本编辑器添加更大的高度 */
.text-body {
    height: 500px !important;
}

textarea {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    padding: 15px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: #1a202c;
    color: #e2e8f0;
}

textarea:focus {
    outline: none;
    background-color: #111827;
}

.controls {
    text-align: center;
    margin: 20px 0;
}

.btn-group {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 工具页面按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: linear-gradient(135deg, #2d7ee7, #4fd1c5);
    color: white;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(45, 126, 231, 0.2);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 126, 231, 0.3);
}

.error-message {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
}

.status {
    text-align: center;
    margin: 10px 0;
    color: #22c55e;
    font-weight: 500;
}

/* 工具概览页面专用样式 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(45, 126, 231, 0.5);
}

.tool-card h3 {
    color: #2d7ee7;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #cbd5e1;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 优化的匹配结果容器 */
.matches-container {
    margin-top: 20px;
    border: 1px solid rgba(45, 126, 231, 0.2);
    border-radius: 8px;
    padding: 15px;
    background-color: rgba(22, 30, 45, 0.6);
}

.matches-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2d7ee7;
}

.match-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(45, 126, 231, 0.1);
    color: #cbd5e1;
}

.match-item:last-child {
    border-bottom: none;
}

/* 选项区域样式 */
.options {
    padding: 15px;
}

.option {
    margin-bottom: 10px;
}

.option input[type="checkbox"] {
    margin-right: 8px;
}
.option label {
    vertical-align: top;
}