* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background: #f4f4f4;
    padding: 2rem;
}

.main-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1;
}

.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 400px;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: #333;
}

.table-section {
    margin-bottom: 2rem;
}

.table-section h4 {
    margin-bottom: 0.5rem;
    color: #666;
}

.table-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
}

.table-list div {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #eee;
}

.table-list div:last-child {
    border-bottom: none;
}

.area-m {
    fill: rgba(255, 0, 0, 0.5);
    stroke: none;
}

.area-m:hover {
    fill: rgba(255, 0, 0, 1);
}

.area-p {
    fill: rgba(0, 255, 0, 0.5);
    stroke: none;
}

.area-p:hover {
    fill: rgba(0, 255, 0, 1);
}

.area-r {
    fill: rgba(0, 0, 255, 0.5);
    stroke: none;
}

.area-r:hover {
    fill: rgba(0, 0, 255, 1);
}

.area-mp {
    fill: rgba(255, 255, 0, 0.4);
    stroke: none;
}

.area-mp:hover {
    fill: rgba(255, 255, 0, 1);
}

.area-mr {
    fill: rgba(255, 0, 255, 0.4);
    stroke: none;
}

.area-mr:hover {
    fill: rgba(255, 0, 255, 1);
}

.area-pr {
    fill: rgba(0, 255, 255, 0.4);
    stroke: none;
}

.area-pr:hover {
    fill: rgba(0, 255, 255, 1);
}

.area-all {
    fill: rgba(255, 255, 255, 0.1);
    stroke: none;
}

.area-all:hover {
    fill: rgb(222, 221, 221);
}

.clickable {
    cursor: pointer;
    transition: fill 0.2s;
}

.label {
    font-size: 16px;
    font-weight: bold;
    fill: #333;
    pointer-events: none;
}

header {
    background: #333;
    color: #fff;
    padding: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 2rem;
    min-height: 80vh;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

#results {
    margin-top: 2rem;
}

#results h3 {
    margin-bottom: 1rem;
    color: #333;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
}

#dataTable th,
#dataTable td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#dataTable th {
    background: #f8f9fa;
    font-weight: bold;
}

#dataTable tbody tr:hover {
    background: #f8f9fa;
}

.area-m.active {
    fill: rgba(255, 0, 0, 1);
}

.area-p.active {
    fill: rgba(0, 255, 0, 1);
}

.area-r.active {
    fill: rgba(0, 0, 255, 1);
}

.area-mp.active {
    fill: rgba(255, 255, 0, 1);
}

.area-mr.active {
    fill: rgba(255, 0, 255, 1);
}

.area-pr.active {
    fill: rgba(0, 255, 255, 1);
}

.area-all.active {
    fill: rgb(222, 221, 221);
}
