/* 全局样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

.container-fluid {
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.row {
    margin: 0;
}

/* 左侧语言选择栏 - UE5风格 */
.language-sidebar {
    background-color: #1a1a1a;
    border-right: 1px solid #333;
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-title {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.language-list {
    list-style: none;
    padding: 0;
}

.language-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #b0b0b0;
    font-size: 14px;
}

.language-item:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.language-item.active {
    background-color: #0084ff;
    color: white;
}

.language-item i {
    margin-right: 10px;
    font-size: 16px;
}

/* 主内容区域 - UE5风格 */
.main-content {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.version-graph-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #242424;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100%;
    overflow: hidden;
}

.graph-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.graph-header h4 {
    margin: 0;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
}

.graph-controls .btn {
    background-color: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 6px 12px;
    font-size: 12px;
}

.graph-controls .btn:hover {
    background-color: #333;
    border-color: #555;
}

.version-graph {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* vis.js网络图容器需要100%高度 */
.version-graph > div {
    width: 100% !important;
    height: 100% !important;
}

/* UE5蓝图风格的节点 */
.vis-tooltip {
    background-color: #2a2a2a !important;
    border: 1px solid #444 !important;
    color: #e0e0e0 !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

/* 模态框样式 - UE5风格 */
.modal-xxl {
    max-width: 90%;
}

.modal-content {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    height: 85vh;
}

.modal-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #444;
    padding: 12px 20px;
}

.modal-header .modal-title {
    color: #e0e0e0;
    font-size: 16px;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.6;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    background-color: #2a2a2a;
    color: #e0e0e0;
    padding: 20px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

.modal-body > .row {
    height: 100%;
}

.form-label {
    color: #b0b0b0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.prompt-textarea {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 12px;
    min-height: 500px;
    resize: vertical;
}

.prompt-textarea:focus {
    background-color: #1a1a1a;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
    color: #fff;
}

.form-select {
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 8px 12px;
}

.form-select:focus {
    background-color: #1a1a1a;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
    color: #fff;
}

/* 版本信息面板 */
.version-info {
    background-color: #1a1a1a;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #444;
}

.version-info h6 {
    color: #e0e0e0;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 14px;
}

.version-info dl {
    margin: 0;
}

.version-info dt {
    color: #808080;
    font-weight: 400;
    margin-bottom: 4px;
    font-size: 12px;
}

.version-info dd {
    color: #e0e0e0;
    margin-bottom: 12px;
    word-break: break-all;
    font-size: 13px;
}

/* 测试进度 */
.test-progress {
    background-color: #1a1a1a;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #444;
}

.test-progress h6 {
    color: #e0e0e0;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 14px;
}

.test-progress p {
    color: #e0e0e0 !important;
}

.progress {
    background-color: #333;
    height: 6px;
    border-radius: 3px;
}

.progress-bar {
    background-color: #0084ff;
}

/* 测试历史 */
.test-history {
    background-color: #1a1a1a;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #444;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.test-history h6 {
    color: #e0e0e0;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 14px;
}

.test-history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.test-history-list p {
    color: #e0e0e0 !important;
}

.test-history-item {
    background-color: #242424;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

.test-history-item:hover {
    border-color: #444;
    background-color: #2a2a2a;
}

.test-history-item .model-name {
    color: #0084ff;
    font-weight: 500;
    margin-bottom: 4px;
}

.test-history-item .test-time {
    color: #808080;
    font-size: 12px;
}

.test-history-item .bleurt-score {
    color: #00a651;
    font-weight: 500;
    float: right;
}

/* 按钮样式 - UE5风格 */
.btn {
    border-radius: 4px;
    font-weight: 400;
    padding: 8px 16px;
    transition: all 0.2s ease;
    font-size: 13px;
    text-transform: none;
}

.btn-primary {
    background-color: #0084ff;
    border: none;
    color: white;
}

.btn-primary:hover {
    background-color: #0074e0;
}

.btn-success {
    background-color: #00a651;
    border: none;
    color: white;
}

.btn-success:hover {
    background-color: #008f46;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #444;
    color: #b0b0b0;
}

.btn-outline-secondary:hover {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}

/* 徽章样式 */
.badge {
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.badge.bg-primary {
    background-color: #0084ff !important;
}

/* 文本颜色覆盖 */
.text-muted {
    color: #e0e0e0 !important;
}

.text-danger {
    color: #ff5555 !important;
}

.small {
    color: #e0e0e0 !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .modal-xxl {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .language-sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
        max-height: 200px;
    }

    .main-content {
        height: calc(100vh - 200px);
    }

    .container-fluid {
        height: auto;
        overflow-y: auto;
    }

    .row {
        flex-direction: column;
    }
}

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

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

/* 防止警告信息导致布局问题 */
.alert {
    margin: 0;
}

.alert-warning {
    background-color: #3a3a1a;
    border: 1px solid #666633;
    color: #ffff99;
}

/* 确保vis-network容器正确显示 */
.vis-network:focus {
    outline: none;
}

/* 自定义滚动条 - UE5风格 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 测试详情表格样式 */
#testDetailModal .modal-body {
    padding: 0;
}

#testDetailModal .table {
    margin-bottom: 0;
}

#testDetailModal .table th {
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
    z-index: 10;
}

#testDetailModal .table-success {
    --bs-table-bg: rgba(0, 166, 81, 0.2);
}

#testDetailModal .table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.2);
}

#testDetailModal .table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.2);
}

.test-history-item .btn-link {
    color: #0084ff;
    text-decoration: none;
}

.test-history-item .btn-link:hover {
    color: #0074e0;
}

/* 自定义数据集上传样式 */
.custom-dataset-section {
    background-color: #242424;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
}

.custom-dataset-section .form-label {
    color: #0084ff;
    font-weight: 500;
}

.custom-dataset-section .input-group {
    margin-bottom: 8px;
}

.custom-dataset-section .form-control {
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
}

.custom-dataset-section .form-control:focus {
    background-color: #1a1a1a;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.2);
    color: #fff;
}

.custom-dataset-section .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.custom-dataset-section .btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

/* 下载按钮样式 */
#downloadResultBtn {
    font-size: 13px;
}

/* 右键菜单样式 */
#contextMenu {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#contextMenu .text-danger {
    color: #ff5555 !important;
}

#contextMenu .text-danger:hover {
    background-color: rgba(255, 85, 85, 0.2) !important;
}

/* 备注气泡样式（如果需要更美观的备注显示） */
.node-note {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    position: absolute;
    transform: translateY(-100%) translateY(-8px);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.node-note::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.9);
}
/* 自定义术语库上传样式 */
.custom-glossary-section {
    background-color: #242424;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.custom-glossary-section .form-label {
    color: #00a651;
    font-weight: 500;
}

.custom-glossary-section .input-group {
    margin-bottom: 8px;
}

.custom-glossary-section .form-control {
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
}

.custom-glossary-section .form-control:focus {
    background-color: #1a1a1a;
    border-color: #00a651;
    box-shadow: 0 0 0 2px rgba(0, 166, 81, 0.2);
    color: #fff;
}

/* 语言选择栏警告框样式 */
.language-sidebar .alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border: 1px solid #664d03;
    color: #ffcc00;
    padding: 10px;
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.4;
}

.language-sidebar .alert-warning strong {
    color: #ffdd33;
}

/* 自定义文件上传控件样式 */
.custom-file-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem 0 0 0.375rem;
    padding: 0.375rem 0.75rem;
    flex-grow: 1;
}

.custom-file-btn {
    margin-right: 10px;
    border: none !important;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
}

.custom-file-btn:hover {
    background-color: #e9ecef !important;
}

.file-name-display {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

.file-selected {
    color: #198754 !important;
    font-style: normal !important;
}