.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

.tool-header h1,
.tool-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.tool-header p {
    color: #6b7280;
}

.tool-wrapper {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s;
}

.tool-wrapper:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.tool-input textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.tool-input textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.tool-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 2px 8px rgba(108,117,125,0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.4);
}

.tool-output {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    min-height: 100px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s;
}

.tool-output:focus-within {
    border-color: #667eea;
}

.tool-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tool-output .error {
    color: #dc3545;
    padding: 1rem;
    background: #fee2e2;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
}

.tool-output pre {
    background: transparent;
    padding: 0;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* 加载动画 */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(102,126,234,0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .tool-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tool-header h2 {
        font-size: 1.5rem;
    }
    
    .tool-wrapper {
        padding: 1.5rem;
    }
    
    .tool-input textarea {
        min-height: 150px;
        font-size: 0.9375rem;
    }
    
    .tool-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .tool-output {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.25rem;
    }
    
    .tool-wrapper {
        padding: 1rem;
    }
    
    .tool-input textarea {
        min-height: 120px;
        padding: 0.75rem;
    }
}

