.graficos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    background-color: white;
    width: 100%;
    max-width: 1380px;
    gap: 1.5rem;
}

.chart-container {
    position: relative;
    width: 100%;
    padding-top: 0;
    background: var(--branco);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
    min-height: 400px;
}

.chart-container svg {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    max-height: 600px;
}

#poemas,
#sst {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

#poemas svg,
#sst svg {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.chart-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.chart-subtitle {
    text-align: left;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    margin-top: 15px;
}

.chart-updated {
    text-align: right;
    font-size: 10px;
    color: #999;
    margin-bottom: 10px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.legend-color {
    width: 14px;
    height: 2px;
    border-radius: 2px;
}

.legend-45ghz {
    background-color: #cc141d;
}

.legend-90ghz {
    background-color: #0E7AB4;
}

.legend-212ghz {
    background-color: #DB4B16;
}

.legend-405ghz {
    background-color: #1ca83d;
}

.axis text {
    font-size: 10px;
    fill: #666;
}

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

.grid line {
    stroke: #f0f0f0;
    stroke-width: 1;
}

.grid path {
    stroke-width: 0;
}

.line-45ghz {
    fill: none;
    stroke: #cc141d;
    stroke-width: 1.5;
}

.line-90ghz {
    fill: none;
    stroke: #0E7AB4;
    stroke-width: 1.5;
}

.line-212ghz {
    fill: none;
    stroke: #DB4B16;
    stroke-width: 1.5;
}

.line-405ghz {
    fill: none;
    stroke: #1ca83d;
    stroke-width: 1.5;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    border-radius: 5px;
    font-size: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    max-width: 150px;
}

.tooltip-time {
    font-weight: bold;
    margin-bottom: 3px;
}

.tooltip-value {
    margin: 1px 0;
}

.hover-line {
    stroke: #999;
    stroke-width: 1;
    stroke-dasharray: 3, 3;
    opacity: 0;
}

.hover-dot {
    opacity: 0;
    stroke: #fff;
    stroke-width: 2;
}

.overlay {
    fill: none;
    pointer-events: all;
}

@media (max-width: 320px) {
    .chart-container {
        padding: 0.5rem;
    }

    .legend {
        gap: 10px;
    }

    .legend-item {
        font-size: 10px;
    }

    .chart-subtitle {
        font-size: 10px;
    }

    .chart-updated {
        font-size: 9px;
    }
}

@media (min-width: 480px) {
    .chart-container {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .graficos {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .graficos .chart-container {
        flex: 1 1 calc(50% - 0.75rem);
        padding: 2rem;
    }

    .line-405ghz {
        stroke-width: 2;
    }

    .tooltip-value {
        margin: 2px 0;
    }

    .tooltip-time {
        margin-bottom: 5px;
    }

    .tooltip {
        padding: 10px;
        font-size: 12px;
        max-width: none;
    }

    .line-212ghz {
        stroke-width: 2;
    }

    .line-90ghz {
        stroke-width: 2;
    }

    .axis text {
        font-size: 12px;
    }

    .line-45ghz {
        stroke-width: 2;
    }

    .legend-color {
        width: 16px;
        height: 3px;
    }

    .legend-item {
        gap: 8px;
        font-size: 14px;
    }

    .legend {
        gap: 30px;
        margin-bottom: 20px;
    }

    .chart-updated {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .chart-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
        margin-top: 20px;
    }

    .chart-title {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .graficos {
        width: 80%;
    }
}

@media (min-width: 1200px) {
    .graficos {
        width: 70%;
    }
}

@media (min-width: 1562px) {
    .chart-container {
        max-width: 700px;
        margin: 0 auto;
    }
}