/* Reset moderno e variáveis de design - Tema iGreen Energy */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Inter:wght@400;500;700&family=Caveat:wght@700&display=swap');

:root {
    --primary: #00A651; /* iGreen Green */
    --primary-glow: #00ff7b; /* Bright Green for energy */
    --accent: #FF7A00; /* Energy Orange */
    --accent-glow: #ff9d40;
    --accent-blue: #00E5FF; /* Electric Blue for alternative highlights */
    --bg-dark: #050806; /* Deep dark green-tinted black */
    --bg-card: rgba(10, 17, 13, 0.45); /* Highly translucent card */
    --bg-card-hover: rgba(16, 28, 21, 0.65);
    --text-light: #ffffff;
    --text-muted: #a0aab2;
    --glass: rgba(0, 166, 81, 0.05);
    --glass-border: rgba(0, 166, 81, 0.2);
    --glass-border-strong: rgba(0, 166, 81, 0.45);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Fundo com efeito de energia sutil */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(0, 166, 81, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(0, 229, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Fundo Spline 3D Dinâmico */
.hero-bg-spline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 95%);
    mask-image: radial-gradient(circle at center, black 40%, transparent 95%);
}

.hero-bg-spline spline-viewer {
    width: 100%;
    height: 100%;
    background: transparent !important;
    background-color: transparent !important;
    filter: hue-rotate(260deg) brightness(1.1) saturate(1.3);
}

/* Tipografia Especial */
.highlight-script {
    font-family: 'Caveat', cursive;
    color: var(--primary-glow);
    font-size: 1.5em;
    font-weight: 700;
    display: inline-block;
    transform: rotate(-1.5deg);
    text-shadow: 0 0 20px rgba(0, 255, 123, 0.4);
}

.text-neon {
    color: var(--primary-glow);
    text-shadow: 0 0 15px rgba(0, 255, 123, 0.5);
}

h1, h2, h3, .tag, .hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Container Principal como Frame de Celular Premium */
#app {
    width: 100%;
    max-width: 480px;
    height: 92vh;
    max-height: 850px;
    background: rgba(5, 8, 6, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 255, 123, 0.1);
    transition: var(--transition);
}

/* Borda sutil estática do App (Apenas em Desktop) */
#app::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(0, 255, 123, 0.25), transparent 40%, rgba(0, 229, 255, 0.15), transparent 70%);
    z-index: -2;
    border-radius: 24px;
    opacity: 0.7;
}

#app::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(5, 8, 6, 0.85);
    z-index: -1;
    border-radius: 23px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

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

/* Responsividade Mobile - Preenche a tela cheia */
@media (max-width: 480px) {
    #app {
        height: 100dvh; /* Dynamic viewport height to prevent overflow and offset due to address bars! */
        max-height: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: rgba(5, 8, 6, 0.35);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    #app::before, #app::after {
        display: none;
    }
    
    .screen {
        padding: 24px 20px 30px 20px; /* Highly optimized padding for mobile screen spacing */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Force elements to center vertically! */
        align-items: center; /* Center horizontally */
    }
    
    .container {
        margin: 0; /* Remove top/bottom auto margin so flexbox justify-content takes complete control of the centering! */
        gap: 20px; /* More compact spacing */
    }
    
    .hero-title {
        font-size: 1.85rem; /* Slightly smaller h1 on mobile to prevent wrapping too many lines and pushing everything down! */
    }
    
    .subtitle {
        font-size: 0.92rem; /* Compact subtitle */
    }
    
    .quiz-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 8px; /* Compact quiz icon */
    }
    
    .quiz-icon i {
        font-size: 1.4rem;
    }
    
    .quiz-question-card {
        padding: 22px 18px 20px 18px; /* Extremely optimized card padding */
        margin-top: -12px;
    }
    
    .quiz-question-card h2 {
        font-size: 1.15rem; /* Better typography for mobile quiz cards */
    }
    
    .options-grid {
        gap: 10px; /* Tighter button layout */
    }
    
    .option-btn {
        padding: 12px 16px;
        font-size: 0.86rem;
    }
    
    .btn-igreen {
        padding: 15px 24px;
        font-size: 0.95rem;
    }
    
    .action-area {
        margin-top: 10px;
        gap: 8px;
    }
}

/* Telas e Transições */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.5s ease;
    padding: 50px 30px;
    overflow-y: auto;
    scrollbar-width: none;
}

.screen::-webkit-scrollbar {
    display: none;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.container {
    margin: auto 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
}

.text-center {
    text-align: center;
    align-items: center;
}

/* Elementos de Tipografia */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 166, 81, 0.12);
    border: 1px solid var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 255, 123, 0.25);
    color: var(--primary-glow);
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 50px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 2.1rem;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Botões de Ação Principal */
.action-area {
    margin-top: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn-igreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 28px;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow), var(--primary));
    background-size: 200% auto;
    color: #000;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: energy-pulse 2.5s infinite, energy-flow 3s linear infinite;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 255, 123, 0.3);
}

.btn-igreen:hover {
    transform: translateY(-2px);
    background-position: right center;
    color: #000;
    box-shadow: 0 0 35px rgba(0, 255, 123, 0.7);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   QUIZ - Card-Based Business Style
   ============================================= */

/* Container do Quiz - Layout */
.quiz-container {
    align-items: center;
    gap: 20px;
}

/* Barra de Progresso com Steps */
.quiz-progress-wrapper {
    width: 100%;
    padding: 0 5px;
    margin-bottom: 10px;
}

.quiz-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow), var(--accent-blue));
    background-size: 200% 100%;
    animation: shimmer-bar 2s ease-in-out infinite;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50px;
    box-shadow: 0 0 14px rgba(0, 255, 123, 0.5);
}

@keyframes shimmer-bar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Step Dots */
.step-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.step-dot.active {
    background: var(--primary-glow);
    border-color: var(--primary-glow);
    box-shadow: 0 0 12px rgba(0, 255, 123, 0.6);
    transform: scale(1.3);
}

.step-dot.completed {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 6px rgba(0, 166, 81, 0.4);
}

/* Ícone Business */
.quiz-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 255, 123, 0.3), 0 0 0 6px rgba(0, 255, 123, 0.08);
    position: relative;
    z-index: 2;
    animation: float-icon 3s ease-in-out infinite;
}

.quiz-icon i {
    font-size: 1.7rem;
    color: #000;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Card da Pergunta */
.quiz-question-card {
    width: 100%;
    background: linear-gradient(145deg, rgba(0, 166, 81, 0.2), rgba(0, 166, 81, 0.06));
    border: 1px solid rgba(0, 255, 123, 0.2);
    border-radius: 24px;
    padding: 30px 24px 28px;
    text-align: center;
    position: relative;
    margin-top: -20px;
    z-index: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.quiz-question-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(ellipse at top center, rgba(0, 255, 123, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Contador de Pergunta */
.quiz-counter {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-glow);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.9;
}

.quiz-counter .counter-highlight {
    color: #fff;
    font-weight: 900;
}

/* Texto da Pergunta dentro do Card */
.quiz-question-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 12px;
}

/* Why Text dentro do Card */
.quiz-question-card .why-text {
    font-size: 0.92em;
    line-height: 1.5;
}

/* Grid de Opções - Botões Arredondados */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.option-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 16px 22px;
    border-radius: 14px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Efeito de hover premium */
.option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 123, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.option-btn:hover {
    border-color: var(--primary-glow);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 123, 0.15), 0 0 0 1px rgba(0, 255, 123, 0.1);
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 255, 123, 0.2);
}

/* Efeito de seleção (feedback visual) */
.option-btn.selected {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.25), rgba(0, 255, 123, 0.1));
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(0, 255, 123, 0.25);
}

/* Tela de Carregamento (Processamento) */
.loading-container {
    justify-content: center;
    height: 100%;
}

.spinner-igreen {
    width: 70px; height: 70px;
    border: 3.5px solid var(--glass-border);
    border-top: 3.5px solid var(--primary-glow);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
    margin: 0 auto 25px auto;
    box-shadow: 0 0 30px rgba(0, 255, 123, 0.25);
    position: relative;
}

.spinner-igreen::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 255, 123, 0.2);
    animation: spin 6s linear infinite reverse;
}

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

/* Tela de Resultado */
#result-icon {
    margin-bottom: 8px;
}

.result-icon-badge {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.15), rgba(0, 255, 123, 0.25));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 25px rgba(0, 255, 123, 0.3);
    border: 2px solid var(--primary-glow);
    animation: glow-pulse 2s infinite ease-in-out;
}

.result-icon-badge i {
    font-size: 2.2rem;
    color: var(--primary-glow);
    filter: drop-shadow(0 0 8px rgba(0, 255, 123, 0.5));
}

/* Badge de Erro/Não Alinhado */
.result-icon-badge.error {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 107, 129, 0.25));
    border-color: #ff4757;
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.3);
}

.result-icon-badge.error i {
    color: #ff4757;
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.5));
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(0, 255, 123, 0.3);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 35px rgba(0, 255, 123, 0.5);
    }
}

/* Texto CTA curto antes do botão */
.result-cta-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto 8px;
    opacity: 0.85;
}

.hidden { display: none !important; }

/* Animações Globais e de Efeito de Entrada */
.fade-in-up {
    animation: fadeInUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes energy-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 166, 81, 0.3), 0 0 0px rgba(0, 166, 81, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 123, 0.65), 0 0 20px rgba(0, 166, 81, 0.3);
    }
}

@keyframes energy-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
