:root {
    --primary-color: #3b82f6;   /* 蓝色 */
    --primary-dark: #2563eb;    /* 深蓝色 */
    --secondary-color: #1e40af; /* 更深的蓝色 */
    --accent-color: #4f46e5;    /* 紫色强调色 */
    --text-color: #1f2937;      /* 主要文本颜色 */
    --light-gray: #f3f4f6;      /* 浅灰色背景 */
    --border-color: #e5e7eb;    /* 边框颜色 */
}

.tool-panel {
    max-width: 900px;
    margin: 2rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tool-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.tool-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
}

.tool-content {
    padding: 1rem;
}

.input-container {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    font-family: 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.character-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 0.8rem;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
}

.tools-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.tools-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: var(--light-gray);
}

.tab-btn.active {
    background-color: white;
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: inset 0 -2px 0 var(--primary-color);
}

.tab-content {
    padding: 1rem;
    min-height: 120px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.transform-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.transform-options button {
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.transform-options button:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.transform-options button:active {
    background-color: #dae0e5;
}

.transform-options button i {
    color: var(--primary-color);
}

/* 高级选项样式 */
.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.find-replace-inputs,
.regex-inputs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.find-replace-inputs input,
.regex-inputs input {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.find-replace-inputs input:focus,
.regex-inputs input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-buttons,
.special-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 页脚样式 */
.footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.copyright {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: #888;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tool-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .find-replace-inputs button,
    .regex-inputs button {
        flex: 1;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.warning {
    background-color: #f59e0b;
}

.notification.error {
    background-color: #ef4444;
}

.function-btn {
    padding: 0.5rem 1rem;
    background-color: var(--light-gray, #f3f4f6);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.function-btn:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.function-btn:active {
    background-color: #dae0e5;
}

.function-btn i {
    color: var(--primary-color, #3b82f6);
}