/* assets/css/complexidade.css */
/* CSS ISOLADO - Apenas para Calculadora de Complexidade Algorítmica */
/* CORES COMPUTAÇÃO APLICADAS - MANTENDO TODAS AS CLASSES FUNCIONAIS */

/* ===== VARIÁVEIS COMPUTAÇÃO ===== */
:root {
    --primary: #2d3436;          /* Preto código */
    --secondary: #00b894;        /* Verde terminal */
    --accent: #0984e3;           /* Azul digital */
    --light: #f8f9fa;            /* Fundo cinza claro */
    --gradient: linear-gradient(135deg, #2d3436, #00b894);
    
    /* Cores complementares */
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0ea5e9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #d1d5db;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
}

/* ===================================
   SEÇÃO DA CALCULADORA COMPLEXIDADE
   ================================== */
.complexity-calculator-section {
    margin-bottom: 3rem;
}

.complexity-header {
    text-align: center;
    margin-bottom: 2rem;
}

.complexity-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.complexity-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.complexity-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(45, 52, 54, 0.1);
    border: 1px solid var(--light);
}

/* ===================================
   SISTEMA DE TABS
   ================================== */
.complexity-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.complexity-tab-btn {
    background: var(--gray-50);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.complexity-tab-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.complexity-tab-btn.active {
    background: var(--primary);
    color: white;
    border-bottom: 2px solid var(--primary);
}

.complexity-tab-content {
    display: none;
}

.complexity-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===================================
   INPUT SECTION
   ================================== */
.complexity-input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
}

.complexity-input-group {
    flex: 1;
    min-width: 200px;
}

.complexity-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.complexity-input-group select,
.complexity-input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.complexity-input-group select:focus,
.complexity-input-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.complexity-input-group small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}

.complexity-calculate-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    background: var(--gradient);
    color: white;
}

.complexity-calculate-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* ===================================
   COMPARAÇÃO SECTION
   ================================== */
.complexity-comparison-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.complexity-algorithm-selector {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.complexity-vs {
    background: linear-gradient(135deg, var(--accent), #0369a1);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    min-width: 60px;
}

.complexity-size-range {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.complexity-size-range label {
    font-weight: 600;
    color: var(--primary);
}

.complexity-size-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.complexity-size-inputs input {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
}

.complexity-size-inputs span {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===================================
   RESULTADO COMPLEXIDADE
   ================================== */
.complexity-resultado {
    background: linear-gradient(135deg, var(--light), var(--gray-100));
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideInUp 0.5s ease;
}

.complexity-resultado h3 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Analysis Grid */
.complexity-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.complexity-metric {
    background: white;
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.complexity-metric:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.complexity-metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.complexity-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

/* Time Grid */
.complexity-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.complexity-time-metric {
    background: white;
    border: 2px solid #fef3c7;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.complexity-time-metric:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.2);
}

.complexity-time-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.complexity-time-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

/* ===================================
   GRÁFICOS
   ================================== */
.complexity-growth-chart,
.complexity-comparison-chart {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    position: relative;
}

.complexity-chart-placeholder {
    text-align: center;
    color: #9ca3af;
}

/* Comparison Table */
.complexity-comparison-table {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.complexity-comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.complexity-comparison-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.complexity-comparison-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.complexity-comparison-table tr:nth-child(even) {
    background: var(--gray-50);
}

.complexity-comparison-table tr:hover {
    background: var(--gray-100);
}

.complexity-comparison-table .better {
    background: #d1fae5;
    color: #047857;
}

.complexity-comparison-table .worse {
    background: #fee2e2;
    color: #dc2626;
}

/* ===================================
   MELHORIAS PARA EXPLICAÇÃO DO CÁLCULO
   ================================== */

.complexity-explanation {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid var(--accent);
    border-radius: 15px;
    animation: slideInUp 0.5s ease;
    box-shadow: 0 8px 25px rgba(9, 132, 227, 0.15);
}

.complexity-explanation h3 {
    color: #0c4a6e;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #0284c7;
    padding-bottom: 0.5rem;
}

/* Container dos passos de cálculo */
#calculationSteps {
    display: flex;
    flex-direction: column;

}

#calculationSteps h4 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    margin: 0 0 1rem 0;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.2);
}

/* Grid para métricas do cálculo */
.calculation-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Estilização individual de cada métrica */
#calculationSteps p {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#calculationSteps p:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 184, 148, 0.2);
}

#calculationSteps p strong {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    margin-right: 1rem;
}

/* Valor das métricas */
#calculationSteps p strong + text,
#calculationSteps p:after {
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

/* Estilos específicos para diferentes tipos de métricas */
#calculationSteps p:has(strong:contains("Complexidade")) {
    border-left: 4px solid #8b5cf6;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}

#calculationSteps p:has(strong:contains("Tamanho")) {
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

#calculationSteps p:has(strong:contains("Operações")) {
    border-left: 4px solid var(--warning);
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

#calculationSteps p:has(strong:contains("Velocidade")) {
    border-left: 4px solid var(--secondary);
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
}

#calculationSteps p:has(strong:contains("Tempo")) {
    border-left: 4px solid #06b6d4;
    background: linear-gradient(135deg, #ecfeff, #cffafe);
}

#calculationSteps p:has(strong:contains("Viabilidade")) {
    border-left: 4px solid var(--success);
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

#calculationSteps p:has(strong:contains("Contexto")) {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--light), rgba(45, 52, 54, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    text-align: center;
    flex-direction: column;
    gap: 0.5rem;
}

#calculationSteps p:has(strong:contains("Contexto")) strong {
    margin-right: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Ícones para diferentes tipos de viabilidade */
.viability-excellent {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
    border-left-color: #10b981 !important;
}

.viability-good {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    border-left-color: #3b82f6 !important;
}

.viability-fair {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border-left-color: #f59e0b !important;
}

.viability-poor {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    border-left-color: #ef4444 !important;
}

/* Responsividade para explicação */
@media (max-width: 768px) {
    .complexity-explanation {
        padding: 1.5rem;
    }
    
    .calculation-metrics {
        grid-template-columns: 1fr;
    }
    
    #calculationSteps p {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    #calculationSteps p strong {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .complexity-explanation h3 {
        font-size: 1.2rem;
    }
    
    #calculationSteps h4 {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    #calculationSteps p {
        padding: 1rem;
    }
}
/* ===================================
   CONTEÚDO EDUCACIONAL COMPLEXIDADE
   ================================== */
.complexity-educational-content {
    margin-top: 3rem;
}

.complexity-content-block {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(45, 52, 54, 0.08);
    border: 1px solid var(--light);
}

.complexity-content-block h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.complexity-content-block p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Notations Grid */
.complexity-notations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.complexity-notation-card {
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid;
}

.complexity-notation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.complexity-notation-card.excellent {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: #10b981;
}

.complexity-notation-card.good {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
}

.complexity-notation-card.fair {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
}

.complexity-notation-card.warning {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
    border-color: #f97316;
}

.complexity-notation-card.danger {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    border-color: #ef4444;
}

.complexity-notation-symbol {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.complexity-notation-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.complexity-notation-card p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.complexity-example {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Applications Grid */
.complexity-applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.complexity-app-card {
    background: linear-gradient(135deg, var(--light), #e0f2fe);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.complexity-app-card:hover {
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 132, 227, 0.2);
}

.complexity-app-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.complexity-app-card h4 {
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.complexity-app-card p {
    color: #075985;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.complexity-app-complexity {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Comparison Example */
.complexity-comparison-example {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.complexity-method {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.complexity-method:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.complexity-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.complexity-method-header h4 {
    color: #374151;
    margin: 0;
}

.complexity-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.complexity-badge.linear {
    background: #fef3c7;
    color: #92400e;
}

.complexity-badge.logarithmic {
    background: #dbeafe;
    color: #1e40af;
}

.complexity-method-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.complexity-visual-bar {
    background: var(--gray-100);
    height: 8px;
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.complexity-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.complexity-bar.linear {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.complexity-bar.logarithmic {
    background: linear-gradient(90deg, var(--accent), #1d4ed8);
}

.complexity-conclusion {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.complexity-conclusion h4 {
    color: #047857;
    margin-bottom: 0.5rem;
}

.complexity-conclusion p {
    color: #065f46;
    margin: 0;
}

/* Tips Grid */
.complexity-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.complexity-tip-card {
    background: linear-gradient(135deg, var(--light), #f1f5f9);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.complexity-tip-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 52, 54, 0.2);
}

.complexity-tip-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.complexity-tip-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.complexity-tip-card p {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.complexity-tip-code {
    font-family: 'Courier New', monospace;
    background: var(--primary);
    color: var(--secondary);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ===================================
   FAQ, CREDIBILIDADE E REFERÊNCIAS
   ================================== */
.content-block {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--light);
    transition: all 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 10px 35px rgba(45, 52, 54, 0.1);
    transform: translateY(-2px);
}

.content-block h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 4px solid var(--primary);
    padding-bottom: 0.8rem;
    font-weight: 600;
}

/* FAQ Styles */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(45, 52, 54, 0.1);
}

.faq-item[open] {
    box-shadow: 0 8px 25px rgba(45, 52, 54, 0.15);
}

.faq-question {
    background: var(--primary);
    color: var(--white);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question:hover {
    background: var(--secondary);
}

.faq-question::after {
    content: "▼";
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1.5rem;
    background: var(--white);
}

.faq-answer p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
}

.faq-answer strong {
    color: var(--primary);
    font-weight: 600;
}

/* Credibilidade Styles */
.credibilidade-container {
    background: linear-gradient(135deg, var(--light), rgba(45, 52, 54, 0.05));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
    color: var(--secondary);
}

.credibilidade-title {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.credibilidade-content {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.credibilidade-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(45, 52, 54, 0.2);
}

/* Referências Styles */
.referencias-container {
    margin-top: 1.5rem;
}

.referencias-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referencia-item {
    background: var(--light);
    border-left: 4px solid var(--primary);
    padding: 1.2rem 1.5rem;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
    position: relative;
}

.referencia-item:hover {
    background: rgba(45, 52, 54, 0.08);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.1);
}

.referencia-item::before {
    content: "📖";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.referencia-item em {
    color: var(--primary);
    font-weight: 600;
}

/* ===================================
   EXEMPLOS E AJUDA
   ================================== */
.complexity-examples,
.complexity-help {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light), var(--gray-100));
    border-radius: 15px;
    border: 1px solid var(--border);
}

.complexity-examples h2,
.complexity-help h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
}

.complexity-examples-grid,
.complexity-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.complexity-example-item {
    background: white;
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.complexity-example-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.complexity-example-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.complexity-example-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.complexity-example-btn {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.complexity-example-btn:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    transform: translateY(-1px);
}

.complexity-help-item {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.complexity-help-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.complexity-help-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.complexity-help-content h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.complexity-help-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* ===================================
   RESPONSIVIDADE COMPLEXIDADE
   ================================== */
@media (max-width: 768px) {
    .complexity-header h1 {
        font-size: 2rem;
    }
    
    .complexity-header p {
        font-size: 1rem;
    }
    
    .complexity-container {
        padding: 1.5rem;
    }
    
    .complexity-tabs {
        flex-direction: column;
    }
    
    .complexity-tab-btn {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .complexity-input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .complexity-input-group {
        min-width: unset;
    }
    
    .complexity-algorithm-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .complexity-vs {
        align-self: center;
        max-width: 100px;
    }
    
    .complexity-comparison-example {
        grid-template-columns: 1fr;
    }
    
    .complexity-notations-grid,
    .complexity-applications-grid,
    .complexity-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .complexity-examples-grid,
    .complexity-help-grid {
        grid-template-columns: 1fr;
    }
    
    .complexity-help-item {
        flex-direction: column;
        text-align: center;
    }
    
    .complexity-help-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .content-block {
        padding: 1.5rem;
    }
    
    .complexity-examples,
    .complexity-help {
        padding: 1.5rem;
    }
    
    .complexity-metric-value,
    .complexity-time-value {
        font-size: 1.2rem;
    }
    
    .complexity-notation-symbol {
        font-size: 2rem;
    }
    
    .credibilidade-container {
        padding: 1rem;
    }
    
    .credibilidade-badges {
        gap: 0.5rem;
    }
    
    .credibilidade-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}