body {
    overflow-x: hidden;
    margin: 0;
    font-family: sans-serif;
}

/* --- Message Box --- */
.message-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0.9;
    font-size: 0.9em;
    animation: fadeout 3s forwards;
}

@keyframes fadeout {
    0% { opacity: 0.9; }
    80% { opacity: 0.9; }
    100% { opacity: 0; display: none; }
}

/* Table Container */
.table-container {
    position: relative;
    overflow-x: auto;
    margin: 0 10px;
    max-width: 100%;
}

/* Table */
table {
    border-collapse: collapse;
    text-align: center;
    margin: -57px auto 20px auto; /* Reduced top margin from 40px to 10px */
    padding-bottom: 50px;
    width: 95%;
    table-layout: fixed;
    font-size: 0.9rem;
    font-weight: bolder;
}

td, th {
    border: 2px solid black;
    padding: 6px;
    font-size: 0.85rem;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    width: 74px;
    height: 45px;
    text-align: center;
    vertical-align: middle;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: #61aafd;
    color: white;
    border-bottom: 2px solid #555;
    font-size: 0.9rem;
}

/* Header parts */
.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.vit-logo {
    height: 25px;
    width: auto;
    margin-right: 8px;
    border: 2px solid black;
}

.campus {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.header-middle {
    flex: 2;
    text-align: center;
}

.header-middle h1 {
    margin: 0;
    font-size: 1.6em;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 9px;
}

/* --- Quote + Search container --- */
.top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin-top: 10px;
}

.motivational {
    width: 300px;
    padding: 20px;
    background-color: #fffcff;
    border-right: 2px solid #ffffff;
    flex-shrink: 0;
    margin-top: 17px;
    margin-bottom: 13px;
    margin-left: 19px;
}

.motivational p {
    font-size: 1em;
    line-height: 1.5;
    color: #3d123c;
    font-style: italic;
    text-align: center;
    margin: 0;
}

.search-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

#myInput {
    padding: 10px 16px;
    font-size: 1rem;
    width: 280px;
    border: 1px solid #aaa;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
    color: #333;
    font-weight: bold;
    margin-top: -156px;
}

#myInput:focus {
    outline: none;
    border-color: #61aafd;
    box-shadow: 0 0 6px #61aafd;
}

/* Button Styling */
.teams-button,
#downloadBtn {
    background-color: #bedefc;
    color: #000000;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
}
#resetBtn,
#shareBtn{
    background-color: #bedefc;
    color: #000000;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: -96px;
    margin-bottom: 72px;
}

.teams-button:hover,
#resetBtn:hover,
#shareBtn:hover,
#downloadBtn:hover {
    background-color: #36363c;
    color: #fff;
}

/* Day/Prompt cells */
.day, .prompt {
    background-color: rgb(173 173 173);
    color: black;
    font-weight: bold;
    width: 80px;
}

/* Lunch cell */
.lunch {
    background-color: #acacac;
    color: #0c0c0c;
    border: 2px solid #0d0d0d;
    width: 50px;
    font-weight: bolder;
    font-size: 0.9rem;
}

/* Theory & Lab Hours */
.theory_hours, .lab_hours {
    border: 2px solid black;
    background-color: rgb(255, 248, 248);
}

/* Periods */
.period {
    background-color: #e3ffef;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period:hover {
    background-color: #96ffb4;
}

.teams-link {
    text-decoration: none;
}

/* 🔎 Filters */
.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 0; /* Reduced bottom margin */
    width: 95%;
    gap: 12px;
}

#creditFilter {
    padding: 10px 16px;
    font-size: 1rem;
    width: 240px;
    border: 1px solid #aaa;
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
    color: #333;
    font-weight: bold;
}

#creditFilter:focus {
    width: 280px;
    outline: none;
    border-color: #61aafd;
    box-shadow: 0 0 6px #61aafd;
}

/* Campus dropdown and other controls */
.top-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 95%;
    margin: 10px auto;
    gap: 15px;
}

.campus-container label {
    font-weight: bold;
}

#campus-select {
    padding: 8px 12px;
    font-size: 1rem;
    border: 1px solid #aaa;
    border-radius: 8px;
}

/* Table buttons positioned above the table */
.table-buttons {
    display: flex;
    justify-content: flex-end;
    width: 95%;
    margin: 5px auto 0; /* Reduced top margin to 5px */
    gap: 10px;
}

/* Download Button (bottom) */
.download-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

/* Caption */
.label h1 {
    text-align: center;
    margin: 16px 0 10px 0;
    color: #9c27b0;
    font-size: 1.8em;
}

/* Highlight search results */
.highlight {
    background-color: #f1d76e !important;
    font-weight: bold;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
}

/* New CSS for the slot buttons */
.slot-btn, .labslot {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin: 4px;
    transition: all 0.2s ease-in-out;
    min-width: 50px;
}

.slot-btn.green {
    background-color: #4CAF50;
}

.slot-btn.orange {
    background-color: #FF9800;
}

.slot-btn.yellow {
    background-color: #FFEB3B;
    color: #333;
}

.labslot{
    background-color: #c673f5;
}

/* New: Style for active slot buttons */
.slot-btn.active, .labslot.active {
    background-color: #61aafd;
    color: white;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
    transform: translateY(0);
}

.slot-btn:hover, .labslot:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.morning, .Evening, .Labs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* Style for the selected slots */
.period.selected {
    background-color: #95d14e;
    color: white;
    font-weight: bold;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
    transform: scale(1.02);
}

/* --- Footer Styles --- */
footer {
    background-color: #2C3E50;
    color: #e0e0e0;
    padding: 15px 40px; 
    font-family: sans-serif;
    text-align: center;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    text-align: left;
    padding: 0 20px;
    margin-right: -112px;
    margin-left: -104px;
}

.footer-section.links {
    text-align: right;
}

.footer-section h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #4a90e2;
    margin-top: 5px;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ffffff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #fff;
    transform: scale(1.1);
    background-color: #357ABD;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
text-align: center;
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid #ffffff;
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-bottom: -19px;
}
/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    /* Header */
    header { flex-direction: column; align-items: center; text-align: center; padding: 12px 10px; }
    .header-left, .header-middle, .header-right { justify-content: center; margin-bottom: 8px; }
    .vit-logo { height: 30px; }
    .campus { font-size: 1.2rem; }
    .header-middle h1 { font-size: 1.4em; }

    /* Top Section */
    .top-section { flex-direction: column; padding: 10px; }
    .motivational, .search-container { width: 90%; margin: 0 auto; }
    #myInput { width: 100%; margin-top: 12px;}

    /* Table */
    table { font-size: 0.85rem; }
    .table-container { margin: 0 5px; }

    /* Footer */
    .footer-container { flex-direction: column; text-align: center; gap: 10px; }
    .footer-section { text-align: center; padding: 0; margin-left: 53px; }
    .footer-section.links { text-align: center;  }
    .footer-section ul { justify-content: center; }

    /* Buttons / Slots */
     .slot-btn, .labslot,
    #downloadBtn, .teams-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 60px;
        margin: 5px 4px;
    }
    #resetBtn, #shareBtn{
        margin-top: 15px;
        margin-bottom: -43px;
        margin-left: 24px;
        margin-right: 22px;
        padding: 10px 14px;
    }

}