/* 表格组件 */
.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th {
    background-color: rgba(10, 200, 185, 0.1);
    padding: 12px 15px;
    text-align: left;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    font-weight: 500;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.3);
}

.results-table tr:hover {
    background-color: rgba(10, 200, 185, 0.05);
}

.overflow-auto {
    overflow: auto;
    max-height: 400px;
}

/* 图表容器样式增强 */
.chart-container {
    width: 100%;
    height: 300px;
    background: radial-gradient(circle at center, rgba(10, 30, 40, 0.6), rgba(5, 15, 30, 0.8));
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2) inset;
}

/* 图表添加网格线 */
.chart-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.chart-loading, .complete-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 20, 40, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-size: 1.1rem;
    z-index: 10;
}

.hidden {
    display: none;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(10, 200, 185, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.complete-badge {
    background-color: rgba(23, 185, 120, 0.2);
    gap: 15px;
}

.complete-badge i {
    font-size: 40px;
    color: var(--color-success);
}

/* 结果区域 */
.results-container {
    margin-top: 20px;
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
}

.code-block {
    background-color: rgba(10, 20, 40, 0.3);
    border-radius: 6px;
    padding: 15px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--color-text);
    overflow-x: auto;
    white-space: pre-wrap;
    line-height: 1.6;
    max-height: 250px;
    overflow-y: auto;
}

/* 状态网格 */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

/* 状态项优化 */
.status-item {
    background: linear-gradient(145deg, rgba(10, 20, 30, 0.7), rgba(5, 15, 25, 0.9));
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.status-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.5;
}

.status-item.highlight {
    background: linear-gradient(145deg, rgba(0, 229, 255, 0.1), rgba(0, 229, 255, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.3);
    animation: statusGlow 2s infinite alternate;
}

@keyframes statusGlow {
    0% { box-shadow: 0 0 5px rgba(0, 229, 255, 0.2); }
    100% { box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); }
}

.status-item.success {
    background-color: rgba(23, 185, 120, 0.1);
    border: 1px solid rgba(23, 185, 120, 0.3);
}

.status-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.status-item.success .status-value {
    color: var(--color-success);
}

.status-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-align: center;
}

/* 类型标签 */
.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.slack {
    background-color: rgba(48, 175, 228, 0.15);
    color: var(--color-slack);
}

.type-badge.pv {
    background-color: rgba(60, 224, 175, 0.15);
    color: var(--color-pv);
}

.type-badge.pq {
    background-color: rgba(247, 177, 82, 0.15);
    color: var(--color-pq);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.normal {
    background-color: rgba(23, 185, 120, 0.15);
    color: var(--color-success);
}

.status-badge.warning {
    background-color: rgba(240, 178, 50, 0.15);
    color: var(--color-warning);
}

.status-badge.critical {
    background-color: rgba(232, 69, 69, 0.15);
    color: var(--color-danger);
}



/* 算法选择项样式 */
.algorithm-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.selection-item {
    background: linear-gradient(145deg, rgba(10, 20, 30, 0.7), rgba(5, 15, 25, 0.9));
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.selection-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.selection-item.active {
    border-color: var(--color-primary);
    background: linear-gradient(145deg, rgba(10, 200, 185, 0.1), rgba(0, 151, 245, 0.05));
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.selection-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
}

.selection-item.active .selection-title {
    color: var(--color-primary);
}

.selection-item i {
    color: var(--color-text-secondary);
    opacity: 0;
    transition: all 0.3s;
}

.selection-item.active i {
    color: var(--color-primary);
    opacity: 1;
}

.selection-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.selection-metrics {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-name {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.metric-bar {
    height: 6px;
    background-color: rgba(30, 58, 95, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
}

/* 报告样式 */
.report-section {
    margin-bottom: 25px;
}

.report-heading {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

/* 矩阵表格 */
.matrix-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: center;
}

.matrix-table th {
    background-color: rgba(10, 200, 185, 0.1);
    padding: 10px;
    font-weight: 500;
    color: var(--color-primary);
}

.matrix-table td {
    padding: 8px;
    border: 1px solid rgba(30, 58, 95, 0.3);
}

.matrix-table th:first-child {
    background-color: rgba(10, 200, 185, 0.1);
}

.matrix-table tr:hover td {
    background-color: rgba(10, 200, 185, 0.05);
}

/* 属性网格 */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(10, 20, 40, 0.3);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.property-item.highlight {
    background-color: rgba(10, 200, 185, 0.1);
    border-color: rgba(10, 200, 185, 0.3);
}

.property-name {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.property-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-primary);
}

.property-item.highlight .property-value {
    color: var(--color-primary);
}

/* 注释框 */
.note-box {
    background-color: rgba(10, 20, 40, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border-left: 3px solid var(--color-primary);
}

.note-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--color-primary);
}

.note-content {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.note-content p {
    margin-bottom: 8px;
}

.note-content p:last-child {
    margin-bottom: 0;
}
/* 拓扑信息卡片样式改进 */
.current-topology-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.info-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-panel);
    border-radius: 6px;
}

.info-label {
    font-weight: 500;
    color: var(--color-text-muted);
    margin-right: 8px;
    white-space: nowrap;
}

.info-value {
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(0, 229, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    text-align: center;
    flex: 1;
}
/* 计算控制区样式改进 */
.calculation-control-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    align-items: start;
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-panel);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.param-group:hover {
    box-shadow: var(--shadow-md);
}

.param-label {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.param-control {
    position: relative;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    padding-right: 30px;
}

.hint-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--color-text-muted);
    cursor: help;
}

.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-muted);
}

.fancy-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-input);
    color: var(--color-text);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
}

.fancy-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.numeric-input {
    background: var(--bg-input);
    color: var(--color-text);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
}

.numeric-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

/* 未收敛状态的警告消息样式 */
.convergence-warning {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #ff9800;
    border-radius: 4px;
}

.warning-icon {
    font-size: 24px;
    color: #ff9800;
    display: flex;
    align-items: flex-start;
}

.warning-text h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #ff9800;
}

.warning-text p {
    margin: 5px 0;
    color: var(--color-text);
}

/* 收敛/未收敛状态的视觉差异 */
.final-result.converged {
    border-left: 4px solid #4caf50;
    padding-left: 15px;
}

.final-result.not-converged {
    border-left: 4px solid #ff9800;
    padding-left: 15px;
}

.badge-success {
    background-color: #4caf50;
    color: white;
}

.badge-warning {
    background-color: #ff9800;
    color: white;
}

/* 完成徽章样式优化 */
.complete-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.complete-badge i {
    font-size: 18px;
}
/* AI报告删除按钮样式 */
.ai-report-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-left: auto;
}

.ai-report-delete:hover {
    background-color: rgba(244, 67, 54, 0.2);
    box-shadow: 0 2px 5px rgba(244, 67, 54, 0.2);
}

.ai-report-delete i {
    font-size: 18px;
}

/* 报告已删除提示样式 */
.deleted-message {
    padding: 30px;
    text-align: center;
    color: #757575;
    font-style: italic;
}

/* 调整报告头部布局，使删除按钮能够正确显示 */
.ai-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-report-title {
    margin-right: auto;
}