.report-container {
    background: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.report-header {
    text-align: center;
    margin-bottom: 20px;
}

.report-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: normal;
}

.student-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    text-align: left;
    font-size: 14px;
    margin-bottom: 20px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    /* 移动端表格列较多，确保可左右滑动查看 */
    min-width: 980px;
}

.report-table th, .report-table td {
    border: 1px solid #000;
    padding: 8px;
    text-align: center;
}

.report-table th {
    background-color: #f5f5f5; /* Light gray for header */
}

.report-footer {
    margin-top: 20px;
    font-size: 14px;
}

/* Desktop Styles */
@media (min-width: 768px) {
    body {
        background-color: #f0f2f5;
        padding: 20px;
    }

    .container {
        max-width: 900px;
        margin: 0 auto;
    }

    .report-container {
        background: #fff;
        padding: 40px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        margin-top: 20px;
        /* A4 ratio approx */
        min-height: 1000px; 
    }

    .student-info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .controls {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .header {
        background: #fff;
        padding: 15px 20px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        margin-bottom: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    @page {
        size: A4;
        margin: 2cm;
    }
    body {
        background: #fff;
        padding: 0;
        margin: 0;
        font-family: "SimSun", "Songti SC", serif; /* Use serif for print looks */
    }
    .container {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    .report-container {
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        width: 100%;
        min-height: auto;
    }
    .table-scroll {
        overflow: visible !important;
    }
    .report-table {
        min-width: 0;
        width: 100%;
    }
    .report-table th {
        background-color: transparent !important; /* Remove background for print */
    }
    .student-info-grid {
        grid-template-columns: repeat(3, 1fr); /* More columns on print paper usually fits */
    }
    .controls, .header, .back-btn {
        display: none !important;
    }
}
