/* 服务器配置计算器样式 - 暗色主题布局 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    background: #0f1117;
    color: #e2e8f0;
    line-height: 1.6;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1a1d27;
}
::-webkit-scrollbar-thumb {
    background: #3d4168;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

.page-container {
    min-height: 100vh;
}

/* 顶部导航 */
.page-header {
    background: #1a1d27;
    border-bottom: 1px solid #2d3148;
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #2d3148;
    border: 1px solid #3d4168;
    border-radius: 6px;
    color: #a0aec0;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.header-back-btn:hover {
    background: #3d4168;
    color: #e2e8f0;
}

.header-center {
    text-align: center;
    flex: 1;
}

.header-center h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.15rem;
}

.header-center p {
    font-size: 0.8rem;
    color: #718096;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: #2d3148;
    border: 1px solid #3d4168;
    border-radius: 6px;
    color: #a0aec0;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-switch:hover {
    background: #3d4168;
    color: #e2e8f0;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem;
    background: #4f46e5;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: #4338ca;
}

/* 主体内容 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* 部署参数配置大块 */
.deploy-config-block {
    border-radius: 12px;
    background: #1a1d27;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.deploy-config-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2d3148;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deploy-config-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* 场景选择 + 参数配置区域 */
.params-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #2d3148;
}

.params-left {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid #2d3148;
}

.params-right {
    padding: 1.25rem 1.5rem;
}

/* GPU显存分布区域 */
.vram-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #2d3148;
}

/* 计算结果 + 推荐配置 区域 */
.results-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.results-left {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid #2d3148;
}

.results-right {
    padding: 1.25rem 1.5rem;
}

/* 模型详情区 */
.model-info-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #2d3148;
}

/* 配置区块通用样式 */
.config-section {
    margin-bottom: 1.25rem;
}

.config-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* 场景选择 */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.scenario-card {
    background: #252838;
    border: 1px solid #3d4168;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.scenario-card:hover {
    border-color: #4f46e5;
    background: #2d3148;
}

.scenario-card.active {
    border-color: #4f46e5;
    background: #312e81;
}

.scenario-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.15rem;
}

.scenario-desc {
    font-size: 0.75rem;
    color: #718096;
}

/* 参数组 */
.param-group {
    margin-bottom: 1.1rem;
}

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

.param-label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0aec0;
    margin-bottom: 0.6rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.param-btn {
    padding: 0.35rem 0.75rem;
    background: #252838;
    border: 1px solid #3d4168;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #a0aec0;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.param-btn:hover {
    border-color: #4f46e5;
    background: #2d3148;
    color: #e2e8f0;
}

.param-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* 滑块组 */
.slider-group {
    margin-bottom: 1.1rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.slider-header label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.slider-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
}

.slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, #4f46e5 0%, #2d3148 0%);
    outline: none;
    -webkit-appearance: none;
    margin: 0.5rem 0 0.4rem;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
    margin-top: -5px; /* 补偿滑块轨道高度，让thumb垂直居中 */
}

.slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.slider-marks {
    position: relative;
    font-size: 0.72rem;
    color: #6b7280;
    height: 24px;
    /* thumb 半径 7px，补偿两端使刻度与滑块轨道对齐 */
    margin: 0 7px;
}

.slider-marks span {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    padding-top: 8px;
    white-space: nowrap;
}

/* 起点不偏移，终点不超出 */
.slider-marks span:first-child {
    transform: translateX(0);
}

.slider-marks span:last-child {
    transform: translateX(-100%);
}

/* 刻度线 - 短刻度 */
.slider-marks span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 5px;
    background: #4a5568;
}

/* 起点和终点刻度线对齐 */
.slider-marks span:first-child::before {
    left: 0;
    transform: none;
}

.slider-marks span:last-child::before {
    left: auto;
    right: 0;
    transform: none;
}

/* 重要刻度（端点和中间点）- 长刻度 */
.slider-marks span:first-child::before,
.slider-marks span:nth-child(5)::before,
.slider-marks span:last-child::before {
    height: 8px;
    background: #6b7280;
}

/* 密集刻度样式（绝对定位，通过 left 属性控制位置） */
.slider-marks-dense {
    /* 由 JS 或内联 style 设置各 span 的 left 百分比 */
}

/* 模型详情 */
.model-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    background: #252838;
    border-radius: 4px;
    border: 1px solid #2d3148;
}

.detail-row span:first-child {
    color: #718096;
}

.detail-row span:last-child {
    font-weight: 600;
    color: #e2e8f0;
}

/* GPU显存图表 - 横向条形图 */
.vram-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.gpu-bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gpu-bar-label {
    font-size: 0.78rem;
    color: #718096;
    width: 40px;
    flex-shrink: 0;
    font-weight: 500;
}

.gpu-bar {
    flex: 1;
    height: 28px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.gpu-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-label {
    font-size: 0.68rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
}

.gpu-bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a0aec0;
    min-width: 60px;
    max-width: 96px;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}

/* 横坐标轴 */
.chart-axis {
    display: flex;
    justify-content: space-between;
    padding-left: 52px;
    padding-right: 68px;
    font-size: 0.72rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* 图例 */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    padding-left: 52px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #a0aec0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* 结果区块 */
.result-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 结果卡片 */
.result-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.result-card {
    padding: 0.85rem 1rem;
    background: #252838;
    border-radius: 8px;
    border: 1px solid #2d3148;
}

.result-card.highlight {
    background: #1e1b4b;
    border-color: #4f46e5;
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
}

.result-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.result-value {
    font-size: 1rem;
    font-weight: 700;
    color: #4f46e5;
}

.result-value.large {
    font-size: 1.35rem;
    color: #818cf8;
}

/* 显存需求汇总卡片（系统总显存 + 每GPU显存） */
.vram-summary-card {
    background: #1a1d27;
    border-radius: 10px;
    border: 1px solid #2d3148;
    overflow: hidden;
}

.vram-summary-card.full-width {
    grid-column: 1 / -1;
}

.vram-summary-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0aec0;
    border-bottom: 1px solid #2d3148;
    text-align: center;
    justify-content: center;
}

.vram-summary-body {
    display: flex;
    align-items: stretch;
}

.vram-block {
    flex: 1;
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
}

.vram-divider {
    width: 1px;
    background: #2d3148;
    flex-shrink: 0;
    margin: 1rem 0;
}

.vram-block-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.6rem;
}

.vram-block-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.vram-block-details {
    text-align: left;
    display: inline-block;
}

.vram-detail-row {
    font-size: 0.8rem;
    color: #4a9eff;
    line-height: 1.8;
}

.vram-detail-row span {
    color: #4a9eff;
}

.result-desc {
    font-size: 0.75rem;
    color: #4a5568;
    line-height: 1.5;
}

/* 推荐配置 */
.config-table {
    margin-top: 0;
}

.table-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.75rem;
}

.gpu-selector {
    margin-bottom: 0.75rem;
}

.gpu-selector label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0aec0;
    margin-bottom: 0.4rem;
}

.gpu-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #3d4168;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #252838;
    color: #e2e8f0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.gpu-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.recommended-config {
    background: #252838;
    border-radius: 8px;
    border: 1px solid #2d3148;
    overflow: hidden;
}

.config-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #2d3148;
    font-size: 0.85rem;
}

.config-row:last-child {
    border-bottom: none;
}

.config-row span:first-child {
    color: #718096;
    font-weight: 500;
}

.config-row span:last-child {
    color: #e2e8f0;
    font-weight: 600;
    text-align: right;
}

/* 帮助提示图标 */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2d3148;
    color: #718096;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 3px;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

.help-icon:hover {
    background: #4f46e5;
    color: white;
}

.help-icon::before {
    content: '?';
}

/* vLLM部署区域 */
.deploy-section {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.deploy-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2d3148;
}

.deploy-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
}

.deploy-env-badge {
    font-size: 0.78rem;
    color: #718096;
}

.deploy-step {
    margin-bottom: 1.25rem;
}

.deploy-step-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.6rem;
}

.code-block {
    background: #0d1117;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.82rem;
    color: #4ade80;
    line-height: 1.7;
    position: relative;
    overflow-x: auto;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #2d3148;
    border: 1px solid #3d4168;
    border-radius: 4px;
    color: #718096;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: #3d4168;
    color: #e2e8f0;
}

.deploy-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.deploy-tool-card {
    background: #252838;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.deploy-tool-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.3rem;
}

.deploy-tool-desc {
    font-size: 0.78rem;
    color: #718096;
}

/* 社区区域 */
.community-section {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.community-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.community-desc {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 1.5rem;
}

.community-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.community-link {
    padding: 0.6rem 1rem;
    background: #252838;
    border: 1px solid #2d3148;
    border-radius: 8px;
    color: #a0aec0;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.community-link:hover {
    background: #2d3148;
    color: #e2e8f0;
    border-color: #4f46e5;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2d3148;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #252838;
    border: 1px solid #3d4168;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #718096;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #3d4168;
    color: #e2e8f0;
}

.modal-body {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #a0aec0;
}

.modal-body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 16px 0 8px 0;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 8px 0 12px 20px;
}

.modal-body li {
    margin-bottom: 6px;
}

.modal-body code {
    background: #252838;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #818cf8;
}

.formula-box {
    background: #1e1b4b;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    border-left: 3px solid #4f46e5;
}

.formula-box strong {
    color: #818cf8;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .model-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .params-layout {
        grid-template-columns: 1fr;
    }
    .params-left {
        border-right: none;
        border-bottom: 1px solid #2d3148;
    }
    .results-layout {
        grid-template-columns: 1fr;
    }
    .results-left {
        border-right: none;
        border-bottom: 1px solid #2d3148;
    }
    .result-cards {
        grid-template-columns: 1fr;
    }
    .deploy-tools-grid {
        grid-template-columns: 1fr;
    }
    .community-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
    }
    .header-center p {
        display: none;
    }
    .model-details {
        grid-template-columns: 1fr;
    }
    .scenario-grid {
        grid-template-columns: 1fr;
    }
    .chart-axis {
        display: none;
    }
}

/* 代码块 pre 标签 */
.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.82rem;
    color: #4ade80;
    line-height: 1.7;
    padding-top: 0.25rem;
}

/* 优化建议区域 */
.optimization-tips {
    margin-top: 1rem;
}

.tips-section {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.tips-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.6rem;
}

.tip-item {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.6;
    padding: 0.3rem 0;
    border-bottom: 1px solid #252838;
}

.tip-item:last-child {
    border-bottom: none;
}

.tip-item strong {
    color: #a0aec0;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #252838;
    border: 1px solid #3d4168;
    color: #e2e8f0;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 模型详情 - 支持更多列（如有单行宽表格） */
@media (min-width: 1200px) {
    .model-details {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* GPU Bar 超出提示文字 */
.vram-chart-note {
    font-size: 0.75rem;
    color: #4a5568;
    text-align: center;
    margin-top: 0.4rem;
    padding-left: 52px;
}

/* 状态徽标 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-badge.warning {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* 页脚版权 */
.page-footer {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #2d3148;
    margin-top: 2rem;
    font-size: 0.78rem;
    color: #4a5568;
}

/* ===== 推荐配置 Tab 切换 ===== */
.config-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.config-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border: 1px solid #3d4168;
    border-radius: 8px;
    background: transparent;
    color: #718096;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}

.config-tab:hover {
    background: #1a1d27;
    color: #a0aec0;
}

.config-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
}

.config-tab-content {
    display: none;
}

.config-tab-content.active {
    display: block;
}

/* GPU 筛选区域 */
.gpu-selector-area {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
}

.gpu-selector-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.gpu-selector-item {
    flex: 1;
}

.gpu-selector-item label {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.gpu-selected-status {
    font-size: 0.78rem;
    color: #4a5568;
    padding: 0.4rem 0;
    border-top: 1px solid #2d3148;
    margin-top: 0.25rem;
}

/* GPU 型号行内徽标 */
.gpu-model-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.15rem;
}

.gpu-model-tag.sufficient {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gpu-model-tag.insufficient {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.gpu-model-tag.selected {
    background: rgba(79, 70, 229, 0.15);
    color: #818cf8;
    border: 1px solid rgba(79, 70, 229, 0.4);
}

/* 云服务 Tab */
.cloud-service-info {
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 1rem;
}

.cloud-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid #252838;
    font-size: 0.85rem;
}

.cloud-info-row:last-child {
    border-bottom: none;
}

.cloud-info-row span:first-child {
    color: #718096;
}

.cloud-info-row span:last-child {
    color: #e2e8f0;
    font-weight: 600;
}

.cloud-tip {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #a0aec0;
    line-height: 1.6;
}

/* GPU 兼容性检查区域 */
.gpu-compatibility-section {
    margin-top: 1rem;
    background: #1a1d27;
    border: 1px solid #2d3148;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.compatibility-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.6rem;
}

.gpu-compatibility {
    font-size: 0.82rem;
}

/* 兼容性评分卡片 */
.compat-score-card {
    margin-bottom: 1rem;
}

.compat-score-header {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.compat-score-label {
    font-size: 0.78rem;
    color: #718096;
}

.compat-score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.compat-score-max {
    font-size: 0.85rem;
    color: #718096;
}

.compat-score-bar {
    height: 6px;
    background: #2d3148;
    border-radius: 3px;
    overflow: hidden;
}

.compat-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 指标行 */
.compat-metric-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.compat-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compat-metric-label {
    font-size: 0.75rem;
    color: #718096;
}

.compat-metric-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* 显存利用率进度条 */
.compat-progress-bar {
    height: 4px;
    background: #2d3148;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.compat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 兼容性状态 */
.compat-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.compat-status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.compat-status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.compat-status-icon {
    font-size: 0.9rem;
}

/* 警告和建议 */
.compat-warnings,
.compat-suggestions {
    margin-top: 0.5rem;
}

.compat-warning-item,
.compat-suggestion-item {
    padding: 0.4rem 0;
    font-size: 0.78rem;
    color: #a0aec0;
    border-bottom: 1px solid rgba(45, 49, 72, 0.5);
}

.compat-warning-item:last-child,
.compat-suggestion-item:last-child {
    border-bottom: none;
}
