/* ===== 计算器工具样式 ===== */
.jisuanqi-tool {
    width: 100%;
    max-width: 100%;
}

.jisuanqi-tool-body {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 20px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    max-width: 480px;
    margin: 0 auto;
}

/* ===== 模式切换 ===== */
.jisuanqi-mode-switch {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.jisuanqi-mode-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: #f5f5f5;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: #666;
}
.jisuanqi-mode-btn:first-child {
    border-right: 1px solid #ddd;
}
.jisuanqi-mode-btn:hover {
    background: #e8e8e8;
}
.jisuanqi-mode-btn.active {
    background: #ff6b00;
    color: #fff;
}
.jisuanqi-mode-btn.active:hover {
    background: #e05f00;
}

/* ===== 显示屏 ===== */
.jisuanqi-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    border: 1px solid #e8e8e8;
}
.jisuanqi-expression {
    font-size: 14px;
    color: #999;
    min-height: 22px;
    word-break: break-all;
    text-align: right;
    width: 100%;
}
.jisuanqi-result {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    word-break: break-all;
    text-align: right;
    width: 100%;
    transition: font-size 0.1s;
}
.jisuanqi-result.small {
    font-size: 24px;
}
.jisuanqi-result.error {
    color: #d32f2f;
    font-size: 18px;
}

/* ===== 按钮网格 ===== */
.jisuanqi-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.jisuanqi-buttons-scientific {
    grid-template-columns: repeat(4, 1fr);
}

.jsq-btn {
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
}
.jsq-btn:active {
    transform: scale(0.95);
}

/* 数字按钮 */
.jsq-btn-number {
    background: #f0f0f0;
    color: #222;
}
.jsq-btn-number:hover {
    background: #e5e5e5;
}

/* 零按钮跨2列 */
.jsq-btn-zero {
    grid-column: span 2;
}

/* 运算符按钮 */
.jsq-btn-operator {
    background: #e8f0fe;
    color: #1a73e8;
}
.jsq-btn-operator:hover {
    background: #d2e3fc;
}

/* 清除按钮 */
.jsq-btn-clear {
    background: #fce8e6;
    color: #d32f2f;
}
.jsq-btn-clear:hover {
    background: #fad2cf;
}

/* 等于按钮 */
.jsq-btn-equals {
    background: #ff6b00;
    color: #fff;
}
.jsq-btn-equals:hover {
    background: #e05f00;
}

/* 科学函数按钮 */
.jsq-btn-sci {
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 14px;
    padding: 14px 0;
}
.jsq-btn-sci:hover {
    background: #e8d5ff;
}

.jisuanqi-buttons-scientific .jsq-btn-sci {
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 500px) {
    .jisuanqi-tool-body {
        padding: 16px 12px 20px;
    }
    .jsq-btn {
        padding: 14px 0;
        font-size: 16px;
    }
    .jisuanqi-result {
        font-size: 26px;
    }
    .jisuanqi-result.small {
        font-size: 20px;
    }
    .jsq-btn-sci {
        font-size: 12px;
        padding: 12px 0;
    }
    .jisuanqi-mode-btn {
        font-size: 13px;
        padding: 8px 0;
    }
}