/* ==============================
   外层容器
============================== */
.mwg-worksheet-wrapper {
    margin: 20px auto;
    font-family: 'Arial', sans-serif;
    color: #333;
}

.page-preview {
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fff;
    overflow: auto;
    min-height: 400px;
}

/* Worksheet 容器 */
.worksheet-container {
    transform-origin: top left;
}

.worksheet {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Header */
.header table {
    width: 100%;
    margin-bottom: 20px;
}
.header .logo {
    width: 50px;
    height: 50px;
    background-color: #007bff;
    border-radius: 50%;
}
.header .title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
}

/* 学生信息 */
.student-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Answer Sheet 标题 */
.answersheet-title {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Problem Table */
.problem-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.problem-table td {
    padding: 5px 10px;
    vertical-align: middle;
}
.problem-table.horizontal td {
    width: 50%;
}
.problem-line {
    display: inline-block;
    font-size: 16px;
}
.problem-number {
    font-weight: bold;
    margin-right: 5px;
}
.operand, .operator, .equal, .answer {
    display: inline-block;
    min-width: 20px;
    text-align: right;
}
.operator { margin: 0 5px; }
.equal { margin: 0 5px; }
.answer { font-weight: bold; }

/* Footer */
.footer {
    font-size: 12px;
    text-align: center;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* 按钮 */
.btn-worksheet { margin-bottom: 5px; }

/* 打印 / PDF */
@media print {
    body * { visibility: hidden; }
    .worksheet, .worksheet * { visibility: visible; }
    .worksheet { margin: 0; width: 100%; transform: scale(1) !important; padding: 0; }
}