/**
 * blood-type-calculator.css
 * 子女血型查询计算器专用样式
 * 注意：info-card 样式已在 tools-common.css 中定义，此文件不重复定义
 */

/* ========== 血型选择区域 ========== */
.tool-page .parent-selection-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.tool-page .section-title {
    font-size: 1.5em;
    color: #333;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #4285f4;
}

.tool-page .parents-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

/* ========== 父母卡片 ========== */
.tool-page .parent-card {
    flex: 1;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e1e4e8;
    transition: all 0.3s ease;
}

.tool-page .parent-card:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.tool-page .parent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.tool-page .parent-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2em;
}

.tool-page .parent-title {
    font-size: 1.2em;
    color: #333;
    margin: 0;
}

/* ========== 血型选择网格 ========== */
.tool-page .blood-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tool-page .blood-type-option {
    cursor: pointer;
    position: relative;
}

.tool-page .blood-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tool-page .blood-type-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-page .blood-type-option:hover .blood-type-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-page .blood-type-option input:checked + .blood-type-card {
    border-width: 3px;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.tool-page .blood-symbol {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.tool-page .blood-label {
    font-size: 0.9em;
    color: #666;
}

/* 血型颜色 */
.tool-page .type-a,
.tool-page .type-a .blood-symbol {
    color: #e74c3c;
    border-color: #e74c3c;
}

.tool-page .blood-type-option input:checked + .type-a {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
}

.tool-page .type-b,
.tool-page .type-b .blood-symbol {
    color: #3498db;
    border-color: #3498db;
}

.tool-page .blood-type-option input:checked + .type-b {
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
}

.tool-page .type-ab,
.tool-page .type-ab .blood-symbol {
    color: #9b59b6;
    border-color: #9b59b6;
}

.tool-page .blood-type-option input:checked + .type-ab {
    background: linear-gradient(135deg, #f8f5ff 0%, #f0e5ff 100%);
}

.tool-page .type-o,
.tool-page .type-o .blood-symbol {
    color: #27ae60;
    border-color: #27ae60;
}

.tool-page .blood-type-option input:checked + .type-o {
    background: linear-gradient(135deg, #f0fff4 0%, #e5ffe5 100%);
}

/* ========== 遗传箭头 ========== */
.tool-page .genetic-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tool-page .arrow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tool-page .dna-helix {
    font-size: 2em;
    color: #4285f4;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tool-page .arrow-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, #4285f4 0%, #34a853 100%);
}

.tool-page .arrow-tip {
    font-size: 1.5em;
    color: #34a853;
}

.tool-page .genetic-text {
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
}

/* ========== 操作按钮 ========== */
.tool-page .action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tool-page .btn {
    padding: 14px 30px;
    font-size: 1.05em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tool-page .btn-primary {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.tool-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.tool-page .btn-outline {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.tool-page .btn-outline:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* ========== 结果区域 ========== */
.tool-page .result-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tool-page .subsection-title {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-page .subsection-title i {
    color: #4285f4;
}

/* ========== 遗传组合表格 ========== */
.tool-page .genetic-table-container {
    margin-bottom: 30px;
}

.tool-page .genetic-summary {
    text-align: center;
    margin-bottom: 20px;
}

.tool-page .parent-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1em;
}

.tool-page .parent-label {
    font-weight: 600;
    color: #333;
}

.tool-page .genetic-cross {
    font-size: 1.5em;
    color: #4285f4;
}

.tool-page .combination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.tool-page .combination-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e1e4e8;
    transition: all 0.3s ease;
}

.tool-page .combination-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-page .genotype {
    font-size: 1.3em;
    font-family: 'Courier New', monospace;
    color: #666;
    margin-bottom: 10px;
}

.tool-page .phenotype {
    font-size: 1.1em;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* ========== 概率图表 ========== */
.tool-page .probability-results {
    margin-bottom: 30px;
}

.tool-page .probability-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tool-page .probability-bar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.tool-page .bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tool-page .blood-type-label {
    font-size: 1.1em;
    font-weight: 600;
    padding: 6px 15px;
    border-radius: 20px;
}

.tool-page .blood-type-label.type-a {
    background: #ffe5e5;
    color: #e74c3c;
}

.tool-page .blood-type-label.type-b {
    background: #e3f2fd;
    color: #3498db;
}

.tool-page .blood-type-label.type-ab {
    background: #f0e5ff;
    color: #9b59b6;
}

.tool-page .blood-type-label.type-o {
    background: #e5ffe5;
    color: #27ae60;
}

.tool-page .percentage {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
}

.tool-page .bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tool-page .bar-fill {
    height: 100%;
    transition: width 0.8s ease;
    border-radius: 15px;
}

.tool-page .bar-fill.type-a {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

.tool-page .bar-fill.type-b {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.tool-page .bar-fill.type-ab {
    background: linear-gradient(90deg, #9b59b6 0%, #8e44ad 100%);
}

.tool-page .bar-fill.type-o {
    background: linear-gradient(90deg, #27ae60 0%, #229954 100%);
}

.tool-page .bar-count {
    font-size: 0.9em;
    color: #666;
}

/* ========== 详细分析 ========== */
.tool-page .analysis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-page .analysis-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #4285f4;
}

.tool-page .analysis-card .card-header h6 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #333;
}

.tool-page .result-blood-type {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.tool-page .result-probability {
    text-align: center;
    font-size: 1.2em;
    color: #666;
}

.tool-page .analysis-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-page .analysis-points li {
    padding: 8px 0;
    border-bottom: 1px solid #e1e4e8;
}

.tool-page .analysis-points li:last-child {
    border-bottom: none;
}

.tool-page .note-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
}

.tool-page .note-icon {
    color: #f39c12;
    font-size: 1.2em;
}

.tool-page .note-text {
    flex: 1;
    color: #555;
    line-height: 1.6;
}

/* ========== 响应式设计 ========== */

/* 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
    .tool-page .parents-container {
        gap: 20px;
    }

    .tool-page .parent-card {
        padding: 20px;
    }

    .tool-page .blood-type-grid {
        gap: 10px;
    }

    .tool-page .combination-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

/* 手机端 (< 768px) */
@media (max-width: 768px) {
    .tool-page .parent-selection-section,
    .tool-page .result-section {
        padding: 20px;
        border-radius: 8px;
    }

    .tool-page .section-title {
        font-size: 1.3em;
    }

    .tool-page .parents-container {
        flex-direction: column;
        gap: 20px;
    }

    .tool-page .genetic-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .tool-page .blood-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tool-page .blood-type-card {
        padding: 12px 8px;
    }

    .tool-page .blood-symbol {
        font-size: 1.5em;
    }

    .tool-page .blood-label {
        font-size: 0.8em;
    }

    .tool-page .action-buttons {
        flex-direction: column;
    }

    .tool-page .btn {
        width: 100%;
        justify-content: center;
    }

    .tool-page .combination-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tool-page .analysis-cards {
        grid-template-columns: 1fr;
    }

    .tool-page .probability-bar {
        padding: 15px;
    }

    .tool-page .bar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 超小屏幕 (< 480px) */
@media (max-width: 480px) {
    .tool-page .parent-selection-section,
    .tool-page .result-section {
        padding: 15px;
    }

    .tool-page .section-title {
        font-size: 1.2em;
    }

    .tool-page .parent-card {
        padding: 15px;
    }

    .tool-page .parent-icon {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }

    .tool-page .parent-title {
        font-size: 1.1em;
    }

    .tool-page .blood-type-card {
        padding: 10px 5px;
    }

    .tool-page .combination-item {
        padding: 15px;
    }

    .tool-page .genotype {
        font-size: 1.1em;
    }

    .tool-page .phenotype {
        font-size: 1em;
        padding: 6px 12px;
    }

    .tool-page .result-blood-type {
        font-size: 1.5em;
        padding: 15px;
    }
}
