/* Font Definitions */
@font-face {
    font-family: 'Roboto';
    src: url('./fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
/* Body Styles */
body {
    margin: 0;
    padding: 0;
    font-weight: bold;
    background-color: white;
    overflow: hidden;
    font-family: Roboto, sans-serif;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}
/* Map Styles */
#map {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
/* Button Styles */
#toggle, #menu-btn, #home-btn, #layers-btn {
    position: absolute;
    top: 10px;
    z-index: 1000;
    font-weight: bold;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
#toggle:hover, #menu-btn:hover, #home-btn:hover, #layers-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#toggle { right: 10px; display: none; }
#menu-btn {
    left: 50px;
    font-family: Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}
#home-btn {
    right: 55px;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 12L12 3L21 12H17V21H7V12H3Z" fill="currentColor"/></svg>');
}
#layers-btn {
    right: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 14L12 20L3 14M21 10L12 16L3 10L12 4L21 10Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    position: absolute;
    top: -2px !important;
    width: 30px !important;
    height: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
.leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}
.leaflet-control-zoom-in.black, .leaflet-control-zoom-out.black {
    background: linear-gradient(45deg, #424242, #212121) !important;
    color: white !important;
}
.leaflet-control-zoom-out {
    top: 30px !important;
}
.leaflet-touch .leaflet-bar a {
    width: 30px !important;
    height: 30px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
.leaflet-bar a {
    width: 30px !important;
    height: 30px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
#search-btn {
    position: absolute;
    top: 10px;
    left: 90px;
    z-index: 1000;
    font-weight: bold;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
#search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
/* Sidebar Styles */
.sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1001;
    padding: 20px;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s, visibility 0s linear;
    font-family: Roboto, sans-serif;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow-y: auto;
    text-align: center;
    color: #e0e0e0;
}
.sidebar.open {
    visibility: visible;
    transform: translateX(0);
}
.layers-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1002;
    padding: 20px;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.3s, visibility 0s linear;
    font-family: Roboto, sans-serif;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow-y: auto;
    text-align: center;
    color: #e0e0e0;
}
.layers-sidebar.open {
    visibility: visible;
    transform: translateX(0);
}
.close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    z-index: 1005;
    color: #e0e0e0;
}

/* Profile button specific styles */
.profile-btn {
    height: 35px !important; /* Smaller than regular 40px */
    font-size: 16px !important; /* Slightly smaller text */
    margin-bottom: 8px !important; /* Consistent spacing */
}

.profile-btn.spaced {
    margin-top: 12px !important; /* Extra space between Login and Create Account */
}

/* Dropdown and Point List Styles */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}
ul li {
    margin-bottom: 15px;
    position: relative;
}
ul li button, ul li label {
    padding: 10px 15px;
    width: 100%;
    height: 40px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
}
ul li button:hover, ul li label:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.dropdown-content {
    display: none;
    margin-top: 5px;
}
.dropdown-content.open {
    display: block;
}
.centered-subcontent {
    max-width: 240px;
    margin: 0 auto;
    text-align: center;
    padding-top: 15px; /* Extra spacing from POI Import header */
}
.centered-subcontent input[type="file"] {
    margin-bottom: 15px; /* Space file input from upload button */
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-family: Roboto, sans-serif;
    box-sizing: border-box;
}
.upload-btn {
    width: 150px;
    height: 35px; /* Slightly smaller for mobile */
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-size: 14px; /* Smaller font for mobile */
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 1.2; /* Prevent text overflow */
    padding: 6px 12px; /* Adjust padding for smaller height */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}
.upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
/* Mobile-specific adjustments */
@media screen and (max-width: 480px) {
    .upload-btn {
        width: 140px;
        height: 32px;
        font-size: 13px;
        padding: 5px 10px;
        line-height: 1.1;
    }
    .centered-subcontent {
        padding-top: 20px; /* More spacing on mobile */
    }
    .centered-subcontent input[type="file"] {
        margin-bottom: 12px;
        font-size: 14px;
    }
}
.dropdown-content ul li {
    margin-bottom: 5px;
}
.point-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    width: 100%;
    padding-left: 10px;
}
.point-list li {
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 8px 8px 8px; /* Equal padding on all sides */
    cursor: pointer;
    color: #333;
    width: 100%; /* Full width of container */
    margin: 0 0 5px 0; /* Only bottom margin, no left/right margins */
    max-width: 100%; /* Remove max-width constraint */
    box-sizing: border-box;
    display: block; /* Ensure block display */
}
.point-list li:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.point-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0; /* Remove any padding from point-item */
}
.point-title {
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margins */
}
.point-coords {
    font-size: 12px;
    color: #555;
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margins */
}

.dropdown-content #view-map-points .popup-form {
    max-width: 240px;
    margin: 0 auto;
    text-align: center;
    padding: 0;
}

.dropdown-content .point-list-container {
    max-width: 200px;
    margin: 0 auto;
}

.dropdown-content .point-list li {
    width: 100%;
    margin: 0 auto 5px auto;
    max-width: 240px;
    box-sizing: border-box;
    padding-left: 12px; /* Nudge slightly to the right */
    padding-right: 8px; /* Slightly less on right to maintain balance */
}

/* Secondary buttons (smaller, white background) */
.secondary-btn {
    height: 32px !important;
    font-size: 14px !important;
    padding: 6px 12px !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    margin: 8px auto !important;
    display: block !important;
    width: 180px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    border-radius: 8px !important;
    font-family: Roboto, sans-serif !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}
.secondary-btn:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
/* Popup button styles */
.popup-btn {
    height: 35px !important;
    font-size: 15px !important;
    padding: 8px 16px !important;
    margin: 6px 0 !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.popup-btn.secondary {
    background: linear-gradient(45deg, #f5f5f5, #e0e0e0) !important;
    color: #555 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    font-weight: normal !important;
}
.popup-btn.cancel {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
}
.popup-btn:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
/* Map Name spacing and secondary checkbox styling */
.map-name-spacing {
    margin-top: 12px !important;
    margin-bottom: 20px !important;
}
.secondary-btn-checkbox {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    transform: scale(0.9) !important;
}
#no-map-name label {
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: #333 !important;
    font-weight: normal !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    width: 120px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}
#no-map-name label:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
/* Mobile-specific adjustments for POI Import */
@media screen and (max-width: 480px) {
    .upload-btn {
        width: 140px !important;
        height: 28px !important;
        font-size: 13px !important;
        padding: 4px 8px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .centered-subcontent {
        padding-top: 20px !important;
    }
    .centered-subcontent input[type="file"] {
        margin-bottom: 12px !important;
        font-size: 14px !important;
        padding: 6px !important;
        width: 95% !important;
    }
    .secondary-btn {
        width: 160px !important;
        height: 30px !important;
        font-size: 13px !important;
    }
    .popup-btn {
        height: 32px !important;
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
}

/* Secondary buttons (smaller, white background) */
.secondary-btn {
    height: 32px !important;
    font-size: 14px !important;
    padding: 6px 12px !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    margin: 8px auto !important;
    display: block !important;
    width: 180px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    border-radius: 8px !important;
    font-family: Roboto, sans-serif !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.secondary-btn:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Popup button styles */
.popup-btn {
    height: 35px !important;
    font-size: 15px !important;
    padding: 8px 16px !important;
    margin: 6px 0 !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.popup-btn.secondary {
    background: linear-gradient(45deg, #f5f5f5, #e0e0e0) !important;
    color: #555 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    font-weight: normal !important;
}

.popup-btn.cancel {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
    color: white !important;
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
}

.popup-btn:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Map Name spacing and secondary checkbox styling */
.map-name-spacing {
    margin-top: 12px !important;
    margin-bottom: 20px !important;
}

.secondary-btn-checkbox {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    transform: scale(0.9) !important;
}

#no-map-name label {
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 12px !important;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: #333 !important;
    font-weight: normal !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    width: 120px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

#no-map-name label:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Mobile-specific adjustments for POI Import */
@media screen and (max-width: 480px) {
    .upload-btn {
        width: 140px !important;
        height: 28px !important;
        font-size: 13px !important;
        padding: 4px 8px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .centered-subcontent {
        padding-top: 20px !important;
    }
    .centered-subcontent input[type="file"] {
        margin-bottom: 12px !important;
        font-size: 14px !important;
        padding: 6px !important;
        width: 95% !important;
    }
    .secondary-btn {
        width: 160px !important;
        height: 30px !important;
        font-size: 13px !important;
    }
    .popup-btn {
        height: 32px !important;
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
}

/* Map Name Styles */
#map-name-display {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px; /* Default for intermediate screens */
    font-weight: bold;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    z-index: 1001; /* Above buttons and zoom controls (z-index: 1000) */
    pointer-events: none;
    display: block;
    color: #333;
}
@media screen and (max-width: 400px) {
    #map-name-display {
        font-size: 10px; /* Smaller for mobile */
        padding: 2px 4px;
        left: 130px; /* Right of #search-btn (left: 90px, width: 30px) + 10px padding */
        transform: none; /* Remove centering */
    }
}
@media screen and (max-width: 320px) {
    #map-name-display {
        left: 120px; /* Adjust for very small screens */
    }
}
@media screen and (min-width: 1025px) {
    #map-name-display {
        font-size: 24px; /* Desktop size */
        padding: 5px 10px;
        left: 50%; /* Centered for large screens */
        transform: translateX(-50%);
    }
}

/* Popup Form Styles */
.popup-form {
    width: 100%;
    height: auto;
    max-width: 239px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
    padding: 5px;
    align-items: center;
    justify-content: center;
}
.popup-form input#point-title,
.popup-form input#point-lat,
.popup-form input#point-lng {
    margin-top: 10px;
    text-align: center;
}
.popup-form textarea#point-description {
    resize: none;
    width: 229px;
    height: 45.97px;
    overflow-y: auto;
    text-align: center;
    line-height: 1.2;
    margin-top: 10px;
}
.popup-form input, .popup-form textarea, .popup-form select, .popup-form button {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    z-index: 1002;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: box-shadow 0.2s;
}
.popup-form input[type="datetime-local"] {
    font-size: 14px;
    padding: 8px;
}
.popup-form input:focus, .popup-form textarea:focus, .popup-form select:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.popup-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.login-popup, .create-account-popup, #datetime-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1004;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    font-family: Roboto, sans-serif;
}
#datetime-popup .popup-form h3 {
    color: white !important;
    margin: 0 0 15px 0;
    font-size: 16px;
}
#datetime-popup .popup-form button {
    width: 48%;
    margin: 0 1%;
    display: inline-block;
    background: linear-gradient(45deg, #ffffff, #e0e0e0) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}
#datetime-popup .popup-form button:hover {
    background: linear-gradient(45deg, #f0f0f0, #d0d0d0) !important;
    transform: scale(1.02) !important;
}

/* Color Selector Styles */
.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
    justify-content: center;
}
.color-icon.small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.color-icon.small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.color-icon.small.selected {
    border: 2px solid rgba(255, 255, 255, 0.5);
}
#customize-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.color-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
.color-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.color-icon.selected {
    border: 2px solid rgba(255, 255, 255, 0.5);
}
.color-icon[data-color="white"] { background-color: white; }
.color-icon[data-color="red"] { background-color: red; }
.color-icon[data-color="cyan"] { background-color: cyan; }
.color-icon[data-color="lightgreen"] { background-color: lightgreen; }
.color-icon[data-color="orange"] { background-color: orange; }
.color-icon[data-color="teal"] { background-color: teal; }
.color-icon[data-color="magenta"] { background-color: magenta; }
.color-icon[data-color="gray"] { background-color: gray; }
.color-icon[data-color="black"] { background-color: black; }
.color-icon[data-color="purple"] { background-color: purple; }
.color-icon[data-color="yellow"] { background-color: yellow; }
.color-icon[data-color="electricblue"] { background-color: #00B7EB; }
.color-icon[data-color="navy"] { background-color: navy; }
.color-icon[data-color="maroon"] { background-color: maroon; }
.color-icon[data-color="forestgreen"] { background-color: forestgreen; }
.color-icon[data-color="brown"] { background-color: brown; }
.color-icon[data-color="cream"] { background-color: #FFFDD0; }
.color-icon[data-color="gold"] { background-color: gold; }
/* Icon Selector Styles */
.icon-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0;
    justify-content: center;
}
.icon-item {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
}
.icon-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.icon-item.selected {
    border: 2px solid rgba(255, 255, 255, 0.5);
}
.icon-item svg {
    width: 18px;
    height: 18px;
    fill: inherit; /* Allow dynamic fill color */
}
/* Map Point Info Styles */
.map-point-info {
    width: 100%;
    height: auto;
    max-width: 239px;
    max-height: 400px; /* Increased to 400px for extra breathing room */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 10px 5px 5px 5px;
    color: #e0e0e0;
    min-height: 30px; /* Reduced from 100px */
}
.map-point-info .edit-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    cursor: pointer;
    font-weight: bold;
    z-index: 1005;
    color: #e0e0e0;
}
.map-point-info h3 {
    margin: 0 0 8px 0;
    max-height: 40px; /* 2 lines max */
    overflow-y: auto;
    word-wrap: break-word;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    flex-shrink: 0;
}
.map-point-info p {
    margin: 0 0 8px 0;
    max-height: 60px; /* 3 lines max */
    line-height: 1.2;
    overflow-y: auto;
    word-wrap: break-word;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}
.map-point-info .image-container {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 229px;
    height: 229px;
    margin: 0 auto 8px auto;
}
.map-point-info img {
    display: block;
    max-width: 229px;
    max-height: 229px;
    object-fit: contain;
}
.point-datetime {
    font-size: 12px;
    color: #ccc;
    text-align: center;
    padding: 4px 0;
    margin: 4px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
    flex-shrink: 0;
    line-height: 1.3;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}
::-webkit-scrollbar-button {
    display: none;
}
/* Add Point Popup Styles */
.add-point-popup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    color: #e0e0e0;
}
.add-point-popup .add-point-coords {
    margin: 5px 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.add-point-popup button {
    padding: 6px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}
.add-point-popup button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Success and Confirm Message Styles */
#success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1003;
    display: none;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    width: 250px;
}
#success-message p {
    margin: 0 0 10px 0;
}
#success-message button {
    display: block;
    margin: 0 auto;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}
#success-message button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#confirm-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1004;
    display: none;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    width: 250px;
}
#confirm-message p {
    margin: 0 0 10px 0;
}
#confirm-message .confirm-buttons {
    text-align: center;
}
#confirm-message button {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}
#confirm-message button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#search-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1004;
    display: none;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    font-family: Roboto, sans-serif;
}
#search-popup input {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    margin-bottom: 10px;
}
#search-popup input:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#search-popup button {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}
#search-popup button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#login-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1004;
    display: none;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    font-family: Roboto, sans-serif;
}
#login-popup .popup-form {
    padding: 10px;
}
#login-popup input {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    margin-bottom: 10px;
}
#login-popup input:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#login-popup button {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 5px;
}
#login-popup button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#create-account-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1004;
    display: none;
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
    font-family: Roboto, sans-serif;
}
#create-account-popup .popup-form {
    padding: 10px;
}
#create-account-popup input {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    margin-bottom: 10px;
}
#create-account-popup input:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
#create-account-popup button {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 5px;
}
#create-account-popup button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Leaflet Popup Styles */
.leaflet-popup-content-wrapper {
    min-width: 250px;
    min-height: 65.75px;
    max-width: 250px;
    box-sizing: border-box;
    border-radius: 8px;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.leaflet-popup-content-wrapper.add-point-popup {
    width: 180px;
    height: 100px;
}
.leaflet-popup-content-wrapper.edit-point-popup {
    width: 250px;
    height: auto;
}
.leaflet-popup-content {
    margin: 5px;
    overflow: hidden;
}
.leaflet-popup-close-button {
    top: 2px;
    right: 2px;
    padding: 2px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1006;
    color: #e0e0e0;
    background: transparent;
    line-height: 1;
}
/* Checkbox Styles */
#overlay-layers input[type="checkbox"],
#no-map-name input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    position: relative;
    cursor: pointer;
    border: none;
    background: transparent;
}
#overlay-layers input[type="checkbox"]:checked::after,
#no-map-name input[type="checkbox"]:checked::after {
    content: '✓';
    font-family: Roboto, sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #000;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
/* Leaflet Tile Styles */
.leaflet-tile {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.leaflet-tile.leaflet-tile-loaded {
    opacity: 1;
    transform: scale(1);
}
.leaflet-tile:not(.leaflet-tile-loaded) {
    opacity: 0;
    transform: scale(0.8);
}

/* Help Popup Styles */
.help-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #333;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1005;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: Roboto, sans-serif;
}

.help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.help-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.help-content {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    color: #e0e0e0;
    font-family: Roboto, sans-serif;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
}

.help-close-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.help-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.help-sections {
    padding: 0 25px 25px 25px;
}

.help-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid; /* This will be set dynamically by JS */
    transition: border-left-color 0.3s ease;
}

.help-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-subsection {
    margin-bottom: 20px;
}

.help-subsection h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
}

.help-sub-subsection {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.help-sub-subsection h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #cccccc;
}

.help-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #d0d0d0;
}

.help-section p {
    margin: 10px 0;
    line-height: 1.5;
    color: #d0d0d0;
}

.help-contact {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 183, 235, 0.1);
    border-radius: 6px;
    border-left: 3px solid #00B7EB;
}

.help-contact p {
    margin: 5px 0;
    font-weight: 500;
}

.help-contact a {
    color: #00B7EB;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.help-contact a:hover {
    color: #66D9FF;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .help-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .help-header {
        padding: 15px 20px 12px 20px;
    }
    
    .help-sections {
        padding: 0 20px 20px 20px;
    }
    
    .help-section {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .help-header h2 {
        font-size: 20px;
    }
    
    .help-section h3 {
        font-size: 16px;
    }
    
    .help-subsection h4 {
        font-size: 14px;
    }
    
    .help-section ul {
        padding-left: 15px;
    }
}
