:root {
            --primary-color: #1a1a1a;
            --secondary-color: #2c2c2c;
            --accent-color: #4CAF50;
            --text-color: #f1f1f1;
            --border-color: #444;
            --hover-color: #3a3a3a;
        }
        
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: var(--text-color);
    line-height: 1.6;
}

body.map-page {
    height: 100vh;
    overflow: hidden;
}

/* Header styles */
header {
    background-color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
}

.logo:hover {
    color: var(--accent-color);
}

.desktop-menu {
    display: flex;
    gap: 1.5rem;
}

.desktop-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.desktop-menu a:hover {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: var(--secondary-color);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.mobile-menu a:hover {
    background-color: var(--hover-color);
    padding-left: 0.5rem;
}

/* Main content */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

p, ul, ol {
    margin-bottom: 1rem;
}

li {
	margin-left: 2rem;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--secondary-color);
}

th, td {
    padding: 0.8rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    cursor: pointer;
    position: relative;
    user-select: none;
}

th:hover {
    background-color: var(--hover-color);
}

th::after {
    content: '↕';
    position: absolute;
    right: 0.5rem;
    opacity: 0.5;
}

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

tr:hover {
    background-color: var(--hover-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    margin-top: 2rem;
}

/* Map container */
#map-container {
    position: relative;
    height: calc(100vh - 60px);
    width: 100%;
}

#map {
    height: 100%;
    width: 100%;
}

/* Overide leafleat style, to display meny over zoom buttons */
.leaflet-bottom, .leaflet-top {
    z-index:950;
}

/* Attribution */
.map-attribution {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 999;
}

.map-attribution a {
    color: #4CAF50;
    text-decoration: none;
}

.map-attribution a:hover {
    text-decoration: underline;
}

/* Legend Styles */
.legend-container {
    position: absolute;
    bottom: 40px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--text-color);
    padding: 10px;
    border-radius: 5px;
    z-index: 950;
    max-height: 80vh;
    overflow-y: auto;
    max-width: 220px;
}

.legend-container h5 {
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.toggle-legend {
    cursor: pointer;
    float: right;
    font-size: 0.8rem;
    color: #aaa;
}

.toggle-legend:hover {
    color: var(--accent-color);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-items.legend-hidden {
   display: none;
}

.legend-swatch {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    margin-right: 10px;
    flex-shrink: 0;
    vertical-align: middle;
	opacity: 1;
}

.legend-label {
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    main {
        padding: 1rem;
    }
    
    th, td {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.8rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    th, td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {
    .legend-container {
        max-width: 450px;
    }
    .legend-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 15px;
    }
}