/* Common styles for all visualizations */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 1.5rem;
    margin: 15px 0;
}

#visualization {
    margin: 0 auto;
    width: 100vw;
    max-width: 900px;
}

/* Navigation links */
.nav-links {
    text-align: center;
    margin: 15px 0;
}

.nav-links a {
    margin: 0 10px;
    text-decoration: none;
    color: #4682b4;
    font-weight: bold;
}

.nav-links a.active {
    color: #333;
    border-bottom: 2px solid #333;
}

/* Control buttons */
.controls {
    text-align: center;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.toggle-button {
    background-color: #4682b4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.toggle-button:hover {
    background-color: #36648b;
}

.toggle-button.active {
    background-color: #d73027;
}

.toggle-button.active:hover {
    background-color: #a50026;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    max-width: 200px;
}

/* Error message */
.error {
    color: #d73027;
    text-align: center;
    font-weight: bold;
    padding: 20px;
}

/* Heatmap specific styles */
.cell {
    stroke: #fff;
    stroke-width: 1px;
}

.cell:hover {
    stroke: #000;
    stroke-width: 2px;
}

/* Bubble chart specific styles */
.bubble {
    cursor: pointer;
}

/* 3D visualization specific styles */
.axis-label {
    font-size: 12px;
    fill: #333;
}

/* Axis styling */
.axis text {
    font-size: 12px;
}

.axis path,
.axis line {
    fill: none;
    stroke: #000;
    shape-rendering: crispEdges;
}

/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 1.2rem;
        margin: 10px 0;
    }
    
    .nav-links {
        margin: 5px 0;
    }
    
    .nav-links a {
        margin: 0 3px;
        font-size: 0.9rem;
    }
    
    .tooltip {
        padding: 5px;
        font-size: 10px;
        max-width: 150px;
    }
    
    .toggle-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

button#default-view {
    background-color: #4CAF50;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button#default-view:hover {
    background-color: #45a049;
}

.control-group {
    margin-bottom: 10px;
}