* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* ================================
   顶部导航样式
================================ */
.top-nav {
    position: static;
    background-color: transparent;
    z-index: 1000;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: -30px;
}

.home-link {
    position: relative;
    left: 0;
    width: 40px;
    height: 40px;
    background-color: #2E72C6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-link:hover {
    background-color: #1e5da8;
    transform: scale(1.1);
}

.home-link i {
    font-size: 18px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 20px;
    background-color: #2E72C6;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 0;
}

.back-button:hover {
    background-color: #1e5da8;
    transform: translateX(-5px);
}

.back-button i {
    font-size: 16px;
}

.page-header {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: #2E72C6;
    line-height: 1.2;
    margin-bottom: 5px;
    text-align: right;
}

.page-header .subtitle {
    font-size: 1rem;
    color: #666;
    text-align: right;
}

/* ================================
   页面主要布局
================================ */
.page-layout {
    max-width: 1600gitpx;
    margin: 40px auto;
    margin-top: 10px;
    padding: 0 20px;
}

/* 上部分布局 */
.top-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 100px;
    align-items: start;
}

/* 下部分布局 */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
    margin-top: -30px;
}

/* 左侧面板 */
.left-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: -30px;
    min-height: 650px;
}

/* 右侧预览面板 */
.right-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 620px;
}

/* 占位图 */
.placeholder-stripes {
    width: 100%;
    height: 84%;
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0,
        #f0f0f0 10px,
        #ffffff 10px,
        #ffffff 20px
    );
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.2rem;
}

/* 标题样式 */
h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.bottom-section h2,
.right-panel h2 {
    padding-bottom: 5px;
    border-bottom: 2px solid #e5e7eb;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* ================================
   模型选择面板
================================ */
.model-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 400px;
}

/* 模型选择组样式 */
.model-select-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    gap: 100px;
}

/* 模型选择框样式 */
.custom-model-select {
    position: relative;
    width: 200px;
}

/* 模型选择按钮样式 */
.model-select-button {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #2E72C6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.model-select-button:hover {
    border-color: #2E72C6;
    box-shadow: 0 2px 8px rgba(46, 114, 198, 0.1);
}

/* 下拉菜单样式 */
.model-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.model-select-dropdown.show {
    display: block;
}

.model-option {
    padding: 12px 16px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-option:hover {
    background: #f8fafc;
}

.model-option.selected {
    background: #f1f5f9;
    color: #2E72C6;
}

/* ================================
   Auto Mode 开关 - 蓝色填充，白色按钮
================================ */
.auto-mode-toggle {
    margin-right: 50px;
}

.auto-mode-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.auto-mode-label input[type="checkbox"] {
    display: none;
}

.toggle-track {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    margin-right: 10px;
    background-color: #e2e8f0; /* 未选中时为浅灰色 */
    border-radius: 28px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.toggle-track::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white; /* 按钮始终为白色 */
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.auto-mode-label input[type="checkbox"]:checked + .toggle-track {
    background-color: #2E72C6; /* 选中时为蓝色 */
    border-color: #2E72C6;
}

.auto-mode-label input[type="checkbox"]:checked + .toggle-track::before {
    transform: translateX(24px);
    background-color: white; /* 按钮保持白色 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.toggle-text {
    font-size: 0.95rem;
    color: #1e293b;
    white-space: nowrap;
    font-weight: 500;
}

/* ================================
   模型信息和参数
================================ */
.model-info {
    margin: 25px 15px;
}

.model-info p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 0 15px;
}

.model-info ul {
    padding-left: 45px;
    padding-right: 15px;
}

.model-info ul li {
    margin-bottom: 12px;
    color: #4a5568;
    line-height: 1.5;
}

/* 参数面板 */
.model-params {
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-top: 20px;
}

.model-params h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* 布尔参数组 */
.bool-params-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.bool-param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    transition: .4s;
    border-radius: 24px;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 3px rgba(0,0,0,0.15);
}

input:checked + .toggle-slider {
    background-color: white;
    border-color: #a3bffa;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #2E72C6;
    box-shadow: 0 2px 4px rgba(46,114,198,0.3);
}

/* 数值参数组 */
.numeric-params-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.param-slider-container {
    background: white;
    padding: 8px 15px;
    padding-bottom: 18px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 17px;
}

.param-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: -5px;
    margin-left: 5px;
}

.param-title {
    font-size: 0.95rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-icon {
    color: #94a3b8;
    font-size: 14px;
    cursor: help;
    transition: color 0.2s ease;
    /* height: 18px; */
}

.info-icon:hover {
    color: #2E72C6;
}

.slider-container {
    position: relative;
    height: 30px;
    margin: 0;
}

.param-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2E72C6;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(46, 114, 198, 0.2);
}

.param-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(46, 114, 198, 0.3);
}

.slider-ticks {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    margin-top: 5px;
}

.tick {
    position: relative;
    width: 2px;
    height: 6px;
    background: #e2e8f0;
    top: 50%;
    transform: translateY(-50%);
}

.tick-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

/* 基础参数值样式 - 适用于所有参数值 */
.param-value {
    font-size: 0.95rem;
    font-weight: 600;
    background: #e6f0ff;
    border-radius: 6px;
    text-align: center;
    display: inline-block;
    color: #2E72C6;
    padding: 2px 8px;
    min-width: 50px;
}

/* 特定场景的样式覆盖 */
/* 滑块上方的参数值 */
.param-slider-container .param-value {
    padding: 0;
    min-width: 40px;
}

/* 模型信息部分的布尔值 */
.model-info-section .param-value.boolean {
    padding: 6px 14px;
    min-width: 70px;
}

/* 模型信息部分的数值 */
.model-info-section .param-value.numeric {
    padding: 6px 12px;
    min-width: 50px;
}

/* True/False颜色区分 */
.param-value.true {
    color: #2E72C6;
}

.param-value.false {
    color: #64748b;
}

/* ================================
   建模按钮
================================ */
.model-action {
    margin-top: 30px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.start-modeling-btn {
    background: #2E72C6;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 114, 198, 0.2);
}

.start-modeling-btn i {
    font-size: 0.9rem;
}

.start-modeling-btn:hover {
    background: #2661AC;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 114, 198, 0.3);
}

.start-modeling-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(46, 114, 198, 0.2);
}

.start-modeling-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ================================
   结果面板
================================ */
.results-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-height: 400px;
}

.model-results {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 模型信息部分 */
.model-info-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.model-header h3 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
}

.model-badge {
    background: #2E72C6;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.parameters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.param-group {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
}

.param-group-title {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.param-item:last-child {
    margin-bottom: 0;
}

.param-label {
    color: #1e293b;
    font-size: 0.9rem;
}

/* 指标部分 */
.metrics-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.metrics-section h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease;
}

/* 预测指标的特殊样式 */
.forecast-metric {
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

.metric-title {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2E72C6;
}

/* 预测指标的值样式 */
.forecast-metric .metric-value {
    color: #4f46e5;
}

/* ================================
   文件选择相关样式
================================ */
.custom-file-select {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}

.file-select-button {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #2E72C6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.file-select-button:hover {
    border-color: #2E72C6;
    box-shadow: 0 2px 8px rgba(46, 114, 198, 0.1);
}

.file-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.file-select-dropdown.show {
    display: block;
}

.file-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-option:hover {
    background: #f8fafc;
}

.file-option.selected {
    background: #f1f5f9;
    color: #2E72C6;
}

.file-option i {
    color: #2E72C6;
    font-size: 16px;
}

/* ================================
   变量列表样式
================================ */
.variables-container {
    margin-top: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 480px;
}

.variables-container h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 8px;
    padding-bottom: 8px;
    padding-left: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.variables-list {
    height: calc(100% - 30px);
    overflow-y: auto;
    padding: 2px;
}

/* 美化滚动条 */
.variables-list::-webkit-scrollbar {
    width: 8px;
}

.variables-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.variables-list::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 4px;
}

.variables-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 变量网格布局 */
.variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    padding: 0;
    height: auto;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.variable-item:hover {
    background: #f1f5f9;
}

.variable-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.variable-content i {
    color: #2E72C6;
    font-size: 18px;
}

.variable-content span {
    font-size: 17px;
    font-weight: 500;
    color: #1e293b;
}

/* ================================
   响应式设计
================================ */
@media (max-width: 1024px) {
    .top-section {
        grid-template-columns: 1fr;
    }
    
    .bottom-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 15px 20px;
    }

    .home-link {
        position: static;
        left: auto;
    }

    .top-nav > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .nav-left {
        display: flex;
        gap: 15px;
        margin-right: 0;
        width: 100%;
    }

    .page-header {
        width: 100%;
        margin-left: 0;
    }

    .back-button span {
        display: none;
    }

    .back-button {
        padding: 8px 15px;
    }

    .home-link {
        width: 35px;
        height: 35px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* 预测点数输入框样式 */
.forecast-points {
    margin-top: 10px;
}

.forecast-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forecast-points-input {
    width: 100px;  /* 增加宽度以适应更长的数字 */
    height: 40px;
    padding: 0 10px 0 0;  /* 右侧留出空间给上下箭头，移除左侧padding */
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    color: #2E72C6;
    font-weight: 600;
    text-align: center;  /* 文字居中 */
    transition: all 0.3s ease;
    font-size: 20px !important;
    position: relative;
}

.forecast-points-input:focus {
    outline: none;
    border-color: #2E72C6;
    box-shadow: 0 0 0 3px rgba(46, 114, 198, 0.1);
}

/* 修改上下箭头样式 */
.forecast-points-input::-webkit-inner-spin-button,
.forecast-points-input::-webkit-outer-spin-button {
    opacity: 1;
    background-color: #f8fafc;
    width: 25px;  /* 稍微增加箭头区域的宽度 */
    height: 36px;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    border-left: 1px solid #e2e8f0;
    cursor: pointer;
}

.forecast-points-label {
    color: #64748b;
    font-size: 0.9rem;
}

/* 预测设置区域样式 */
.forecast-settings {
    margin: 25px 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
}

.forecast-settings h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.forecast-input-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 添加图表区域样式 */
.plots-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 25px;
}

.plots-section h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.plots-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    min-height: 800px;
}

/* 图表切换标签样式 */
.plot-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.plot-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    color: #64748b;
    font-size: 24px;
    font-weight: 500;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.plot-tab:hover {
    color: #2E72C6;
    background: #f1f5f9;
}

.plot-tab.active {
    
    color: #2E72C6;
    background: #e0e7ff;
}

.plot-content {
    position: relative;
    min-height: 700px;
}

.plot-panel {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 700px;
    overflow: hidden;
}

.plot-panel.active {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .plot-tabs {
        flex-wrap: wrap;
    }
    
    .plot-tab {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* 全宽图表容器样式 */
.full-width-plots-section {
    max-width: 1600px;  /* 与 page-layout 一致 */
    margin: 40px auto;  /* 居中对齐 */
    padding: 0 20px;    /* 与 page-layout padding 一致 */
}

.full-width-plots-section > h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.plots-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .full-width-plots-section {
        padding: 0 15px;  /* 在小屏幕上减小内边距 */
        margin: 30px auto;
    }
}