/* DOT计算器 2026 样式 */

/* 字体定义 */
@font-face {
    font-family: 'FZYaShiHei';
    src: url('../font/FZYaShiHei-DemiBold.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #3699cd 0%, #b2e8ea 100%);
    min-height: 100vh;
    color: #2666b5;
}

.container {
    max-width: 100%;
    padding: 20px 15px;
    margin: 0 auto;
}

/* 标题 */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.title-img {
    width: 80%;
    max-width: 350px;
}

/* 产品对比图 */
.products-header {
    text-align: center;
    margin-bottom: 20px;
}

.products-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.product-top-img {
    width: 30%;
    max-width: 120px;
}

.products-img {
    width: 100%;
    max-width: 500px;
}

.products-3in1 {
    width: 100%;
    margin-bottom: 0;
    display: block;
}

/* 输入区域 */
.input-section {
    margin-bottom: 15px;
}

.input-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.input-label {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    width: 70px;
    text-align: right;
}

.input-wrapper {
    border-bottom: 1px solid #fff;
    width: 40%;
    max-width: 180px;
    margin: 0 10px;
}

.input-field {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 5px;
    outline: none;
}

.input-field::placeholder {
    color: #a8d5ea;
    opacity: 0.6;
    font-size: 10px;
}

.input-unit {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    width: 30px;
}

/* 计算按钮 */
.btn-row {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.calculate-btn {
    background: #fff;
    color: #3b82f6;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 40px;
    border: none;
    border-radius: 25px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:active {
    transform: scale(0.95);
}

/* 提示文案 */
.notice {
    color: #2666b5;
    font-size: 11px;
    text-align: left;
    margin: 15px 0 10px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* 计算结果区域 */
.result-section {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0 0 15px 0;
    margin-bottom: 15px;
    overflow: hidden;
}

/* 表头 */
.result-header {
    display: flex;
    margin-bottom: 10px;
}

.result-header .col {
    text-align: center;
}

.product-icon {
    width: 90%;
    max-width: 100px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 10px;
    color: #2666b5;
    font-weight: 600;
}

/* 列布局 */
.col {
    flex: 1;
    padding: 0 3px;
}

/* 结果行 */
.result-row {
    margin-bottom: 12px;
    padding: 0 10px;
}

.result-row.border-bottom {
    border-bottom: 1px solid #5293c9;
    padding-bottom: 12px;
}

.row-title {
    color: #2666b5;
    font-size: 13px;
    font-weight: 700;
    font-family: 'FZYaShiHei', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin-bottom: 6px;
}

.row-title .subtitle {
    font-size: 9px;
    font-weight: 500;
    color: #2666b5;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 -1px 0 #fff,
        0 1px 0 #fff,
        -1px 0 0 #fff,
        1px 0 0 #fff;
    margin-left: 3px;
}

.row-content {
    display: flex;
}

/* 剂量框 */
.dose-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 8px 5px;
    text-align: center;
    font-size: 10px;
    color: #2666b5;
}

/* 价格框 */
.price-box {
    border-radius: 20px;
    padding: 8px 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

/* 艾莎妥昔单抗 - 紫色系 */
.purple {
    background: rgba(147, 51, 234, 0.9);
}

.purple-light {
    background: rgba(147, 51, 234, 0.6);
}

.purple-medium {
    background: rgba(147, 51, 234, 0.75);
}

.purple-dark {
    background: rgba(147, 51, 234, 1);
}

/* 达雷妥尤单抗IV - 蓝色系 */
.blue {
    background: rgba(59, 130, 246, 0.9);
}

.blue-light {
    background: rgba(59, 130, 246, 0.6);
}

.blue-medium {
    background: rgba(59, 130, 246, 0.8);
}

.blue-dark {
    background: rgba(59, 130, 246, 1);
}

/* 达雷妥尤单抗SC - 黄色系 */
.yellow {
    background: rgba(251, 191, 36, 0.9);
}

.yellow-light {
    background: rgba(251, 191, 36, 0.6);
}

.yellow-medium {
    background: rgba(251, 191, 36, 0.8);
}

.yellow-dark {
    background: rgba(251, 191, 36, 1);
}

/* 底部说明 */
.footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-right: 5px;
}

.footer-img {
    width: 100px;
    height: auto;
}

/* 数字字体 */
.price-box,
.dose-box {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

/* 隐藏 number input 的上下箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* 响应式 */
@media (max-width: 375px) {
    .product-icon {
        max-width: 80px;
    }

    .price-box {
        font-size: 10px;
        padding: 6px 3px;
    }

    .dose-box {
        font-size: 9px;
    }

    .row-title {
        font-size: 11px;
    }
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* Loading */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-mask.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 新版表头样式 - 纯CSS实现 */
.result-header-css {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    /* 增加底部间距 */
    align-items: stretch;
    padding-top: 10px;
    /* 为顶部标签留出空间 */
}

/* 卡片基础样式 */
.header-card {
    flex: 1;
    position: relative;
    border-radius: 12px 12px 0 0;
    /* 上方圆角 */
    padding: 25px 2px 8px 2px;
    /* Top padding reserved for badge */
    text-align: center;
    margin: 0 1px;
    /* 微小间隙 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
}

/* 顶部标签 (IV/SC) */
.header-badge {
    position: absolute;
    top: -8px;
    /* 向上突出 */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    padding: 2px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    /* 增加立体感 */
    z-index: 10;
}

/* 标签折角效果 (Optional, visual candy) */
.header-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    /* border-right: 10px solid blue; */
    /* 这里可以做一些复杂的折角，但目前先保持简单的圆角标签 */
}

/* 药物名称 */
.drug-name {
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
    white-space: nowrap;
    transform: scale(0.95);
    /* 防止换行 */
}

/* 注射类型 */
.drug-type {
    color: #fff;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.9;
    transform: scale(0.9);
}

.drug-type.highlight {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    /* 皮下注射 特殊高亮 */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
    padding: 0 4px;
}

/* 灰色系 (艾莎) */
.card-gray {
    /* 模拟图中的灰色渐变，看起来有金属质感 */
    background: linear-gradient(180deg, #aaddf0 0%, #9ca3af 100%);
    /* 修正: 图中左侧其实是灰色，但有一点点蓝调？ 或者是单纯的灰色? 
       参考图38465ba 左上角是灰色的。
       尝试用 #94a3b8 到 #64748b */
    background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 实际上图1左侧是灰色渐变 */
.card-gray {
    background: linear-gradient(180deg, #bfbfbf 0%, #8c8c8c 100%);
}

.badge-gray {
    background: linear-gradient(180deg, #a3a3a3 0%, #737373 100%);
    /* 给一个小尾巴效果? 不，图1看起来就是直的 */
    /* 增加一个深色的小三角形在左下角产生阴影效果? */
}

/* Badge 折角阴影 */
.header-badge::after {
    content: '';
    position: absolute;
    bottom: -6px;
    /* 调整位置 */
    right: -4px;
    /* 右侧折角 */
    /* 这里太复杂，先做简单的阴影 */
}

/* 蓝色系 (IV) */
.card-blue {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.badge-blue {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

/* 黄色系 (SC) */
.card-yellow {
    background: linear-gradient(180deg, #fcd34d 0%, #d97706 100%);
}

.badge-yellow {
    background: linear-gradient(180deg, #fbbf24 0%, #b45309 100%);
}

/* 适配移动端字体大小 */
@media (max-width: 375px) {
    .drug-name {
        font-size: 9px;
        transform: scale(0.9);
    }

    .drug-type {
        font-size: 8px;
        transform: scale(0.85);
    }
}