:root {
    --bg-dark: #000000; /* Pure Black Base */
    --card-bg: rgba(20, 20, 25, 0.4); 
    --card-border: rgba(255, 255, 255, 0.08); 
    --card-hover-bg: rgba(255, 255, 255, 0.05);
    --card-hover-border: rgba(255, 255, 255, 0.2);
    
    --text-main: #f0f0f0;
    --text-muted: #999999;
    
    --accent-main: #ffffff; 
    --accent-hover: #e0e0e0;
    --accent-secondary: #46D369; 
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000000;
    color: var(--text-main);
    font-family: 'Outfit', 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ----------------------------------------------------
   Fundo Premium: Stack de camadas (Base + Grid + Mesh + Vignette + Noise)
   ---------------------------------------------------- */
.bg-stack {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

/* Camada 1: Base com gradiente profundo — inspirado na Escola de Automação (preto + glow laranja discreto) */
.bg-base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 50% at 20% 40%, rgba(249, 78, 3, 0.14) 0%, transparent 50%),
        radial-gradient(60% 40% at 80% 60%, rgba(249, 78, 3, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(249, 78, 3, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #050505 0%, #000000 100%);
}

/* Camada 2: Grid futurista sutil (estilo dashboard/SaaS premium) */
.bg-grid {
    position: absolute;
    inset: -2px;
    background-image:
        linear-gradient(rgba(249, 78, 3, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 78, 3, 0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
    animation: gridPulse 12s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Camada 3: Shader WebGL — silk flow com simplex noise (estilo Stripe/Vercel) */
#shader-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Camada 3b: Rede neural canvas (partículas conectadas — metáfora de automações) */
#neural-net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
    mix-blend-mode: screen;
}

/* Camada 3c: Data beams — feixes de luz cruzando a tela */
.data-beams {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.beam {
    position: absolute;
    height: 1px;
    width: 220px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(249, 78, 3, 0) 10%,
        rgba(255, 138, 76, 0.95) 50%,
        rgba(249, 78, 3, 0) 90%,
        transparent 100%);
    filter: blur(0.5px);
    box-shadow: 0 0 12px rgba(249, 78, 3, 0.6);
    opacity: 0;
    transform-origin: left center;
}

.beam-1 {
    top: 18%;
    left: -15%;
    transform: rotate(18deg);
    animation: beamSlide 7s linear infinite;
    animation-delay: 0s;
}
.beam-2 {
    top: 55%;
    left: -15%;
    width: 280px;
    transform: rotate(-12deg);
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(70, 211, 105, 0.8) 50%,
        transparent 100%);
    box-shadow: 0 0 14px rgba(70, 211, 105, 0.5);
    animation: beamSlide 9s linear infinite;
    animation-delay: -3s;
}
.beam-3 {
    top: 78%;
    left: -15%;
    width: 200px;
    transform: rotate(8deg);
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 107, 53, 0.9) 50%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.55);
    animation: beamSlide 11s linear infinite;
    animation-delay: -6s;
}
.beam-4 {
    top: 35%;
    left: -15%;
    width: 320px;
    transform: rotate(-22deg);
    animation: beamSlide 13s linear infinite;
    animation-delay: -9s;
}

@keyframes beamSlide {
    0%   { transform: translateX(0) rotate(var(--r, 18deg)); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(140vw) rotate(var(--r, 18deg)); opacity: 0; }
}

.beam-1 { --r: 18deg; }
.beam-2 { --r: -12deg; }
.beam-3 { --r: 8deg; }
.beam-4 { --r: -22deg; }

/* Camada 4: Vinheta para focar o conteúdo */
.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,0.55) 100%);
}

/* Camada 5: Noise — textura premium estilo Apple/Stripe */
.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------
   Main Layout
   ---------------------------------------------------- */

a { text-decoration: none; color: inherit; }

#app-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 5% 20px;
}

/* Profile Header */
.profile-header {
    display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 40px;
    animation: fadeInDown 0.8s ease forwards;
}

.avatar-wrapper { position: relative; margin-bottom: 20px; }

.profile-avatar {
    width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15); 
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.profile-avatar:hover {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 4px 25px rgba(255,255,255,0.1);
}

/* Fallback: mostrado via onerror se a URL da foto quebrar */
.profile-avatar-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F94E03 0%, #FF6B35 60%, #FF8A4C 100%);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    user-select: none;
}

.status-dot {
    position: absolute; bottom: 5px; right: 5px; width: 16px; height: 16px;
    background-color: var(--accent-secondary); border: 2px solid #080808; border-radius: 50%;
}

.profile-name {
    font-size: 1.5rem; font-weight: 700; font-family: 'Montserrat', sans-serif;
    margin-bottom: 6px; letter-spacing: -0.5px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.profile-bio {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.5;
    margin-bottom: 25px; max-width: 90%; font-weight: 300; text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.8rem 2rem; background-color: var(--accent-main);
    color: #000; font-size: 0.95rem; font-weight: 700; border-radius: 30px; cursor: pointer;
    transition: var(--transition-smooth); 
}

.btn-primary:hover {
    background-color: var(--accent-hover); transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: scale(0.96) translateY(-1px);
}

/* Links Section */
.catalog-container { width: 100%; }
.links-section { margin-bottom: 35px; }

.section-title {
    font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: var(--text-main);
    text-align: left; opacity: 0.9; letter-spacing: 0.5px;
}

.vertical-list { display: flex; flex-direction: column; gap: 12px; }

.link-card {
    display: flex; align-items: center; background-color: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 12px; padding: 10px 12px; gap: 15px; transition: var(--transition-smooth);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); /* Efeito de vidro por cima do Aurora */
    opacity: 0; animation: slideUpFade 0.6s ease forwards;
}

.link-card:hover {
    background-color: var(--card-hover-bg); border-color: var(--card-hover-border); transform: translateY(-2px);
}

/* Card Especial de Mentoria (Fidelidade ao Print) */
.mentoria-card {
    background-color: rgba(25, 15, 10, 0.55) !important;
    border: 1px solid rgba(255, 94, 43, 0.35) !important;
    box-shadow: 0 4px 20px rgba(255, 94, 43, 0.08);
}

.mentoria-card:hover {
    border-color: rgba(255, 94, 43, 0.65) !important;
    background-color: rgba(35, 20, 14, 0.75) !important;
}

.mentoria-thumb {
    background: #FF5E2B !important; /* Laranja vivo idêntico ao print */
    border-radius: 10px !important;
    border: none !important;
}

.link-card:active {
    transform: scale(0.98) translateY(-1px);
}

.card-thumb {
    width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0; overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-badge {
    position: absolute; top: 0; right: 0; background-color: rgba(255,255,255,0.95); color: #000;
    font-size: 0.5rem; font-weight: 800; padding: 2px 4px; border-bottom-left-radius: 4px;
}

.card-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.card-header-small { margin-bottom: 2px; }
.match-score { color: var(--accent-secondary); font-weight: 600; font-size: 0.7rem; }
.card-info h3 { font-size: 1rem; font-weight: 600; color: #FFF; margin-bottom: 2px; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.2; font-weight: 300; }

.card-action-icon { font-size: 1.3rem; color: rgba(255,255,255,0.3); transition: var(--transition-smooth); }
.link-card:hover .card-action-icon { color: #FFF; transform: translateX(3px); }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }

.main-footer { padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 0.8rem; font-weight: 300; }

/* ----------------------------------------------------
   Modal do Quiz (Vidromorfismo Premium)
   ---------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: rgba(18, 18, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(249, 78, 3, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 35px 30px;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
    z-index: 10;
}

.modal-close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Barra de Progresso do Quiz */
.quiz-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.05);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F94E03 0%, #FF6B35 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(249, 78, 3, 0.5);
}

/* Container de Perguntas */
.quiz-container {
    margin-top: 10px;
}

.quiz-step {
    display: none;
    animation: quizFadeIn 0.4s ease forwards;
}

.quiz-step.active {
    display: block;
}

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

/* Títulos e Textos */
.quiz-title {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.quiz-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 300;
}

.quiz-question {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* Formulário de Identificação */
.quiz-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.input-group input {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    outline: none;
    border-color: #F94E03;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 12px rgba(249, 78, 3, 0.25);
}

.btn-full-width {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
}

/* Opções de Múltipla Escolha */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.quiz-option:hover {
    background-color: rgba(249, 78, 3, 0.08);
    border-color: rgba(249, 78, 3, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 78, 3, 0.1);
}

/* Resultado */
.quiz-result-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.quiz-result-icon.success { color: #46D369; }
.quiz-result-icon.info { color: #00b4db; }

.result-summary-box {
    background-color: rgba(70, 211, 105, 0.06);
    border: 1px solid rgba(70, 211, 105, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.result-summary-box p {
    margin: 0;
}

.btn-whatsapp-success {
    background-color: #46D369;
    color: #fff;
}

.btn-whatsapp-success:hover {
    background-color: #3cb85c;
    box-shadow: 0 4px 15px rgba(70, 211, 105, 0.3);
}

/* Leads não qualificados: Afiliados */
.result-unqualified-tip {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.affiliates-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar fina para o grid de afiliados se necessário */
.affiliates-grid::-webkit-scrollbar {
    width: 4px;
}
.affiliates-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.affiliate-card {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    gap: 15px;
    transition: var(--transition-smooth);
    text-align: left;
}

.affiliate-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.aff-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aff-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aff-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.aff-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin: 0;
}

/* ----------------------------------------------------
   Estilo Customizado para intl-tel-input (Dark Mode)
   ---------------------------------------------------- */
.iti {
    width: 100%;
}

.iti__country-list {
    background-color: #121218 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
}

.iti__country:hover {
    background-color: rgba(249, 78, 3, 0.15) !important;
}

.iti__country.iti__highlight {
    background-color: rgba(249, 78, 3, 0.25) !important;
}

.iti__selected-dial-code {
    color: #fff !important;
    margin-left: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

.iti input {
    padding-left: 52px !important;
}

.iti__search-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    margin: 6px !important;
    width: calc(100% - 12px) !important;
}

.input-error-msg {
    color: #ff4a4a;
    font-size: 0.78rem;
    margin-top: 4px;
    text-align: left;
    display: block;
    font-weight: 400;
}

.input-group input.input-error {
    border-color: #ff4a4a !important;
    box-shadow: 0 0 12px rgba(255, 74, 74, 0.2) !important;
}
