/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Esconder legenda do Plotly para dashboard político */
#dotplot-chart .legend {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#dotplot-chart .legendgroup {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#dotplot-chart .legendtext {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Esconder TODAS as legendas do Plotly */
.js-plotly-plot .legend {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.js-plotly-plot .legendgroup {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.js-plotly-plot .legendtext {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Esconder legendas por ID específico */
[data-testid="legend"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header moderno Apple com natureza */
.header {
    position: relative;
    height: 110px; /* Altura fixa de 110px */
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(0, 200, 100, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(0, 150, 50, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 150, 0.01) 0%, transparent 60%);
    animation: floatingLeaves 25s ease-in-out infinite;
}

.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(0, 180, 80, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(0, 120, 60, 0.03) 0%, transparent 50%);
    animation: floatingLeaves 30s ease-in-out infinite reverse;
}

.header-background::after {
    content: '🍃 🍃 🍃 🍃 🍃';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 12px;
    color: rgba(0, 200, 100, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px 20px;
    animation: leafFloat 40s linear infinite;
    pointer-events: none;
}

@keyframes leafFloat {
    0% { 
        transform: translateY(100px) rotate(0deg);
        opacity: 0;
    }
    10% { 
        opacity: 0.3;
    }
    90% { 
        opacity: 0.3;
    }
    100% { 
        transform: translateY(-20px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatingLeaves {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% { 
        transform: translateY(-8px) translateX(5px) rotate(0.5deg);
        opacity: 0.2;
    }
    50% { 
        transform: translateY(-4px) translateX(-3px) rotate(-0.3deg);
        opacity: 0.15;
    }
    75% { 
        transform: translateY(-12px) translateX(2px) rotate(0.2deg);
        opacity: 0.25;
    }
}

.header-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px 10px 20px; /* padding-top, padding-right, padding-bottom, padding-left */
    height: 110px; /* Altura fixa de 110px para corresponder ao header */
    display: flex;
    justify-content: space-between;
    align-items: center; /* Voltou para center para alinhar menu */
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza os elementos */
    gap: 20px;
    flex-wrap: wrap; /* Permite quebra em telas menores */
}

.opinion-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #00FF88, #00CC6A);
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}

.toggle-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.toggle-label {
    position: relative;
    z-index: 2;
}

/* Ícone de informação */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.6);
    cursor: help;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.info-icon:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.toggle-btn.active .info-icon {
    color: rgba(0, 0, 0, 0.5);
}

.toggle-btn.active .info-icon:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Tooltip de informação - Estilo Apple */
.political-info-tooltip {
    position: fixed;
    background: rgba(30, 30, 35, 0.95);
    color: rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 320px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10000;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.political-info-tooltip p {
    margin: 0;
    padding-right: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.political-info-tooltip.show {
    display: block;
    animation: fadeInTooltip 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.political-info-tooltip::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: rgba(30, 30, 35, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.political-info-tooltip .close-tooltip {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 300;
}

.political-info-tooltip .close-tooltip:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 20px; /* Mais espaço do topo para não grudar */
    padding-bottom: 10px;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
    position: relative;
}

.logo-link:hover {
    transform: scale(1.05);
}

/* Tooltip para o logo */
.logo-link::after {
    content: 'Opinião Pública-Política Em Redes Abertas';
    position: absolute;
    bottom: 100%;
    left: 50%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-5px);
    margin-bottom: 8px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.logo-link::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 2px;
    z-index: 1001;
}

.logo-link:hover::before {
    opacity: 1;
}

.logo {
    height: 200px;
    width: 240px;
    object-fit: contain;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.logo:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(0, 200, 100, 0.2));
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.period-info {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.period-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

/* Layout Principal */
.main-content {
    padding: 30px;
    background: #000000;
    max-width: 100%;
    margin: 0 auto;
}


/* Gráficos */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    max-width: 1400px;
    margin: 0 auto 40px auto;
}

/* Linhas de gráficos */
.charts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Terceira linha com cards variáveis - adapta ao dashboard */
.charts-row:nth-child(3) {
    grid-template-columns: repeat(4, 1fr);
}

/* Card duplo para Tipos por Assuntos - Largura fixa 674px ocupando 2 colunas */
.chart-container-double {
    grid-column: span 2;
    width: 674px;
    max-width: 674px;
    min-width: 674px;
}

/* Card de Partidos - Largura fixa 668px ocupando 2 colunas */
.chart-container-partidos {
    grid-column: span 2;
    width: 668px;
    max-width: 668px;
    min-width: 668px;
}

/* Ocultar card de partidos por padrão (apenas para dashboard político) */
#partidos-container {
    display: none;
}

/* Filtro hambúrguer para influenciadores */
.filter-toggle {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-icon {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 180px;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-option {
    padding: 8px 16px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00FF88;
}

/* Container de busca */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    min-height: 200px;
}

/* Responsividade para busca */
@media (max-width: 1200px) {
    .search-container {
        min-height: 150px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .search-results {
        max-height: 120px;
    }
    
    /* Responsividade para influenciadores */
    .filter-dropdown {
        min-width: 160px;
        font-size: 13px;
    }
    
    .filter-option {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #00FF88;
    background: rgba(255, 255, 255, 0.15);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.search-result-word {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.search-result-count {
    font-size: 16px;
    color: #00FF88;
    font-weight: 700;
}

.search-no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    padding: 20px;
}

.chart-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #333333;
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    min-height: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Card duplo - Tipos x Assuntos */
.chart-container-double {
    width: 620px;
    height: 300px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.chart-container-double .chart {
    width: 580px;
    height: 240px;
    margin: 0 auto;
    flex-shrink: 0;
}

/* Scrollbars discretas para a área do gráfico */
.chart-container-double .chart::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.chart-container-double .chart::-webkit-scrollbar-track {
    background: transparent;
}

.chart-container-double .chart::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    max-height: 20px;
    max-width: 20px;
    height: 20px;
    width: 20px;
}

.chart-container-double .chart::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chart-container-double .chart::-webkit-scrollbar-corner {
    background: transparent;
}

/* Etiqueta de clique para Tipos x Assuntos */
.click-label {
    background: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    width: 80px;
    height: 80px;
    animation: labelSlideIn 0.3s ease-out;
    position: absolute;
    cursor: default;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-content {
    text-align: center;
}

.label-title {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.label-subtitle {
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 2px;
    color: #B0BEC5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.label-value {
    font-size: 10px;
    font-weight: 800;
    color: #4CAF50;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.label-close {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #B0BEC5;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.label-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

@keyframes labelSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Força scroll apenas na área do gráfico */
.chart-container.chart-container-double .chart {
    min-width: 580px !important;
    width: 580px !important;
    margin: 0 !important;
    overflow: auto !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* Responsividade para telas grandes */
@media (max-width: 1200px) {
    .chart-container-double {
        width: 100%;
        max-width: 620px;
    }
}

/* Scroll para telas pequenas */
@media (max-width: 620px) {
    .chart-container-double {
        overflow: auto !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
    }
    
    .chart-container-double .chart {
        min-width: 580px !important;
        width: 580px !important;
        margin: 0 !important;
    }
}

/* CSS específico para o card Tipos x Assuntos */
@media (max-width: 620px) {
    .chart-container.chart-container-double {
        overflow: auto !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
    }
    
    .chart-container.chart-container-double .chart {
        min-width: 580px !important;
        width: 580px !important;
        margin: 0 !important;
    }
    
    #dotplot-chart {
        min-width: 580px !important;
        width: 580px !important;
    }
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.chart-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-align: left;
    line-height: 1.2;
    flex: 1;
}

.filter-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #007AFF;
}

/* Ícone de informação para filtros nos cards */
.filter-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.5);
    cursor: help;
    transition: all 0.3s ease;
    position: relative;
    margin-left: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-info-icon:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Tooltip para ícone de informação dos filtros */
.filter-info-icon::after {
    content: attr(title);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgb(30, 30, 35);
    color: rgba(255, 255, 255);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-4px);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 200px;
    white-space: normal;
    text-align: left;
    line-height: 1.4;
}

.filter-info-icon::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    right: 8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(30, 30, 35, 0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-4px);
    z-index: 1001;
}

.filter-info-icon:hover::after,
.filter-info-icon:hover::before {
    opacity: 1;
    transform: translateY(0);
}

.hamburger {
    font-size: 0.8rem;
    font-weight: bold;
}

.chart-filters {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
    transition: all 0.3s ease;
}

.chart-filters.show {
    display: flex;
}

.filter-select, .filter-date {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 6px;
    color: #ffffff;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    min-width: 60px;
    max-width: 90px;
    height: 24px;
}

.filter-date {
    min-width: 80px;
    max-width: 90px;
}

.filter-select:focus, .filter-date:focus {
    outline: none;
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.chart {
    width: 100%;
    height: 220px;
    background: transparent;
    flex: 1;
    min-height: 200px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-sizing: border-box;
}

/* Garantir que o gráfico geográfico fique dentro do card */
#geographic-chart {
    overflow: hidden !important;
    max-width: 100%;
    max-height: 100%;
}

#geographic-chart .plotly {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}


/* Tabela de Posts */
.posts-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.posts-table-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #333333;
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th {
    background: rgba(0, 122, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #333333;
    font-size: 0.9rem;
}

.posts-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
}

.posts-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.posts-table tr:last-child td {
    border-bottom: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 122, 255, 0.3);
    border-top: 3px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: repeat(auto-fit, 300px);
        justify-content: center;
    }
}


@media (max-width: 1400px) {
    .charts-row:nth-child(3) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .chart-container-double {
        width: 100%;
        max-width: none;
        min-width: auto;
        grid-column: span 1;
    }
}

@media (max-width: 1200px) {
    .charts-row:nth-child(3) {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .chart-container-double {
        width: 100%;
        max-width: none;
        min-width: auto;
        grid-column: span 1;
    }
    
    .chart-container-partidos {
        width: 100%;
        max-width: none;
        min-width: auto;
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .charts-section {
        padding: 10px;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .charts-row:nth-child(3) {
        grid-template-columns: 1fr;
    }
    
    .chart-container-double {
        grid-column: span 1;
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .chart-container-partidos {
        grid-column: span 1;
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .chart-container {
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    /* Responsividade para mobile */
    .search-container {
        min-height: 120px;
    }
    
    .search-input {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .filter-dropdown {
        min-width: 140px;
        font-size: 12px;
    }
    
    .filter-option {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Media query para mobile - header em coluna apenas em telas pequenas */
@media (max-width: 768px) {
    .header {
        height: auto; /* Permite crescimento no mobile se necessário */
        min-height: auto; /* Remove altura mínima fixa */
        max-height: 3240px; /* Altura máxima não pode passar de 3240px */
        padding: 8px 0; /* Reduzido de 12px para 8px */
        overflow: hidden; /* Evita que conteúdo ultrapasse */
    }
    
    .header-container {
        flex-direction: column; /* Distribuição vertical */
        gap: 8px; /* Reduzido de 12px para 8px */
        height: auto; /* Flexível no mobile */
        padding: 5px 16px; /* Reduzido padding vertical */
        align-items: center; /* Centraliza todos os elementos */
        justify-content: center; /* Centraliza verticalmente */
    }
    
    .logo-section {
        width: 100%;
        justify-content: center;
        align-items: center;
        margin: 0; /* Remove todas as margens */
        flex-direction: column;
        gap: 4px; /* Reduzido de 8px para 4px */
        padding: 2px 0; /* Padding mínimo */
    }
    
    .dashboard-title {
        text-align: center;
        margin: 0;
        padding: 0;
        font-size: 15px;
    }
    
    .header-controls {
        flex-direction: column; /* Distribuição vertical no mobile */
        gap: 8px; /* Espaçamento reduzido entre elementos */
        align-items: center; /* Centraliza todos os elementos */
        justify-content: center; /* Centraliza verticalmente */
        width: 100%;
        max-width: 100%;
    }
    
    .opinion-toggle {
        order: 0; /* Remove ordem, mantém natural */
        width: auto; /* Não força largura total */
        flex-shrink: 0; /* Não encolhe */
    }
    
    .ai-analysis-btn {
        order: 0; /* Remove ordem, mantém natural */
        width: auto; /* Não força largura total */
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: center;
        align-items: center;
        padding: 10px 16px;
        font-size: 13px;
        display: flex;
        flex-shrink: 0; /* Não encolhe */
    }
    
    .ai-label {
        text-align: center;
    }
    
    .period-info {
        order: 0; /* Remove ordem, mantém natural */
        width: auto; /* Não força largura total */
        text-align: center;
        padding: 8px 12px;
        display: flex;
        justify-content: center;
        flex-shrink: 1; /* Pode encolher se necessário */
    }
    
    .toggle-btn {
        padding: 8px 14px;
        font-size: 13px;
        flex: 1;
        white-space: nowrap;
    }
    
    .info-icon {
        font-size: 12px;
        width: 14px;
        height: 14px;
        margin-left: 4px;
    }
    
    .dashboard-title {
        font-size: 16px;
    }
    
    .logo {
        height: 140px !important; /* Reduzido para header mais compacto */
        width: auto !important; /* Auto width mantém proporção */
        max-width: 280px !important; /* Reduzido para header mais compacto */
        min-height: 140px;
    }
    
    .logo-section {
        padding: 2px 0 !important; /* Padding mínimo */
        align-items: center; /* Centraliza no mobile */
        justify-content: center;
        width: 100%;
        gap: 6px !important; /* Espaçamento reduzido entre logo e texto */
        margin: 0; /* Remove margens extras */
    }
    
    .header-container {
        padding: 4px 16px !important; /* Padding reduzido */
        min-height: auto;
        align-items: center; /* Centraliza todos os elementos */
        flex-direction: column; /* Distribuição vertical */
        gap: 6px !important; /* Gap reduzido entre elementos */
        justify-content: center; /* Centraliza verticalmente */
    }
    
    .dashboard-title {
        margin: 0; /* Remove margens do título */
        padding: 0; /* Remove padding do título */
        font-size: 15px; /* Tamanho ligeiramente reduzido */
    }
    
    .header {
        min-height: auto !important;
    }
    
    .logo-link::after {
        font-size: 10px;
        padding: 6px 10px;
        white-space: normal;
        max-width: 180px;
        text-align: center;
        line-height: 1.3;
    }
    
    .period-text {
        font-size: 11px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .chart-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-select, .filter-date {
        width: 100%;
        min-width: auto;
    }
    
    .posts-table-container {
        overflow-x: auto;
    }
    
    /* Ajustar tooltip para mobile */
    .political-info-tooltip {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
    }
}

/* Responsividade extra para telas muito pequenas */
@media (max-width: 480px) {
    .header {
        min-height: auto !important;
        max-height: 3240px !important; /* Altura máxima não pode passar de 3240px */
        padding: 6px 0 !important; /* Padding reduzido */
        overflow: hidden; /* Evita que conteúdo ultrapasse */
    }
    
    .header-container {
        padding: 3px 12px !important; /* Padding muito reduzido */
        gap: 5px !important; /* Gap reduzido */
        align-items: center; /* Centraliza todos os elementos */
        justify-content: center; /* Centraliza verticalmente */
        flex-direction: column; /* Distribuição vertical */
    }
    
    .logo {
        height: 120px !important; /* Reduzido para header mais compacto */
        max-width: 250px !important; /* Reduzido */
        min-height: 120px;
    }
    
    .logo-section {
        padding: 2px 0 !important; /* Padding mínimo */
        gap: 4px !important; /* Gap reduzido */
        margin: 0; /* Remove margens extras */
    }
    
    .dashboard-title {
        font-size: 14px; /* Tamanho reduzido em telas muito pequenas */
        margin: 0;
        padding: 0;
    }
    
    .header-controls {
        flex-direction: column; /* Distribuição vertical em telas pequenas */
        gap: 6px; /* Espaçamento reduzido */
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .toggle-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .ai-analysis-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .period-text {
        font-size: 10px;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.chart-container,
.posts-table-container {
    animation: fadeIn 0.6s ease-out;
}

/* Estados de hover e focus */
button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

/* Transições suaves */
* {
    transition: all 0.3s ease;
}

/* Estilo para elementos Plotly */
.plotly .main-svg {
    background: transparent !important;
}

.plotly .legend {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid #333333 !important;
    border-radius: 8px !important;
}

.plotly .legend .legendtext {
    color: #ffffff !important;
}

/* Nuvem de Palavras */
.wordcloud-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    display: block;
}

.wordcloud-word {
    position: absolute;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    user-select: none;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.wordcloud-word:hover {
    transform: scale(1.15) !important;
    z-index: 100 !important;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
    filter: brightness(1.2);
}

/* Card de Busca - Busque a Relevância */
.search-container {
    padding: 20px;
    height: 240px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
    font-family: 'SF Pro Display', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-input::placeholder {
    color: #888;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.search-result-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(76, 175, 80, 0.3);
}

.search-result-word {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-transform: capitalize;
}

.search-result-count {
    font-size: 18px;
    font-weight: 700;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.search-no-results {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 20px;
    font-style: italic;
}

/* Scrollbar personalizada para resultados */
.search-results::-webkit-scrollbar {
    width: 4px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Quarta linha - Card horizontal com postagens */
.charts-row-full {
    grid-template-columns: 1fr;
    margin-top: 20px;
}

.chart-container-full {
    width: 1363px;
    max-width: 1363px;
    min-width: 1363px;
    grid-column: span 1;
    min-height: 300px;
    height: 300px;
}

.posts-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.posts-prev, .posts-next {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    opacity: 1;
}

.posts-prev:hover, .posts-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.posts-prev:disabled, .posts-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.posts-prev:disabled:hover, .posts-next:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: none;
}

.posts-container {
    display: flex;
    gap: 16px;
    padding: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 240px;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 100%;
    box-sizing: border-box;
    width: 100%;
}

.posts-container::-webkit-scrollbar {
    display: none;
}

.post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    width: 280px;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 220px;
    opacity: 1;
    visibility: visible;
    box-sizing: border-box;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.post-platform-logo {
    font-size: 18px;
    flex-shrink: 0;
}

.platform-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.9);
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.post-user-info {
    flex: 1;
}

.post-username {
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.post-platform {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin: 0;
    line-height: 1.2;
}

.post-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-height: 120px;
}

.post-engagement {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    flex-shrink: 0;
    margin-top: auto;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-stats svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.post-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    margin-left: auto;
}

.post-link {
    color: #00FF88;
    text-decoration: none;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-link:hover {
    color: #00CC6A;
    text-decoration: underline;
}

/* Responsividade para o card de postagens */
@media (max-width: 1400px) {
    .chart-container-full {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .posts-container {
        gap: 14px;
        padding: 14px;
        height: 220px;
    }
    
    .post-card {
        min-width: 260px;
        max-width: 300px;
        width: 260px;
        padding: 14px;
    }
}

@media (max-width: 1200px) {
    .chart-container-full {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .posts-container {
        gap: 12px;
        padding: 12px;
        height: 200px;
    }
    
    .post-card {
        min-width: 240px;
        max-width: 280px;
        width: 240px;
        padding: 12px;
    }
    
    .post-content {
        font-size: 12px;
        -webkit-line-clamp: 4;
        line-height: 1.3;
    }
    
    .post-username {
        font-size: 12px;
    }
    
    .platform-logo {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .chart-container-full {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .posts-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        height: auto;
        min-height: 300px;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }
    
    .post-card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 12px;
        box-sizing: border-box;
        max-height: 200px;
    }
    
    .post-content {
        font-size: 12px;
        -webkit-line-clamp: 4;
        line-height: 1.3;
        max-height: 100px;
    }
    
    .post-username {
        font-size: 12px;
    }
    
    .platform-logo {
        width: 18px;
        height: 18px;
    }
    
    .post-header {
        gap: 8px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .chart-container-full {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
    
    .posts-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        height: auto;
        min-height: 250px;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }
    
    .post-card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 10px;
        box-sizing: border-box;
        max-height: 180px;
    }
    
    .post-content {
        font-size: 11px;
        -webkit-line-clamp: 5;
        line-height: 1.3;
        max-height: 80px;
    }
    
    .post-username {
        font-size: 11px;
    }
    
    .platform-logo {
        width: 16px;
        height: 16px;
    }
    
    .post-header {
        gap: 6px;
        margin-bottom: 8px;
    }
}

/* Estilos para o botão de Análise da IA - Design Apple Premium */
.ai-analysis-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, 
        rgba(88, 86, 214, 0.85) 0%, 
        rgba(120, 81, 169, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin-left: 16px;
    box-shadow: 
        0 4px 16px rgba(88, 86, 214, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-analysis-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.ai-analysis-btn:hover::before {
    left: 100%;
}

.ai-analysis-btn:hover {
    background: linear-gradient(135deg, 
        rgba(88, 86, 214, 1) 0%, 
        rgba(120, 81, 169, 1) 100%);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 24px rgba(88, 86, 214, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ai-analysis-btn:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 
        0 4px 16px rgba(88, 86, 214, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-label {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Modal de Análise da IA */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ai-modal.show {
    display: flex;
}

.ai-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ai-modal-content {
    position: relative;
    background: rgba(28, 28, 30, 0.95);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(28, 28, 30, 0.8);
}

.ai-modal-title {
    display: flex;
    align-items: center;
}

.ai-modal-title h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.ai-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #ffffff;
}

.ai-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ai-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(28, 28, 30, 0.8);
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.ai-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: ai-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes ai-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-loading p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    color: #8e8e93;
    margin: 0;
}

.ai-analysis-result {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
}

.ai-analysis-result h1 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.ai-analysis-result h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.ai-analysis-result h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.ai-analysis-result p {
    font-size: 16px;
    margin: 0 0 16px 0;
    color: #e5e5e7;
    line-height: 1.6;
}

.ai-analysis-result ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.ai-analysis-result li {
    margin: 0 0 8px 0;
    color: #e5e5e7;
}

.ai-analysis-result strong {
    color: #ffffff;
    font-weight: 600;
}

.ai-analysis-result em {
    color: #8e8e93;
    font-style: italic;
}

/* Responsividade do modal */
@media (max-width: 768px) {
    .ai-modal-content {
        margin: 20px;
        max-height: 90vh;
    }
    
    .ai-modal-header {
        padding: 20px;
    }
    
    .ai-modal-body {
        padding: 20px;
    }
    
    .ai-modal-title h2 {
        font-size: 20px;
    }
}
