/* SWITCH 空间多组学整合模块专属CSS */

/* Tab 系统 */
.switch-tabs {
    display: flex;
    border-bottom: 2px solid var(--light-blue);
    margin-bottom: 20px;
    gap: 4px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px 8px 0 0;
    background: #f0f4f8;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s, color 0.3s;
    color: var(--text-dark);
}

.tab-btn.active {
    background: var(--primary-blue);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.tab-badge {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* Tab 内容 */
.tab-content {
    display: none;
}

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

/* 结果图片网格 */
.results-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 10px 0;
}

.image-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
}

.image-card-title {
    padding: 10px 16px;
    background: var(--light-blue);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-blue);
}

.image-card-desc {
    padding: 6px 16px;
    font-size: 0.8rem;
    color: #666;
    background: #f8f9fa;
}

.result-image {
    width: 100%;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.3s;
}

.result-image:hover {
    opacity: 0.9;
}

/* FOSCTTM 分数展示 */
.switch-foscttm-card {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.score-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 8px 0;
}

.score-hint {
    font-size: 0.85rem;
    color: #999;
}

.color-excellent { color: #2ecc71; }
.color-good      { color: #f39c12; }
.color-warning   { color: #e74c3c; }

/* 整合指标网格 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.metric-item {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.metric-label {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* 图片放大 Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-modal.show {
    display: flex;
}

.modal-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 禁用提示 */
.tab-disabled-hint {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1rem;
}

.tab-disabled-hint i {
    margin-right: 8px;
    color: var(--accent-orange);
}

/* 2列参数网格 */
.param-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* 复选框组 */
.switch-checkbox-group {
    margin-bottom: 12px;
}

.switch-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-blue);
    padding: 8px 0;
}

.switch-checkbox-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

/* 子选项（复选框展开区，默认隐藏） */
.sub-options {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background: var(--light-blue);
    border-radius: 8px;
    border-left: 3px solid var(--primary-blue);
}

.sub-options.visible {
    display: block;
}

/* 占位符样式（复用 generation.html 风格） */
.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    color: #999;
    gap: 16px;
}

.placeholder i {
    font-size: 4rem;
    color: var(--light-blue);
}

.placeholder h3 {
    font-size: 1.4rem;
    color: #666;
}

.placeholder p {
    font-size: 0.95rem;
    text-align: center;
    max-width: 300px;
}

/* Loading dots */
.loading-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-blue);
    animation: bounce 1.2s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 结果面板 */
#resultsPanel {
    display: none;
}

#resultsPanel.show {
    display: block;
}

#placeholderPanel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Collapsible section */
.collapsible-section summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark-blue);
    padding: 10px 0;
}

.collapsible-section summary::-webkit-details-marker {
    display: none;
}

.collapsible-content {
    padding-top: 12px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .results-image-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .param-grid-2col {
        grid-template-columns: 1fr;
    }

    .switch-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}
