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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.upload-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.file-upload {
    flex: 1;
}

.upload-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

.upload-btn:hover {
    background: #2980b9;
}

#csvFile {
    display: none;
}

.file-name {
    margin-left: 15px;
    color: #27ae60;
    font-weight: 500;
}

.instructions {
    flex: 1;
    background: #ecf0f1;
    padding: 20px;
    border-radius: 6px;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.instructions ul {
    list-style-position: inside;
    color: #7f8c8d;
}

.instructions li {
    margin-bottom: 5px;
}

.sample-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    display: inline-block;
}

.sample-link:hover {
    text-decoration: underline;
}

.embed-link {
    color: #27ae60;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.embed-link:hover {
    text-decoration: underline;
}

.controls {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: end;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.generate-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    height: fit-content;
}

.generate-btn:hover {
    background: #229954;
}

.map-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

#map {
    width: 100%;
    height: auto;
    overflow: visible;
}

#map svg {
    max-width: 100%;
    height: auto;
}

.map-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.legend {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    display: none;
}

.state {
    stroke: #fff;
    stroke-width: 1px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.state:hover {
    opacity: 0.8;
    stroke-width: 2px;
}

.tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
}

.embed-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.embed-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.embed-code-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 15px 0;
}

.embed-code-container textarea {
    flex: 1;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    resize: vertical;
    background: white;
}

.copy-embed-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    height: fit-content;
}

.copy-embed-btn:hover {
    background: #218838;
}

.embed-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 10px;
}