/*
 * SPENDWISE ANIMATION - CÓDIGO CSS ATUALIZADO COM VARIÁVEIS GLOBAIS
 * As variáveis (--primary-color, --white, --shadow, etc.) são lidas do styles.css
 */

/* Estilos básicos para reset (Mantido por segurança, mas idealmente estaria num reset.css global) */
/* Se você já tem um reset global em styles.css, pode remover este '*' daqui */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container principal da animação */
.animation-container {
    width: 100%;
    max-width: 800px;
    height: 500px;
    aspect-ratio: 16/10;
    /* Usa RGBA com as cores primária/secundária - deixamos assim por enquanto para manter a transparência original */
    background: linear-gradient(
        135deg,
        rgba(127, 179, 213, 0.3) 0%, /* Cor primária com 0.3 de opacidade */
        rgba(149, 200, 185, 0.3) 100% /* Cor secundária com 0.3 de opacidade */
    );
    /* Se quiser usar as vars, precisaria definir vars RGBA ou usar alfa no final */
    /* background: linear-gradient(135deg, var(--primary-color-rgba-03, rgba(127, 179, 213, 0.3)) 0%, var(--secondary-color-rgba-03, rgba(149, 200, 185, 0.3)) 100%); */

    border-radius: 20px; /* Poderia ser var(--border-radius) se quiser 8px? Ou definir --border-radius-large? */
    box-shadow: var(--shadow); /* Usa a variável global */
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/* Animações (Keyframes mantidos) */
.animate {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-animation {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* Legendas da animação */
.animation-caption {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--white); /* Usa variável */
    opacity: 0;
    transform: translateY(-20px);
    transition: var(--transition); /* Usa variável */
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 10px; /* Poderia ser var(--border-radius)? */
    margin: 0 auto;
    width: fit-content;
}

/* ETAPA 1: Fatura */
.invoice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 300px;
    height: 350px;
    background-color: var(--white); /* Usa variável */
    border-radius: 10px; /* Poderia ser var(--border-radius)? */
    box-shadow: var(--shadow); /* Usa variável */
    padding: 15px;
    opacity: 0;
    transition: var(--transition); /* Usa variável */
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    overflow: visible;
}

.invoice-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.invoice-logo { width: 40px; height: 40px; object-fit: contain; }
.invoice-date { color: var(--accent-color); font-size: 12px; } /* Usa variável */
.invoice-title { font-size: 16px; font-weight: 700; color: var(--accent-color); margin-bottom: 8px; text-align: center; } /* Usa variável */

.credit-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); /* Usa variáveis */
    border-radius: 8px; /* Poderia ser var(--border-radius)? */
    padding: 10px; margin-bottom: 15px; position: relative;
}
.card-chip { width: 25px; height: 15px; background: linear-gradient(to bottom, #d4af37 0%, #f9e075 50%, #d4af37 100%); border-radius: 3px; margin-bottom: 8px; position: relative; } /* Mantém cor ouro */
.card-chip::before, .card-chip::after { content: ''; position: absolute; width: 100%; height: 2px; background-color: rgba(0, 0, 0, 0.2); }
.card-chip::before { top: 25%; }
.card-chip::after { top: 75%; }
.card-number { color: var(--white); font-size: 12px; letter-spacing: 2px; } /* Usa variável */

.invoice-line { display: flex; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border-color); position: relative; color: var(--text-color); font-size: 12px; } /* Usa variáveis */
.line-indicator { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; }
.invoice-line:nth-child(5) .line-indicator { background-color: var(--primary-color); } /* Usa variável */
.invoice-line:nth-child(6) .line-indicator { background-color: var(--secondary-color); } /* Usa variável */
.invoice-line:nth-child(7) .line-indicator { background-color: var(--accent-color); } /* Usa variável */
.invoice-line:nth-child(8) .line-indicator { background-color: var(--primary-color); } /* Usa variável */
.invoice-line:nth-child(9) .line-indicator { background-color: var(--secondary-color); } /* Usa variável */

.invoice-total { margin-top: auto; display: flex; justify-content: space-between; padding-top: 8px; border-top: 2px solid var(--border-color); font-size: 12px; } /* Usa variável */
.total-label, .total-value { font-weight: 700; color: var(--accent-color); } /* Usa variável */

/* ETAPA 2: Processamento com IA */
.processing { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); width: 300px; height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); margin-top: 30px; overflow: visible; } /* Usa variável */
.processing-circles { display: flex; justify-content: center; margin-bottom: 30px; position: relative; z-index: 5; }
.processing-ring { position: relative; width: 120px; height: 120px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 30px; }
.processing-ring::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 6px solid rgba(93, 109, 126, 0.3); border-top-color: var(--white); animation: spin 1.5s linear infinite; } /* Usa variável */
.processing-ai { width: 60px; height: 60px; background-color: var(--accent-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--white); font-weight: 700; font-size: 24px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); } /* Usa variáveis */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.circle { width: 25px; height: 25px; border-radius: 50%; margin: 0 10px; animation: pulse 1.5s infinite ease-in-out; opacity: 1; }
.circle1 { background-color: var(--white); animation-delay: 0s; } /* Usa variável */
.circle2 { background-color: var(--accent-color); animation-delay: 0.3s; } /* Usa variável */
.circle3 { background-color: var(--light-bg); animation-delay: 0.6s; } /* Usa variável */
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.7; } }

.processing-text { color: var(--white); font-size: 20px; font-weight: 500; margin-top: 20px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); } /* Usa variável */

/* ETAPA 3: Dados organizados */
.data { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 350px; max-width: 100%; height: 350px; background-color: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 20px; opacity: 0; transition: var(--transition); margin-top: 30px; overflow: visible; } /* Usa variáveis */
.data-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.data-title { font-size: 18px; font-weight: 700; color: var(--accent-color); } /* Usa variável */
.data-date { color: var(--accent-color); font-size: 14px; } /* Usa variável */
.data-table { display: flex; flex-direction: column; }
.data-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border-color); } /* Usa variável */
.data-category { width: 100px; padding: 2px 8px; border-radius: 15px; font-size: 12px; font-weight: 700; text-align: center; color: var(--white); } /* Usa variável */
.category1 { background-color: var(--primary-color); } /* Usa variável */
.category2 { background-color: var(--secondary-color); } /* Usa variável */
.category3 { background-color: var(--accent-color); } /* Usa variável */
.data-description { flex: 1; padding: 0 10px; color: var(--text-color); } /* Usa variável */
.data-value { font-weight: 700; color: var(--accent-color); } /* Usa variável */

/* ETAPA 4: Gráficos e visualizações */
.charts { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 380px; max-width: 100%; height: 350px; background-color: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 20px; opacity: 0; transition: var(--transition); margin-top: 30px; overflow: visible; } /* Usa variáveis */
.charts-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.charts-title { font-size: 18px; font-weight: 700; color: var(--accent-color); } /* Usa variável */
.charts-date { color: var(--accent-color); font-size: 14px; } /* Usa variável */
.charts-container { display: flex; justify-content: space-between; height: 250px; position: relative; }
.bar-chart { width: 48%; }
.chart-title { font-size: 14px; font-weight: 700; color: var(--accent-color); margin-bottom: 15px; text-align: center; } /* Usa variável */
.bars-container { display: flex; justify-content: space-between; align-items: flex-end; height: 180px; }
.bar-group { display: flex; flex-direction: column; align-items: center; width: 20%; }
.bar { width: 100%; background-color: var(--primary-color); border-radius: 5px 5px 0 0; transition: height 1s ease-out; height: 0; } /* Usa variável */
.bar1 { background-color: var(--primary-color); } /* Usa variável */
.bar2 { background-color: var(--secondary-color); } /* Usa variável */
.bar3 { background-color: var(--accent-color); } /* Usa variável */
.bar4 { background-color: var(--primary-color); opacity: 0.7; } /* Usa variável */
.bar-label { font-size: 10px; margin-top: 5px; text-align: center; color: var(--text-color); } /* Usa variável */
.pie-chart { width: 48%; }
.pie-container { display: flex; flex-direction: column; align-items: center; }
.pie { width: 120px; height: 120px; border-radius: 50%; background: conic-gradient( var(--primary-color) 0% 40%, var(--secondary-color) 40% 65%, var(--accent-color) 65% 85%, var(--primary-color) 85% 100% ); margin-bottom: 15px; flex-shrink: 0; } /* Usa variáveis */
.pie-legend { font-size: 10px; color: var(--text-color); } /* Usa variável */
.legend-item { display: flex; align-items: center; margin-bottom: 5px; }
.legend-color { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.color1 { background-color: var(--primary-color); } /* Usa variável */
.color2 { background-color: var(--secondary-color); } /* Usa variável */
.color3 { background-color: var(--accent-color); } /* Usa variável */
.color4 { background-color: var(--primary-color); opacity: 0.7; } /* Usa variável */
.chart-watermark { position: absolute; bottom: 5px; right: 5px; opacity: 0.2; }
.watermark-logo { width: 30px; height: 30px; object-fit: contain; }

/* ETAPA 5: Logo final */
.final-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 500px; height: 400px; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: var(--transition); overflow: visible; } /* Usa variável */
.logo-complete { width: 500px; height: auto; max-width: 100%; }
.tagline { display: none; }
.animation-controls { display: none; }