/* --- ADDED CSS VARIABLES FOR CUSTOMIZATION --- */
:root {
    --doc-font: "Times New Roman", Times, serif;
    --doc-border: 3px solid #000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--doc-font); /* NOW DYNAMIC */
    background-color: #525659;
    color: #000;
    counter-reset: pageNumber; 
}

/* ... (Baki saara tumhara pichla normal CSS code as it is rahega yaha se leke niche tak) ... */
.controls { width: 400px; background: #fff; padding: 20px; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; box-shadow: 2px 0 5px rgba(0,0,0,0.1); font-family: Arial, sans-serif; z-index: 10; }
.controls h2 { margin-bottom: 20px; font-size: 1.2rem; }
.report-container { margin-left: 420px; padding: 20px; display: flex; flex-direction: column; align-items: center; }
.cover-page { text-align: center; display: flex; flex-direction: column; justify-content: flex-start; }
.uni-name { font-size: 26px; font-weight: bold; color: #cc0000; margin-top: 5mm; margin-bottom: 20px; }
.logos { display: flex; justify-content: space-between; padding: 0 35px; margin-bottom: 25px; align-items: center; }
.logo { width: 140px; height: auto; }
.college-name { font-size: 18px; font-weight: bold; margin-bottom: 40px; }
.report-title-section { margin-bottom: 60px; }
.report-title-section h2 { font-size: 20px; margin-bottom: 10px; }
.report-title-section h1 { font-size: 22px; text-transform: uppercase; line-height: 1.5; }
.submission-details { text-align: left; margin: 0 auto; width: 75%; font-size: 18px; padding: 10px; border: none; background: transparent; }
.submission-details p { margin-bottom: 15px; }
.academic-year { margin-top: auto; margin-bottom: 15mm; font-size: 16px; }
.content-page h3 { font-size: 18px; text-transform: uppercase; margin-top: 25px; margin-bottom: 15px; }
.content-page p { margin-bottom: 15px; text-align: justify; font-size: 17px; }
.content-page ul { margin-bottom: 15px; padding-left: 30px; font-size: 17px; }
.content-page li { margin-bottom: 8px; text-align: justify; }
.video-entry { margin-bottom: 25px; }
.video-entry ul { list-style-type: disc; padding-left: 25px; margin-bottom: 0; }
.video-entry li { margin-bottom: 8px; text-align: left; font-size: 17px; line-height: 1.5; }
.thank-you { text-align: center; margin-top: 50px; }
.page { width: 210mm; height: 297mm; box-sizing: border-box; background: white; margin: 0 auto 20px auto; padding: 25mm 25mm; position: relative; overflow: hidden; line-height: 1.6; counter-increment: pageNumber; }

/* THE SQUARE BOUNDARY (DYNAMIC BORDER HERE) */
.page::before {
    content: "";
    position: absolute;
    top: 12mm; bottom: 12mm; left: 12mm; right: 12mm;
    border: var(--doc-border); /* NOW DYNAMIC */
    pointer-events: none; 
    z-index: 10;
}

.page::after { content: counter(pageNumber); position: absolute; bottom: 18mm; right: 22mm; font-size: 14px; font-family: "Times New Roman", Times, serif; font-weight: bold; }

@page { size: A4 portrait; margin: 0; }
@media print {
    html, body { margin: 0; padding: 0; background: white; }
    .hide-on-print { display: none !important; }
    .report-container { margin: 0 !important; padding: 0 !important; }
    .page { width: 210mm !important; height: 297mm !important; min-height: 297mm !important; max-height: 297mm !important; margin: 0 !important; box-shadow: none !important; page-break-after: always; page-break-inside: avoid; position: relative !important; }
    .page::before {
        content: ""; position: absolute !important; top: 12mm !important; bottom: 12mm !important; left: 12mm !important; right: 12mm !important;
        border: var(--doc-border) !important; /* DYNAMIC IN PRINT TOO */
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
}
@media screen and (max-width: 768px) {
    .controls { position: relative; width: 100%; height: auto; padding: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); z-index: 100; }
    .report-container { margin-left: 0; padding: 10px; }
    .page { width: 100%; height: auto; min-height: auto; padding: 20px 15px; margin-bottom: 20px; }
    .page::before { top: 8px; bottom: 8px; left: 8px; right: 8px; border: var(--doc-border); }
    .page::after { bottom: 12px; right: 15px; font-size: 12px; }
    .uni-name { font-size: 18px; margin-top: 15px; }
    .logos { padding: 0; margin-bottom: 15px; }
    .logo { width: 80px; }
    .college-name { font-size: 14px; margin-bottom: 20px; }
    .report-title-section h1 { font-size: 18px; }
    .report-title-section h2 { font-size: 16px; }
    .submission-details { width: 100%; font-size: 14px; margin-top: 20px; }
    .academic-year { font-size: 14px; margin-bottom: 20px; margin-top: 40px; }
    .content-page h3 { font-size: 16px; }
    .content-page p, .content-page ul, .content-page li { font-size: 14px; }
}