html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1, h2, h3, h4 {
    color: #003366;
}

h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.sneak {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

#studentList {
    padding: 0;
    margin: 0;
    list-style: none;
}

#studentList li {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#studentList li a {
    text-decoration: none;
    color: #333;
}

#studentList li a:hover {
    text-decoration: none;
    font-weight: bold;
    color: #333;
}

#studentList button {
    margin-left: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    background: #0078ff;
    color: #fff;
    cursor: pointer;
}

#studentList button:hover {
    background: #0056b3;
}

#studentDetails {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

#studentDetails h3 {
    margin-top: 0;
}

#studentDetails div {
    margin-bottom: 1rem;
}

#studentDetails button {
    margin-left: 5px;
    padding: 5px 10px;
    border: none;
    border-radius: 8px;
    background: #0078ff;
    color: #fff;
    cursor: pointer;
}

#studentDetails button:hover {
    background: #0056b3;
}

form {
    display: flex;
    margin-bottom: 2rem;
}

form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

form, body {
    overflow: visible;
}

form button {
    padding: 8px 12px;
    border: none;
    background: #0078ff;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
}

form button:hover {
    background: #0056b3;
}

.button2 {
    background: none;
    color: black;
    border: none;
    margin: -0.5rem;
    font-size: 15px;
}

.button2:hover {
    background: none;
}

@media screen and (max-width: 600px) {
    body {
        padding: 1rem;
    }
    #studentList li {
        flex-direction: column;
        align-items: flex-start;
    }
    #studentList button {
        margin-top: 5px;
    }
}














a {
    color: #0055aa;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: none;
    color: #003366;
}

.section {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 0.5rem;
    text-align: left;
}

th {
    background-color: #eaf1ff;
    color: #003366;
}

button {
    margin: 2px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background-color: #0055aa;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background-color: #003366;
}

input, select {
    margin: 0.3rem 0.3rem 0.3rem 0;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.add-btn {
    margin-left: 0.5rem;
}

@media screen and (max-width: 600px) {
    form {
        flex-direction: column;
        align-items: flex-start;
    }

    button.add-btn {
        margin-left: 0;
        margin-top: 0.3rem;
    }

    th, td {
        font-size: 0.9rem;
    }
}





.footer {
    text-align: center;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    padding: 10px 0;
    width: 100%;
    margin-top: 20px;

}

.footer a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: none;
}









header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 10px 20px;
}

header nav button {
    font-size: 1.5rem;
    padding: 5px 10px;
    cursor: pointer;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

nav button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
}
nav button:hover {
    background: #0056b3;
}

#calendarContainer {
    max-width: 700px;
    margin: 10px auto;
}

#weekdayRow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    background: white;
    border: 1px solid #ccc;
    height: 100px;
    padding: 5px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-wrap: break-word;
    word-break: break-word;
}

.day:hover {
    background: #f0f0f0;
}

.date {
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
}

.today {
    background-color: #f5e6c8;
}

.event {
    background: #e3f2fd;
    color: #000;
    margin-top: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-word;
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #444;
    padding: 20px;
    border-radius: 6px;
    z-index: 1000;
    max-width: 300px;
    text-align: center;
}

#popup h3 {
    margin-top: 0;
}

#popup button {
    margin-top: 10px;
    padding: 5px 10px;
    cursor: pointer;
}

@media screen and (max-width: 700px) {
    #weekdayRow {
        display: none;
    }
    #calendar {
        grid-template-columns: 1fr;
    }
    .day {
        height: auto;
    }
    header {
        flex-direction: column;
        gap: 10px;
    }
    nav button {
        font-size: 0.9rem;
    }
}