/* Include padding inside the element width to keep header/main/footer aligned */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Share Tech Mono', monospace;
}

h1 {
    font-size: xxx-large;
}

h2 {
    margin-top: 2em;
}

header {
    max-width: 1200px;
    margin: auto;
    position: relative;
    background-color: #dddde2;
}

.main-navigation {
    position: absolute;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
    background-color: #00000044;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: auto;
    max-width: 800px;
    padding: 15px 0;
    justify-content: space-between;
}

.main-navigation ul li {
    margin: 0 32px;
    font-size: 20px;
    color: white;
    font-family: 'Share Tech Mono', monospace;
}

.main-navigation ul li a {
    text-decoration: none;
    color: white;
}

.header-image-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    display: block;
    background-color: white;
}

.header-image {
    width: 100%;
    max-height: 800px;
    object-fit: scale-down;
    display: block;
    margin: 0;
}

.source-attribution {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 14px;
    margin: 0;
    line-height: 1;
    white-space: normal;
    text-align: right;
}

li {
    list-style: none;
    padding: 0;
}

ul {
    padding: 0;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: white;
}

/* Keep text narrower than the white panel */
main>* {
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Reduce paragraph margins by half */
p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}

section {
    margin: auto;
    width: 100%;
}

#players-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#players-section ul li a {
    text-decoration: underline;
    color: #333;
}

.events-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

footer {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background-color: #333;
    color: white;
    text-align: center;
}

.net-sceme-section {
    min-height: 300px;
    background-color: #eee;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
}

.close-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background-color: #f5f5f5;
    color: #333;
    font-size: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-nav span {
    line-height: 1;
    position: relative;
    top: -2px;
}

a {
    text-decoration: underline;
    color: inherit;
}

@media screen and (max-width: 600px) {
    h1 {
        font-size: x-large;
    }

    .main-navigation ul li {
        font-size: 14px;
        margin: 0 10px;
        justify-content: center;
    }

    .source-attribution {
        font-size: 12px;
        padding: 8px;
    }

    main {
        padding: 10px;
        margin-top: 0px;
        margin-bottom: 0px;
    }

    #map-explanation-section {
        padding-top: 40px;
    }
}