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

body {
    display:flex;
    flex-direction:column;
    height:100vh;
}

#header {
    position: relative;
    left:0;
    width:100%;
    flex-shrink:0;
    z-index:1001;
    background: rgba(255,255,255,0.95);
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap:8px;
    box-shadow:0 1px 4px rgba(0,0,0,0.15);
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
}
.header-icon {
    height: 24px;
    width: auto;
}
.header-text {
    white-space: nowrap;
}

#main-container {
    display: flex;
    flex:1;
    overflow: hidden;
}

#sidebar {
    width: 280px;
    background: #f5f5f5;
    padding:20px;
    border-right:1px solid #ccc;
    z-index: 1000;
    overflow-y: auto;
}

#sidebar h3 {
    margin-bottom: 12px;
}

#university-select {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}

#map {
    flex: 1;
    position: relative;
}

#compass {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    pointer-events: none;
}
.compass-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}


#map-title {
    position: absolute;
    top:12px;
    left: 50%;
    transform: translateX(-50%);
    z-index:1002;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    white-space: nowrap;
    pointer-events: none;
}

#chart-container {
    position:absolute;
    bottom:30px;
    left:50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 90%;
    height: 320px;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    padding:30px 15px 15px 15px;
    box-shadow:0 2px 10px rgba(0,0,0,0.3);
    z-index:1003;
}
#chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

#distance-panel {
    position: absolute;
    bottom: 30px;
    left:15px;
    z-index: 1003;
    background: rgba(255,255,255,0.92);
    border-radius: 6px;
    box-shadow:0 2px 8px rgba(0,0,0,0.25);
    width: 220px;
    font-size: 13px;
}
#distance-header {
    background: #2c3e50;
    color:#fff;
    padding: 6px 10px;
    border-radius:6px 6px 0 0;
    cursor: pointer;
    font-weight: bold;
}
#distance-body {
    padding:8px;
    display:none;
}
#distance-panel.open #distance-body {
    display:block;
}
#distance-result {
    color:#2c3e50;
    font-weight: bold;
}