/* General Page Styles */
body {
    background-color: #f4f4f4;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    color: #000000;
}

/* Fixed Width Main Layout (Retro feel) */
#main-content {
    width: 800px;
    margin: 15px auto;
    background-color: #ffffff;
    border: 1px solid #999999;
    padding: 20px;
    box-sizing: border-box;
}

/* Gov Header Styling */
#gov-header {
    background-color: #002e6e;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    border-bottom: 3px solid #ff9933; /* Indian Tri-color or State style accent bar */
}

.gov-flag-bar {
    height: 6px;
    background: linear-gradient(to right, #ff9933 33.3%, #ffffff 33.3%, #ffffff 66.6%, #128807 66.6%);
    border-bottom: 1px solid #333;
}

#gov-header h1.main-title {
    font-family: "Times New Roman", Times, serif;
    font-size: 26px;
    margin: 5px 0;
    font-weight: bold;
    letter-spacing: 1px;
}

#gov-header h2.sub-title {
    font-size: 13px;
    margin: 5px 0 10px 0;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: #e0e8f5;
}

#gov-header h3.section-title {
    font-size: 15px;
    background-color: #ff9933;
    color: #000000;
    display: inline-block;
    padding: 4px 15px;
    margin: 5px 0;
    font-weight: bold;
    border: 1px solid #000;
}

/* Scrolling Announcement */
.marquee-container {
    background-color: #ffffcc;
    border-bottom: 1px solid #cccc99;
    padding: 4px 0;
    font-size: 12px;
    color: #cc0000;
    font-weight: bold;
}

/* Login Form Styles */
fieldset {
    border: 2px groove #999999;
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
    color: #002e6e;
    font-size: 16px;
    padding: 0 8px;
}

.form-table {
    width: 100%;
    border: none;
}

.form-table td {
    padding: 8px;
    border: none;
}

.form-label {
    text-align: right;
    width: 35%;
    font-weight: bold;
    font-size: 13px;
}

.form-input {
    text-align: left;
    width: 65%;
}

.form-input input[type="text"],
.form-input input[type="password"] {
    width: 220px;
    padding: 4px;
    font-size: 13px;
    border: 1px solid #7a7a7a;
    background-color: #ffffff;
    box-sizing: border-box;
}

/* CAPTCHA Styling */
.captcha-box {
    display: inline-block;
    background-color: #e8e8e8;
    border: 1px dashed #666;
    padding: 4px 10px;
    margin-bottom: 5px;
}

.captcha-text {
    font-family: "Courier New", Courier, monospace;
    font-size: 18px;
    font-weight: bold;
    color: #8b0000;
    letter-spacing: 4px;
    user-select: none;
}

.small-btn {
    font-size: 11px;
    padding: 2px 5px;
    margin-left: 8px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #999;
}

.required-star {
    color: #ff0000;
    font-weight: bold;
    margin-left: 5px;
}

.form-actions {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dotted #ccc;
}

/* Retro Bevelled Buttons */
button[type="submit"],
button[type="reset"],
.action-btn {
    background-color: #e1e1e1;
    border: 2px outset #ffffff;
    color: #000000;
    font-weight: bold;
    font-size: 13px;
    padding: 5px 15px;
    cursor: pointer;
    margin: 0 10px;
}

button[type="submit"]:active,
button[type="reset"]:active,
.action-btn:active {
    border: 2px inset #ffffff;
    background-color: #d1d1d1;
}

/* Instructions Box */
.instructions-box {
    border: 1px solid #ddccaa;
    background-color: #fffef0;
    padding: 10px 15px;
    margin-top: 15px;
    font-size: 12px;
}

.instruction-heading {
    margin: 0 0 5px 0;
    color: #cc3300;
    font-weight: bold;
}

.instructions-box ul {
    margin: 0;
    padding-left: 20px;
}

.instructions-box li {
    margin-bottom: 5px;
}

/* Results Sheet Styles */
.result-header-actions {
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.marksheet-title {
    text-align: center;
    margin-bottom: 20px;
}

.marksheet-title h3 {
    margin: 0;
    font-size: 20px;
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
}

.marksheet-title h4 {
    margin: 2px 0;
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
}

.marksheet-title h5 {
    margin: 2px 0;
    font-size: 13px;
    font-weight: normal;
}

/* Tables Styling (Basic & Dull) */
/* Semester Select Dropdown styling */
.semester-select-bar {
    text-align: left;
    margin-bottom: 15px;
    font-size: 13px;
}

.semester-select-bar select {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #7a7a7a;
    background-color: #ffffff;
    font-family: Arial, sans-serif;
}

/* Student Info Table (Basic & Dull) */
.student-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13px;
}

.student-info-table th,
.student-info-table td {
    border: 1px solid #000000;
    padding: 6px;
}

/* Marks Table Styled EXACTLY Like Image */
.marks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13.5px;
    border: 1px solid #dddddd; /* Outer border */
    font-family: Arial, Helvetica, sans-serif;
}

.marks-table th {
    background-color: #f5f5f5; /* Light grey header */
    font-weight: bold;
    color: #333333;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #dddddd;
    border-top: none;
    border-left: none;
    border-right: none;
}

.marks-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #eeeeee; /* Thin row separators */
    border-top: none;
    border-left: none;
    border-right: none;
    color: #333333;
}

/* Subject Code and Name specific overrides */
.marks-table td.subject-code {
    width: 15%;
}

.marks-table td.subject-name {
    width: 60%;
}

.marks-table td.subject-credits {
    width: 12%;
}

.marks-table td.subject-grade {
    width: 13%;
    font-weight: bold;
    color: #000000;
}

/* Result Status Font Styles */
.pass-text {
    color: #008000;
    font-weight: bold;
}

.fail-text {
    color: #cc0000;
    font-weight: bold;
}

/* Footer Section */
#gov-footer {
    width: 800px;
    margin: 15px auto 30px auto;
    text-align: center;
    font-size: 11px;
    color: #555555;
    border-top: 1px solid #ccc;
    padding-top: 10px;
}

#gov-footer p {
    margin: 3px 0;
}

.small-text {
    font-size: 10px;
    color: #888888;
}

.bold {
    font-weight: bold;
}

.text-center {
    text-align: center;
}

/* Print Overrides */
@media print {
    body {
        background-color: #ffffff;
    }
    
    #gov-header,
    .marquee-container,
    .no-print,
    #gov-footer {
        display: none !important;
    }
    
    #main-content {
        width: 100%;
        border: none;
        padding: 0;
        margin: 0;
    }
    
    .student-info-table th,
    .student-info-table td,
    .marks-table th,
    .marks-table td {
        border: 1px solid #000000 !important;
    }
}
