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

#mapContainer {
    height: calc(100vh - 2.5em);
    width: 100vw;
    position: relative;
    background-color: #fff;
}

#mapCanvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#statusBar {
    height: 2.5em;
    line-height: 2.5em;
    padding: 0 15px;
    background-color: #f8f8f8;
    border-top: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    overflow: visible;
}

#appName {
    font-weight: bold;
    white-space: nowrap;
}

#coordinates {
    color: #666;
    white-space: nowrap;
}

#currentCamp {
    font-weight: bold;
    white-space: nowrap;
    flex-grow: 1;
}

#searchContainer {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

#campSearch {
    width: 200px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-family: Arial, sans-serif;
}

#campSearch:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

#searchAutocomplete {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-bottom: 1px;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #f0f0f0;
}

.autocomplete-item strong {
    color: #007bff;
    font-weight: bold;
}

#statusBarButtons {
    margin-left: 10px;
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

#loadingStatus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    z-index: 100;
}

button {
    padding: 4px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

button:hover {
    background-color: #0056b3;
}

#infoButton {
    padding: 4px 10px;
    font-size: 16px;
    background-color: #6c757d;
}

#infoButton:hover {
    background-color: #5a6268;
}

#campPopup {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 10px;
    pointer-events: none;
    z-index: 1000;
    max-width: 300px;
}

#campPopupContent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

#campPopupImage {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background-color: #9b59b6;
}

#campPopupInfo {
    flex-grow: 1;
    min-width: 0;
}

#campPopupName {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

#campPopupLocation {
    font-size: 12px;
    color: #666;
}

#campSidebar {
    position: absolute;
    top: 10%;
    width: 35%;
    height: 80%;
    background-color: #2b2b2b;
    border: 2px solid #444;
    overflow-y: auto;
    z-index: 2000;
    transition: transform 0.3s ease-in-out;
}

#campSidebar.sidebar-right {
    right: 0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
}

#campSidebar.sidebar-left {
    left: 0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
}

#campSidebar.sidebar-hidden.sidebar-right {
    transform: translateX(100%);
}

#campSidebar.sidebar-hidden.sidebar-left {
    transform: translateX(-100%);
}

#closeSidebar {
    position: fixed;
    top: calc(10% + 10px);
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 14px;
    line-height: 30px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
}

#campSidebar.sidebar-right #closeSidebar {
    right: calc(35% + 10px);
}

#campSidebar.sidebar-left #closeSidebar {
    left: calc(35% + 10px);
}

#closeSidebar:hover {
    background-color: #c82333;
}

#sidebarContent {
    padding: 20px;
}

#sidebarCampName {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-right: 40px;
    word-wrap: break-word;
    color: #ffffff;
}

#sidebarCampImage {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #9b59b6;
}

#sidebarCampLocation {
    font-size: 16px;
    color: #aaaaaa;
    margin-bottom: 15px;
    font-weight: bold;
}

#sidebarCampDescription {
    font-size: 14px;
    line-height: 1.3;
    color: #dddddd;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
}

#sidebarHint {
    font-size: 12px;
    color: #888888;
    text-align: center;
    font-style: italic;
    padding: 15px;
    border-top: 1px solid #444;
    margin-top: 10px;
}

#mapOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2500;
    transition: opacity 0.3s ease-in-out;
}

#mapOverlay.overlay-hidden {
    opacity: 0;
    pointer-events: none;
}

#fullCampInfo {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background-color: #1a1a1a;
    border: 3px solid #555;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    z-index: 3000;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#fullCampInfo.fullcamp-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

#closeFullCamp {
    position: sticky;
    top: 10px;
    float: right;
    margin: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 24px;
    line-height: 40px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#closeFullCamp:hover {
    background-color: #c82333;
}

#fullCampContent {
    padding: 30px;
    padding-top: 20px;
    color: #ffffff;
}

#fullCampName {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 20px 0;
    padding-right: 60px;
    word-wrap: break-word;
    color: #ffffff;
}

#fullCampImage {
    width: 100%;
    max-height: 67.5vh;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #000000;
    display: block;
}

#fullCampLocation {
    font-size: 20px;
    color: #aaaaaa;
    margin-bottom: 20px;
    font-weight: bold;
}

#fullCampDescription {
    font-size: 16px;
    line-height: 1.2;
    color: #dddddd;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 30px;
}

#fullCampDetails {
    font-size: 14px;
    line-height: 1;
    color: #cccccc;
    border-top: 1px solid #444;
    padding-top: 20px;
}

#fullCampEvents {
    font-size: 14px;
    color: #cccccc;
    margin-top: 20px;
}

#fullCampEvents h2 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 15px;
}

.event-item {
    margin-bottom: 12px;
    line-height: 1.4;
    break-inside: avoid;
    page-break-inside: avoid;
}

.events-year-group {
    column-gap: 20px;
}

/* Responsive column layout based on screen width */
@media (min-width: 600px) {
    .events-year-group {
        column-count: 2;
    }
}

@media (min-width: 900px) {
    .events-year-group {
        column-count: 3;
    }
}

@media (min-width: 1200px) {
    .events-year-group {
        column-count: 4;
    }
}

.event-title {
    font-weight: bold;
    color: #ffffff;
}

.event-type {
    color: #aaaaaa;
    font-style: italic;
}

.event-description {
    color: #dddddd;
    margin-top: 3px;
}

#fullCampHistory {
    font-size: 14px;
    color: #cccccc;
    margin-top: 20px;
}

.history-year {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    background-color: #3a3a3a;
    color: #66aaff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.history-year:hover {
    background-color: #4a4a4a;
    color: #88ccff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 170, 255, 0.3);
}

#historyTooltip {
    position: absolute;
    background-color: rgba(26, 26, 26, 0.98);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.6;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    z-index: 4000;
    pointer-events: auto;
    word-wrap: break-word;
}

#historyTooltip a {
    color: #66aaff;
    text-decoration: underline;
}

#historyTooltip a:hover {
    color: #88ccff;
}

/* Mobile/small screen responsive styles */
@media (max-width: 768px) {
    /* Hide unnecessary status bar items on mobile */
    #appName,
    #coordinates,
    #currentCamp,
    #statusBarButtons button:not(#infoButton) {
        display: none;
    }

    /* Make search box smaller on mobile */
    #campSearch {
        width: 150px;
    }

    /* Adjust status bar layout for mobile */
    #statusBar {
        gap: 10px;
        padding: 0 10px;
    }
}