body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.control-group select:focus {
    outline: none;
    border-color: #007bff;
}

.color-palette-dropdown {
    position: relative;
    display: inline-block;
}

.color-palette-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.color-palette-selected:hover {
    border-color: #007bff;
}

.color-palette-swatches {
    display: flex;
    gap: 2px;
}

.color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.color-palette-dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    max-height: 300px;
    overflow-y: auto;
    bottom: 100%;
}

.color-palette-option {
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-palette-option:hover {
    background-color: #f8f9fa;
}

.plots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(850px, 1fr));
    gap: 20px;
    margin-top: 30px;
    justify-items: center;
}

.plot {
    width: 850px;
    height: 900px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.plot-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.plot-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.plot-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plot-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.plot-viz-select {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.save-button {
    padding: 8px 16px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background: #007bff;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-button:hover {
    background: #0056b3;
}

.axis {
    font-size: 14px;
}

.axis-label {
    font-size: 16px;
    font-weight: 600;
}

.bar {
    transition: opacity 0.3s, stroke-width 0.3s;
    stroke: white;
    stroke-width: 1px;
    cursor: grab;
}

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

.bar.dragging {
    opacity: 0.6;
    cursor: grabbing;
}

.bar-text {
    fill: black;
    font-size: 16px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
}

.pie-slice {
    transition: opacity 0.3s;
    cursor: pointer;
    stroke: white;
    stroke-width: 2px;
}

.pie-slice:hover {
    opacity: 0.8;
}

.pie-text {
    fill: black;
    font-size: 14px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
}

.pie-label-line {
    fill: none;
    stroke: #333;
    stroke-width: 1px;
}

.treemap-cell {
    transition: opacity 0.3s;
}

.treemap-cell rect:hover {
    opacity: 0.8;
}

.treemap-label {
    fill: white;
    font-weight: 600;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.treemap-value {
    fill: white;
    font-weight: normal;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.grid-circle {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 1;
    stroke-dasharray: 2,2;
    pointer-events: none;
}

.grid-line {
    stroke: #e9ecef;
    stroke-width: 1;
    pointer-events: none;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.drag-line {
    stroke: #007bff;
    stroke-width: 2px;
    stroke-dasharray: 5,5;
    opacity: 0;
}

@media (max-width: 1700px) {
    .plots-container {
        grid-template-columns: 1fr;
    }
}