/* Global Styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-image: url('background-image.jpg');
    /* Path to the pirate-themed background image */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #5d4037;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header,
footer {
    background-color: #ff7043;
    color: white;
    text-align: center;
    padding: 10px;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
}

footer {
    padding-top: 0;
    padding-bottom: 0;
}

footer p {
    margin-top: 3px;
    margin-bottom: 3px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav li {
    margin: 0 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
}

nav a:hover {
    text-decoration: underline;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 2em;
    cursor: pointer;
    padding: 10px;
    background-color: #ff7043;
    color: white;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 11;
}

/* Hide the navigation menu on small screens initially */
nav {
    display: flex;
    flex-direction: row;
}

/* Responsive menu styles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        display: none;
        text-align: center;
        width: 100%;
        position: absolute;
        left: 0;
        background-color: #ff7043;
    }

    nav.open ul {
        display: block;
    }

    nav li {
        margin: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
    }

    nav.open {
        display: block;
    }
}

/* Main Content Styles */
main {
    flex: 1;
    overflow: auto;
    /* Allow the main section to scroll */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align items to the start */
    padding-top: 70px;
    /* Adjust this based on header height */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

.content {
    background-color: rgba(255, 255, 255, 0.9);
    /* White background with 90% opacity */
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    /* Set max-width to 90% of the viewport */
    margin: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

main h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

/* Text Styles */
.main-story {
    font-size: 1.2em;
    color: #6d4c41;
    /* Warm Brown */
    margin-bottom: 20px;
}

.rules {
    font-size: 1em;
    color: #5d4037;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffecb3;
    /* Light Warm Yellow */
    border: 2px solid #d84315;
    /* Dark Orange */
    border-radius: 5px;
}

.rewards {
    font-size: 1em;
    color: #5d4037;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffd54f;
    /* Light Yellow */
    border: 2px solid #d84315;
    /* Dark Orange */
    border-radius: 5px;
}

.description,
.login {
    font-size: 1em;
    color: #5d4037;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffe0b2;
    /* Light Warm Yellow */
    border: 2px solid #d84315;
    /* Dark Orange */
    border-radius: 5px;
}

.mission {
    font-size: 1.1em;
    color: #6d4c41;
    /* Warm Brown */
    margin-bottom: 20px;
}

/* Button Styles */
button,
input[type="submit"] {
    margin: 10px 10px 10px 0;
    /* Add margin around the buttons */
}

button.navigation,
input[type="submit"].navigation {
    background-color: #ffcc80;
    /* Light Orange */
    color: #5d4037;
    border: 2px solid #5d4037;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

button.navigation:hover,
input[type="submit"].navigation:hover {
    background-color: #ffa726;
    /* Medium Orange */
}

button.success {
    background-color: #66bb6a;
    /* Light Green */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

button.success:hover {
    background-color: #43a047;
    /* Dark Green */
}

button.failure {
    background-color: #ef5350;
    /* Light Red */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

button.failure:hover {
    background-color: #e53935;
    /* Dark Red */
}

/* Input Styles */
input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #5d4037;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1em;
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

input[type="text"]:focus,
textarea:focus {
    border-color: #d84315;
    /* Dark Orange */
    outline: none;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #5d4037;
}

th {
    background-color: #ff7043;
    /* Medium Orange */
    color: white;
}

tr:nth-child(even) {
    background-color: #ffcc80;
    /* Light Orange */
}

tr:hover {
    background-color: #ffa726;
    /* Medium Orange */
}

.description>ul:not(.setup) {
    list-style-type: none;
    padding-left: 0;
}

.description>ul>ul {
    list-style-type: default;
    padding-left: 30px;
}

/* Style for making the image responsive */
.responsive-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    cursor: pointer;
    display: block;
    margin: 20px auto;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.modal-content,
.responsive-image {
    transition: transform 0.2s;
    /* Smooth zoom effect */
}

.modal-content:hover {
    transform: scale(1.05);
}

.close {
    position: absolute;
    top: 50px;
    right: 50px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #f1f1f1;
    text-decoration: none;
    cursor: pointer;
}