/* Stili generali */
.population-pyramid {
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
}
.population-pyramid text {
    font-family: inherit;
    font-size: inherit;
}
.value {
    text-align: center;
    font-weight: bold;
    font-size: 5em;
    width: 200px;
    height: 50px;
    line-height: 50px;
    margin: 20px auto;
    letter-spacing: -.07em;
    text-shadow: white 2px 2px 2px;
}

/* Timeline */
.timeline-container {
    position: relative;
    width: 400px;
    height: 80px;
    margin: 20px auto;
}
.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #bdc3c7;
    transform: translateY(-50%);
    border-radius: 2px;
}
.timeline-bubble {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #e74c3c;
    border: 2px solid white;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 15px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

/* Bottoni SVG */
.timeline-svg-btn {
    cursor: pointer;
    transition: opacity 0.3s;
}
.timeline-svg-btn rect {
    transition: fill 0.2s, stroke 0.2s;
}
.timeline-svg-btn:hover rect {
    fill: #f0f0f0;
    stroke: #e74c3c;
}
.timeline-svg-btn:active rect {
    stroke-width: 2;
    stroke: #c0392b;
}

/* Stili del grafico */
.male-bar { fill: #4682b4; }
.female-bar { fill: #add8e6; }
.male-label, .female-label { fill: black; font-size: 14px; }
.age-label { fill: black; font-size: 12px; }
.scale-label { fill: black; font-size: 12px; }
.axis-line { stroke: #bdc3c7; stroke-width: 1; }
.error-message { fill: red; font-size: 20px; }