body {
    margin: 0;
    padding: 0;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

#menu {
    background: rgba(255, 255, 255, 0) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    border-radius: 5px;
    min-width: 160px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-family: 'Open Sans', sans-serif;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.menu-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #404040;
    margin-bottom: 6px;
    cursor: pointer;
}

.radio-group label:last-child,
.checkbox-group label:last-child {
    margin-bottom: 0;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.radio-group span,
.checkbox-group span {
    margin-left: 6px;
}

#menu input[type="checkbox"] {
    cursor: pointer;
}

/* Glass effect for species richness dropdown */
#species-taxon {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    color: #404040;
    padding: 4px 8px;
    cursor: pointer;
}

#species-taxon option {
    background: rgba(255, 255, 255, 0.95);
    color: #404040;
}

/* Legend styles */
#legend {
    background: rgba(255, 255, 255, 0) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: absolute;
    z-index: 1;
    bottom: 10px;
    left: 10px;
    border-radius: 5px;
    max-width: 280px;
    max-height: 80vh;
    border: 1px solid rgba(0, 0, 0, 0.2);
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

#legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(248, 249, 250, 0);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#legend-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#legend-toggle {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background-color 0.2s;
}

#legend-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

#legend-content {
    padding: 10px 15px 15px;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
}

#legend-content.collapsed {
    display: none;
}

.legend-section {
    margin-bottom: 15px;
}

.legend-section:last-child {
    margin-bottom: 0;
}

.legend-section h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-item span {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Scrollbar styling for legend */
#legend-content::-webkit-scrollbar {
    width: 6px;
}

#legend-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#legend-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#legend-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}