body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #bbbbbb;
}

header {
    background-color: #333;
    color: white;
    padding: 15px 0;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center; /* Vertically align items */
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer; /* Ensure it looks clickable */
}

header nav ul li a:hover {
    color: #906161;
}

/* Style for selected map link */
.main-menu a.selected {
    color: #906161; /* Use the hover color to show it's active */
    text-decoration: none; /* Remove underline for the selected item */
}


.container {
    display: flex;
    height: 100%;
    flex: 1;
}

aside {
    width: 250px;
    background-color: #white;
    padding: 7px;
    box-sizing: border-box;
    border-right: 1px solid #ccc;
}

.menu-section {
    margin-bottom: 10px;
}

.menu-section h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li {
    margin-bottom: 3px;
}

.side-menu li a,
.side-menu li button {
    display: block;
    width: 100%;
    padding: 3px;
    background-color: #808080;
    color: #f5f5f5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 1);
}

.side-menu li a:hover,
.side-menu li button:hover {
    background-color: #906161;
}

/* This is the class for a selected button in any side menu */
.side-menu button.selected {
    background-color: #906161;
    border: 1px solid #f5f5f5;
}


main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
    height: calc(100vh + 100px);
}

main.zoomed {
    overflow: auto;
    height: 100vh;
}

canvas {
    border: 1px solid #ccc;
    cursor: crosshair;
}

canvas:active {
    cursor: grabbing;
}

/* Right-hand menu styles */
.right-menu {
    list-style: none;
    width: 250px;
    padding: 10px;
    background-color: #white;
    border-left: 1px solid #ccc;
    overflow-y: auto;
    flex-shrink: 0;
    height: auto;
}

.right-menu ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0; /* --- FIX: Explicitly remove top margin from all lists --- */
}

.right-menu ul li {
    margin-left: 0;
    padding-left: 0;
}

.right-menu ul li button {
    width: 90%;
    box-sizing: border-box;
}

/* --- FIX: Control spacing around all h2 titles in the right menu --- */
.right-menu h2 {
    margin-top: 20px; /* Adds space between sections */
    margin-bottom: 0px; /* Reduces space between the title and its buttons */
}

/* --- FIX: Remove the top margin from the very first h2 title --- */
.right-menu h2:first-of-type {
    margin-top: 0;
}


.right-menu li a,
.right-menu li button {
    display: block;
    width: 90%;
    padding: 2px;
    background-color: #808080;
    color: #f5f5f5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 1);
}

.right-menu li {
    margin-bottom: 2px;
}


.right-menu li a:hover,
.right-menu li button:hover {
    background-color: #906161;
}

/* Style for selected buttons in the right menu */
.right-menu button.selected {
     background-color: #906161;
    border: 1px solid #f5f5f5;
}

#result {
    margin-top: 0px;
    font-weight: bold;
}

.dropdown-content {
    display: none;
}

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

h3 {
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: left;
    text-decoration: underline;
    padding-bottom: 0px;
    padding-top: 0px
}

b {
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: left;
    line-height: 1.2;
}

#time-difference {
    font-weight: bold;
}

#time-difference .time-value {
    color: #500000;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}
