/* Styles for Vision Evolution Sankey Diagram */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

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

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.controls button {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
}

.controls button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.controls button:active {
    transform: translateY(0);
}

#sankey-diagram {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

#sankey-diagram svg {
    display: block;
    margin: 0 auto;
}

.node rect {
    cursor: pointer;
    transition: opacity 0.3s;
}

.node text {
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.link path {
    transition: opacity 0.3s;
}

.tooltip {
    position: absolute;
    text-align: left;
    padding: 10px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 5px;
    pointer-events: none;
    max-width: 300px;
}

.legend {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.legend h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.info-panel {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.info-panel h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.info-panel p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-panel ul {
    margin-left: 20px;
}

.info-panel li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .controls button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    #sankey-diagram {
        overflow-x: auto;
    }
}

/* Print styles */
@media print {
    .controls {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        max-width: 100%;
    }
}