/* 工具箱通用样式 */

/* 工具容器 - 使用 Bootstrap 的 container-xl 类，这里只保留内部元素样式 */
.container-xl .tool-header {
    padding: 20px 0 0 0;
    margin-bottom: 20px;
}

.container-xl .tool-header .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.container-xl .tool-content {
    margin-bottom: 30px;
}

/* 工具分类 */
.tool-category h3 {
    color: var(--accent-color1);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color1);
    padding-bottom: 10px;
}

.tool-item .card {
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.tool-item .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tool-item .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tool-item .card-title a {
    color: var(--accent-color2);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tool-item .card-title a:hover,
.tool-item .card-title a:active,
.tool-item .card-title a:focus {
    color: var(--accent-color1);
    text-decoration: none;
}

.tool-item .card-text {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* 代码区域 */
.font-monospace {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* 拖拽区域 */
.drag-over {
    border: 2px dashed var(--accent-color1) !important;
    background-color: #f8f9fa;
}

/* 相关工具 */
.tool-related {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.tool-related h4 {
    margin-bottom: 20px;
    color: var(--accent-color1);
    font-weight: 600;
}

.tool-related .card {
    transition: all 0.3s ease;
    border: none;
}

.tool-related .card-title a {
    color: var(--accent-color2);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tool-related .card-title a:hover,
.tool-related .card-title a:active,
.tool-related .card-title a:focus {
    color: var(--accent-color1);
    text-decoration: none;
}

/* 按钮组 */
.btn-group .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 表单控件 */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color1);
    box-shadow: 0 0 0 0.2rem rgba(var(--accent-color1-rgb, 0, 123, 255), 0.25);
}

/* 代码高亮 */
pre {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    display: block;
    color: #333;
    font-size: 0.875rem;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: var(--accent-color1);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示消息 */
.alert {
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 10px 0;
    }
    
    .tool-category h3 {
        font-size: 1.25rem;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 100px;
    }
    
    .font-monospace {
        font-size: 12px;
    }
    
    .tool-item .card-title {
        font-size: 0.9rem;
    }
    
    .tool-item .card-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .tool-category h3 {
        font-size: 1.1rem;
    }
    
    .tool-item {
        margin-bottom: 0.75rem;
    }
    
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* 打印样式 */
@media print {
    .tool-header,
    .tool-related,
    .btn,
    .breadcrumb {
        display: none;
    }
    
    .tool-container {
        padding: 0;
    }
}
