/* all page elements */
* {
    box-sizing: border-box;
}
/* the body section */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(
        to right top,
        #e6f7f1,
        #d8f4f7,
        #d3eefc,
        #dce8ff,
        #edf2ff
    );
}
/* the page wrapper */
#wrapper {
    width: 95%;
    max-width: 1000px;
    margin: 20px auto;
    border: 2px solid #000000;
    background-color: #f8f9fa;
}
/* the header section */
header {
    padding: 18px 10px;
    color: #ffffff;
    background-color: #394856;
    text-align: center;
}
/* the header heading */
header h1 {
    margin: 0;
}
/* the main section */
main {
    min-height: 400px;
    padding: 2em;
    background-color: #f8f9fa;
}
/* the home button */
.home-button {
    margin-bottom: 30px;
    text-align: center;
}
/* the home button link */
.home-button a {
    display: inline-block;
    padding: 10px 30px;
    color: #ffffff;
    background-color: #394856;
    border: 2px solid #394856;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
/* change the home button when hovered */
.home-button a:hover {
    color: #000000;
    background-color: #d8feff;
}
/* the homework table */
table {
    width: 60%;
    margin: 0 auto;
    border: 1px solid #000000;
    border-collapse: collapse;
}
/* the table headings and cells */
th,
td {
    border: 1px solid #000000;
    text-align: center;
}
/* the table heading */
th {
    padding: 12px;
    color: #ffffff;
    background-color: #394856;
    font-size: 1.1em;
}
/* the table rows */
tbody tr {
    background-color: #ffffff;
    transition: background-color 0.3s;
}
/* the alternating table rows */
tbody tr:nth-child(even) {
    background-color: #e6f7f1;
}
/* change the assignment color when hovered */
tbody tr:hover {
    background-color: #d8feff;
}
/* remove spacing from assignment cells */
td {
    padding: 0;
}
/* the assignment links */
td a {
    display: block;
    width: 100%;
    padding: 14px 10px;
    color: #2f6f94;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s, background-color 0.3s;
}
/* change the assignment link when hovered */
td a:hover {
    color: #ffffff;
    background-color: #2f6f94;
    text-decoration: none;
}
/* the ER diagram section */
.erd-section {
    padding: 20px;
    border: 1px solid #000000;
    background-color: #ffffff;
    text-align: center;
}
/* the ER diagram heading */
.erd-section h2 {
    margin-top: 0;
    color: #394856;
}
/* the ER diagram description */
.erd-section p {
    max-width: 750px;
    margin: 0 auto 25px;
    line-height: 1.5;
}
/* the ER diagram image */
.erd-image {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
    border: 1px solid #000000;
}
/* the footer section */
footer {
    padding: 10px;
    color: #ffffff;
    background-color: #394856;
    text-align: center;
}
/* mobile styles for screens 600 pixels wide or smaller,
   tested on an iPhone 17 Pro Max */
@media screen and (max-width: 600px) {
    /* make the page fill the phone screen */
    #wrapper {
        width: 100%;
        margin: 0;
        border: none;
    }
    /* make the header smaller */
    header {
        padding: 12px 8px;
    }
    header h1 {
        margin: 5px 0;
        font-size: 1.7em;
    }
    /* reduce the space around the page content */
    main {
        min-height: 400px;
        padding: 15px 8px;
    }
    /* make the home button fit the screen */
    .home-button {
        margin-bottom: 20px;
    }
    .home-button a {
        display: block;
        padding: 12px;
    }
    /* make the table fill the screen */
    table {
        width: 100%;
        font-size: 0.9em;
    }
    /* adjust the table heading */
    th {
        padding: 10px 5px;
    }
    /* make assignment links easier to tap */
    td a {
        padding: 14px 5px;
    }
    /* adjust the ER diagram section */
    .erd-section {
        padding: 10px;
    }
    /* make the ER diagram heading smaller */
    .erd-section h2 {
        font-size: 1.3em;
    }
    /* adjust the ER diagram description */
    .erd-section p {
        margin-bottom: 15px;
        font-size: 0.95em;
    }
    /* make the footer smaller */
    footer {
        padding: 8px;
        font-size: 0.9em;
    }
}