:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --text-dark: #2c3e50;
    --background-light: #f4f6f7;
    --border-color: #e0e6ed;
    --white: #ffffff;
}

/* Container Styling */
.container {
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-top: 25px;
    border: 1px solid var(--border-color);
}

/* Main Heading Styling */
.main-heading, .heading {
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.main-heading::after, .heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.display-mark-update-div{
    margin: 20px 5px;
    text-align: center;
    padding: 20px;
    border: 1px solid #f00;
    background-color: #ffe6e6;
    color: #d8000c;
}

/* Form Styling */
#insertResultForm, form {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Table Styling */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.table tr {
    transition: background-color 0.3s ease;
}

.table tr:nth-child(even) {
    background-color: #f9f9fc;
}

.table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.title-tr {
    background-color: transparent;
}

.title-tr td {
    padding: 12px 15px;
    vertical-align: middle;
}

.title-tr td:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

/* Students Container */
.student-list {
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
}

.submit-button-div{
    display: flex;
    justify-content: center;
}

/* === CSV Instructions Section === */
.csv-section {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.csv-section .csv-instructions {
    text-align: center;
    margin-bottom: 15px;
}

.csv-section .csv-instructions h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.csv-section .csv-instructions p {
    font-size: 0.95rem;
    color: #555;
    margin: 0 auto;
    max-width: 700px;
}

.csv-section .download-template{
    height: -webkit-fill-available;
}

.csv-section .download-template:hover,
.csv-section .upload-template:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease-in-out;
}
.csv-section .btn i {
    vertical-align: middle;
    margin-right: 4px;
}

/* === CSV Upload & Download Button Group === */
.student-list .d-flex.flex-wrap.gap-2.mb-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Increased gap between the two buttons */
    margin-bottom: 25px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 25px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* Individual Form Containers */
.student-list .d-flex.flex-wrap.gap-2.mb-3 form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* File Input */
.student-list input[type="file"].form-control-file {
    padding: 6px 10px;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-list input[type="file"].form-control-file:hover {
    background-color: #e9f2fb;
    border-color: var(--primary-color);
}

/* Buttons */
.student-list button.btn.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px 18px;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.student-list button.btn.btn-secondary:hover {
    background-color: #2c80c4; /* slightly darker shade of primary color */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.student-list button.btn.btn-secondary:active {
    background-color: #256ea8;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* Responsive Layout */
@media (max-width: 768px) {
    .student-list .d-flex.flex-wrap.gap-2.mb-3 {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .student-list .d-flex.flex-wrap.gap-2.mb-3 form {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .student-list button.btn.btn-secondary {
        width: 100%;
        text-align: center;
    }
}

