body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #003366; /* Modern blue */
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-weight: 700;
    font-size: 2.5rem;
}

main {
    flex: 1;
    padding: 20px;
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

#timetable h2 {
    color: #003366; /* Darker blue for section titles */
    text-align: center;
    margin-bottom: 25px;
    font-size: 2rem;
    font-weight: 400;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

thead th {
    background-color: #e9ecef; /* Light grey for table header */
    color: #495057;
    font-weight: 700;
}

tbody tr:hover {
    background-color: #f8f9fa; /* Slight hover effect for rows */
}

tbody tr.special-event {
    background-color: #fff3cd; /* Light yellow for special events */
    font-style: italic;
}

tbody tr.special-event td strong {
    color: #856404; /* Darker yellow for emphasis in special events */
}

.dropbtn {
    background-color: #003366;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: #001a33;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
}

.dropdown-content a {
    color: black;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #343a40; /* Dark footer */
    color: #f8f9fa;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    #timetable h2 {
        font-size: 1.8rem;
    }
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    .dropbtn {
        padding: 6px 10px;
        font-size: 13px;
    }
    .dropdown-content a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right; /* Align text to the right for a cleaner look */
    }
    td:before {
        position: absolute;
        top: 12px; /* Adjust based on your padding */
        left: 12px; /* Adjust based on your padding */
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left; /* Align label text to the left */
        font-weight: bold;
    }
    td:nth-of-type(1):before { content: "Einheit:"; }
    td:nth-of-type(2):before { content: "Datum:"; }
    td:nth-of-type(3):before { content: "Uhrzeit:"; }
    td:nth-of-type(4):before { content: "Thema:"; }
    td:nth-of-type(5):before { content: "Materialien:"; text-align: left;} /* Align download button section to left */

    .dropdown {
        display: block; /* Make dropdown take full width available */
        margin-top: 5px;
    }
    .dropbtn {
        width: 100%;
    }
    .dropdown-content {
        position: static; /* Make dropdown content flow normally */
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
