body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

header {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 0;
    text-align: center;
    color: #fff;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    flex-wrap: wrap; /* Allows wrapping on small screens */
}

nav ul li {
    margin: 5px; /* Adjust spacing for small screens */
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    padding: 10px 15px;
    display: inline-block;
    transition: background 0.3s ease;
    text-align: center; /* Center-align text in links */
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

a:visited {
    color: #FFFFFF; /* Light blue for visited links */
}

main {
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    margin: 20px auto;
    max-width: 800px;
    width: 90%; /* Ensures it adapts to small screens */
    color: #fff;
    box-sizing: border-box; /* Include padding in width calculation */
}

footer {
    text-align: center;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    margin-top: 20px;
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
    header {
        font-size: 1.2em; /* Adjust header font size */
    }

    nav ul {
        flex-direction: column; /* Stack menu items vertically */
        align-items: center; /* Center align items */
    }

    nav ul li {
        margin: 5px 0; /* Adjust vertical spacing */
    }

    main {
        padding: 15px;
        font-size: 0.9em; /* Adjust font size for readability */
    }
}

@media screen and (max-width: 400px) {
    nav ul li a {
        padding: 8px 10px; /* Reduce padding for very small screens */
        font-size: 0.9em; /* Smaller text for links */
    }

    main {
        padding: 10px;
        font-size: 0.8em; /* Further adjust font size */
    }
}