/* 自定义样式 */

/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 表单样式 */
.form-section {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.section-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-color);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--primary-color);
}

/* 表单控件样式 */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-help {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.15s ease-in-out;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-group-custom {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* 命令输出样式 */
.command-output {
    background-color: #f8f9fa;
    color: #212529;
    border-radius: 0.5rem;
    padding: 1em;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    position: relative;
    border: 1px solid #dee2e6;
    margin: 0;
}

.command-line {
    margin: 0.3rem 0;
    padding: 0.2rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
}

.command-line:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
}

.result-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.copy-btn:hover {
    opacity: 1;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 徽章样式 */
.badge {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
}

.alert-info {
    background-color: #e7f3ff;
    color: #0c5460;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0a3622;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-danger {
    background-color: #f8d7da;
    color: #58151c;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-section {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .btn-group-custom {
        flex-direction: column;
        align-items: stretch;
    }
    
    .command-output {
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    .copy-btn {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条样式 */
.command-output::-webkit-scrollbar {
    height: 8px;
}

.command-output::-webkit-scrollbar-track {
    background: #4a5568;
    border-radius: 4px;
}

.command-output::-webkit-scrollbar-thumb {
    background: #718096;
    border-radius: 4px;
}

.command-output::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 页脚样式 */
footer {
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

/* Toast容器样式 */
.toast-container {
    z-index: 1055;
}

.toast {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 接口组合输入样式 */
.interface-combo-input {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.interface-type-selector .btn-group {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.interface-type-selector .btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    margin: 0.125rem;
}

.interface-type-selector .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.interface-preview {
    background-color: #e9ecef;
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-height: 2rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
    word-break: break-all;
}

.interface-preview.border-success {
    border-color: var(--success-color);
    background-color: #d1e7dd;
}

.interface-preview.border-danger {
    border-color: var(--danger-color);
    background-color: #f8d7da;
}

.interface-preview .text-success {
    color: var(--success-color) !important;
    font-weight: 500;
}

.interface-preview .text-danger {
    color: var(--danger-color) !important;
    font-weight: 500;
}

.interface-preview .text-muted {
    color: var(--secondary-color) !important;
}

.interface-preview i {
    margin-right: 0.25rem;
}

/* 接口组合输入响应式样式 */
@media (max-width: 768px) {
    .interface-type-selector .btn-group {
        justify-content: center;
        width: 100%;
    }

    .interface-type-selector .btn-sm {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .interface-combo-input {
        padding: 0.75rem;
    }
}
