body {
    background-color: #f4f4f4;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

header nav {
    margin-top: 10px;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding: 10px 0;
    justify-content: space-around;
    /* Distributes space evenly */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    /* Prevents scrolling */
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    /* Slightly reduced padding */
    transition: color 0.3s ease-in-out;
    white-space: nowrap;
    flex-shrink: 1;
    /* Allows slight shrinking if needed */
    flex-grow: 1;
    /* Allows items to grow and share space */
    text-align: center;
    /* Centers text within each link */
    min-width: max-content;
    /* Ensures text doesn't wrap */
}

header nav a:hover {
    color: #1abc9c;
}

main {
    width: 80%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    text-align: center;
}

footer {
    width: 100%;
    text-align: center;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    margin-top: 20px;
}

footer a {
    color: white;
    text-decoration: none;
    padding: 10px;
}

footer a:hover {
    text-decoration: underline;
    color: #1abc9c;
}

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        /* Allows wrapping on small screens */
        justify-content: center;
    }

    nav a {
        flex-grow: 0;
        /* Prevents stretching on mobile */
        padding: 6px 10px;
        margin: 2px;
    }
}