@charset "utf-8";

/* =========================
   核心容器与重置
   ========================= */
.mcon.pb10 {
    padding: 10px; /* 增加内边距，更有呼吸感 */
    background: #fff;
    border-radius: 12px;
    box-sizing: border-box;
    /* 移除掉之前的 inline padding 重置，统一控制 */
}

/* ===== 表格布局优化 ===== */
.table1 {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.table1 th,
.table1 td {
    padding: 15px; /* 增大触控和视觉区域 */
    border: none;
    font-size: 14px;
    line-height: 1.6;
    vertical-align: middle;
}

/* 左侧标题列 - 改为自适应宽度，不再写死 200px */
.table1 th {
    width: 30%; 
    max-width: 150px;
    text-align: right;
    color: #606266;
    font-weight: 500;
}

/* 右侧内容列 */
.table1 td {
    text-align: left;
}

/* ===== 输入框与结果框 ===== */
.inpt {
    width: 100%; /* 默认全宽，由 td 控制宽度 */
    max-width: 300px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    color: #303133;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-sizing: border-box;
    outline: none;
}

.inpt:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

/* 结果框特有样式 - 增加背景色区分 */
input.inpt[readonly] {
    background-color: #f5f7fa;
    border-color: #e4e7ed;
    color: #ff4d4f; /* 结果用绿色或者主色 */
    font-weight: bold;
    cursor: default;
}

/* ===== 按钮设计 ===== */
.table1 td[colspan="2"] {
    text-align: center;
    padding-top: 15px;
}

.btn1 {
    min-width: 120px;
    height: 38px;
    padding: 0 24px;
    border-radius: 20px; /* 圆角按钮 */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
}

#btnCalculat {
    background: #1677ff;
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 119, 255, 0.2);
}

#btnCalculat:hover {
    background: #4096ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
}

#btnReset {
    background: #fff;
    border: 1px solid #dcdfe6;
    color: #606266;
}

#btnReset:hover {
    color: #1677ff;
    border-color: #1677ff;
    background: #f0f7ff;
}

/* ===== 结果数值强调 ===== */
#znts, #znje {
    color: #f56c6c;
    font-size: 24px;
    font-weight: bold;
    margin: 0 4px;
}

/* ===== 移动端自适应 (Mobile First 思路优化) ===== */
@media screen and (max-width: 768px) {
    .mcon.pb10 {
        padding: 10px 15px;
    }

    /* 标题居左，不再右对齐 */
    .table1 th {
        display: block;
        width: 100% !important;
        max-width: none;
        text-align: left !important;
        padding: 10px 0 5px 0;
    }

    .table1 td {
        display: block;
        width: 100% !important;
        padding: 5px 0 15px 0;
    }

    .inpt {
        max-width: none; /* 移动端占满全宽 */
        height: 36px; /* 增加点击区域 */
    }

    /* 按钮容器改为并排 */
    .table1 td[colspan="2"] {
        display: flex !important;
        gap: 12px;
        padding-top: 10px;
    }

    .btn1 {
        flex: 1;
        margin: 0;
        min-width: 0;
    }
}