/* ============================================
   性别预测工具专用样式
   文件：gender-predictor.css
   依赖：tools-common.css（公共样式）
   注意：不要重复定义 info-card 样式！
   ============================================ */

/* 预测方法选择区域 */
.prediction-method {
    margin-bottom: 2rem;
}

.method-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.method-tabs .tab-btn {
    padding: 0.875rem 1.25rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.method-tabs .tab-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.method-tabs .tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 基本信息输入区域 */
.basic-info {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input,
.form-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    margin-top: 0.375rem;
    font-size: 0.85rem;
    color: #6c757d;
}

/* 操作按钮 */
.calculate-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* 预测结果区域 */
.result-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.result-section .section-title {
    color: white;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
}

.prediction-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.summary-detail {
    font-size: 0.85rem;
    color: #6c757d;
}

.summary-unit {
    display: inline;
    font-size: 1rem;
    color: #6c757d;
    margin-left: 0.25rem;
}

.prediction-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.prediction-notice i {
    color: #667eea;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.prediction-notice span {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 清宫表区域 */
.qinggong-chart {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qinggong-chart .section-title {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.chart-container {
    overflow-x: auto;
}

.chart-header {
    text-align: center;
    margin-bottom: 1rem;
}

.chart-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
}

.chart-grid {
    display: inline-block;
    min-width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.chart-row {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.chart-row:last-child {
    border-bottom: none;
}

.chart-cell {
    min-width: 60px;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    border-right: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.chart-cell:last-child {
    border-right: none;
}

.chart-cell.header {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.chart-cell.boy {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.chart-cell.girl {
    background: #fce4ec;
    color: #c2185b;
    font-weight: 500;
}

.chart-cell.highlight {
    background: #fff3e0;
    border: 2px solid #ff9800;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #ff9800;
}

.chart-cell:hover:not(.header) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.legend-color.boy {
    background: #e3f2fd;
}

.legend-color.girl {
    background: #fce4ec;
}

.legend-text {
    font-size: 0.9rem;
    color: #495057;
}

/* 节标题通用样式 */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .method-tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .prediction-summary {
        grid-template-columns: 1fr;
    }

    .calculate-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .chart-cell {
        min-width: 50px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .result-section {
        padding: 1.5rem;
    }

    .basic-info {
        padding: 1rem;
    }

    .qinggong-chart {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .method-tabs {
        grid-template-columns: 1fr;
    }

    .chart-cell {
        min-width: 40px;
        padding: 0.375rem;
        font-size: 0.75rem;
    }

    .legend-item {
        font-size: 0.85rem;
    }

    .summary-value {
        font-size: 1.25rem;
    }

    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}
