:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: #2980b9;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}


header {
    background: #ffffff;
    color: var(--primary-color);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 2rem;
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 600;
}

header h1 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

header h1 a:hover {
    color: var(--hover-color);
}

header .subtitle {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 0.8rem;
}

.team-info {
    font-size: 1rem;
    color: var(--secondary-color);
}

.separator {
    color: var(--secondary-color);
}

.writeup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.writeup-link:hover {
    background: var(--primary-color);
    color: #fff;
}

header nav a {
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
}


main {
    min-height: calc(100vh - 200px);
    padding: 0 2rem;
}


#map-section {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    justify-content: center;
}

#map {
    height: 700px;
    flex-grow: 1;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
}


#controls {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 8px;
    width: 220px;
    height: fit-content;
    box-shadow: 0 2px 4px var(--shadow-color);
}

#controls label {
    display: inline-block;
    text-align: center;
    margin-right: 8px;
    color: var(--primary-color);
}


#instruction {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 220px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

#instruction p {
    margin: 0.8em 0;
    line-height: 1.5;
}

#instruction strong {
    display: block;
    margin-bottom: 0.8em;
    color: var(--primary-color);
    font-size: 1.1em;
}

#legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3rem;
    border-radius: 4px;
    font-size: 0.5rem;
    z-index: 1000;
}


#chart-section {
    padding: 2rem 1rem 2rem 2rem;
    background: #ffffff;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin: 2rem auto;
    max-width: 1400px;
}

#bar-chart {
    width: 100%;
    height: 600px;
}

#clear-selection {
    position: absolute;
    right: 36px;
    top: 30px;
    width: auto;
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.6rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

#clear-selection:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.select-highlight {
    background: #cce5ff;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.legend-line {
    width: 30px;
    height: 3px;
    margin-right: 8px;
}

.legend-area {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 1px solid #999;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #333;
}

.legend-icon {
    width: 14px;
    height: 14px;
    margin-right: 8px;
}


.control-button {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.control-button:hover {
    background-color: var(--primary-color);
    color: #fff;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.container h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.3em;
    font-weight: 600;
}

.container h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.8rem;
    font-weight: 500;
}

.section {
    margin-bottom: 2.5rem;
}

.section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

.feature-list {
    list-style-type: none;
    padding-left: 0;
}

.feature-list li {
    margin-bottom: 1rem;
    padding-left: 1.8rem;
    position: relative;
    font-size: 1.05rem;
}

.feature-list li:before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.highlight {
    background-color: #e8f4f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}


.video-link, .project-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.video-link:hover, .project-link:hover {
    color: var(--hover-color);
    text-decoration: underline;
}


footer {
    position: relative;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    text-align: right;
    margin-top: 3rem;
    box-shadow: 0 -2px 4px var(--shadow-color);
}

footer p {
    margin: 0;
    line-height: 1.8;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    margin-left: 1rem;
}

footer a:hover {
    color: var(--accent-color);
}


@media (max-width: 1200px) {
    .container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    #map-section {
        flex-direction: column;
        align-items: center;
    }
    
    .right-panel {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .container h1 {
        font-size: 2em;
    }
    
    .section p {
        font-size: 1rem;
    }
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 250px;
    height: 700px;
    justify-content: space-between;
}

.bar-tooltip {
    position: absolute;
    text-align: left;
    width: auto;
    height: auto;
    padding: 8px;
    font: 12px sans-serif;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
