:root {
    /* Identidade da Marca EntreCuidar baseadas nos hex codes enviados */
    --primary-color: #f3733e;
    /* Laranja suave (f3733e) usado na Missão/Pilares */
    --primary-dark: #ed2381;
    /* Pink magenta (ed2381) */
    --primary-light: #64cdf6;
    /* Azul Claro Brilhante (64cdf6) - usado para destaques/títulos */
    --accent-color: #9dcf7f;
    /* Verde suave (9dcf7f) */
    --accent-light: #a4def6;
    /* Azul bebê (a4def6) */
    --accent-purple: #986bae;
    /* Roxo suave (986bae) */

    /* Sistema Dark Theme Mantido com pequenos toques escuros da marca */
    --bg-page: #0d1217;
    --bg-container: #111822;
    --card-bg: #151d29;

    --border-color: rgba(100, 205, 246, 0.15);
    /* Bordas acompanhando o azul claro */
    --card-border-active: rgba(243, 115, 62, 0.6);
    /* Ativo com cor primária */

    --text-white: #ffffff;
    --text-light: #b4c5d6;
    --text-muted: #64748b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: linear-gradient(rgba(10, 15, 20, 0.6), rgba(5, 8, 12, 0.9)), url('bg-brain.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(15px);
    /* Desfocado a imagem da criança a pedido do usuário */
    z-index: -1;
}

.background-year {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 35vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.08);
    /* Transparent text to blend */
    z-index: 0;
    pointer-events: none;
    line-height: 1;
    letter-spacing: -2vw;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    mix-blend-mode: overlay;
    /* Soft blend into background image */
}

/* Loading Screen Overlay */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-container);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader-wrapper.hidden-loader {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    width: 250px;
    max-height: 80vh;
    object-fit: contain;
    animation: fadePulse 1.5s infinite alternate ease-in-out;
    mix-blend-mode: screen;
    /* Helps blend dark backgrounds from pngs to the page */
}

@keyframes fadePulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* Base Full-Page Container Style */
.glass-container {
    background: linear-gradient(135deg, rgba(21, 26, 35, 0.5) 0%, rgba(11, 15, 22, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    /* True Glassmorphism Effect */
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;

    width: 100%;
    max-width: 1200px;
    margin-top: 4rem;
    /* push down slightly over the text */
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Neon Divider */
.neon-divider {
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 25px 5px rgba(93, 110, 255, 0.4), 0 0 10px 1px rgba(93, 110, 255, 0.8);
    border-radius: 2px;
    margin: 3rem 0;
    opacity: 0.8;
}

/* Auth Wrapper (Login/Register) */
.auth-wrapper {
    justify-content: center;
    align-items: center;
    animation: fadeInSlide 0.5s ease forwards;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem 2rem;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.auth-header .logo {
    height: 180px;
    max-width: 100%;
    object-fit: contain;
}

.auth-box {
    display: none;
    position: relative;
    z-index: 2;
    animation: fadeInSlide 0.4s ease forwards;
}

.auth-box.active {
    display: block;
}

.auth-box h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--primary-light);
}

.auth-box p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Custom Large Inputs for Auth Box */
.auth-box input[type="email"],
.auth-box input[type="password"],
.auth-box input[type="text"] {
    padding: 1.1rem 1.1rem 1.1rem 3.5rem;
    font-size: 1rem;
    border-radius: 8px;
}

.auth-box .input-icon i {
    font-size: 1.3rem;
    left: 1.2rem;
}

.auth-box button[type="submit"] {
    padding: 1.1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    margin-top: 1rem;
    width: 100%;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem !important;
    margin-bottom: 0 !important;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-switch a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* INTRO WRAPPER (Missão e Pilares) */
.intro-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 50;
    /* Stays above everything except loader */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 5%;
    animation: fadeInSlide 0.8s ease forwards;
}

/* Staggered Animations for Intro content */
.intro-left>*,
.intro-right .desc,
.intro-right h3,
.intro-right .pillar,
.intro-right button {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(10px);
    /* Efeito Focus Pull Cinemático */
    animation: cinematicReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cinematicReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes textShimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(100, 205, 246, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(100, 205, 246, 0.8));
    }
}

.intro-left .badge {
    animation-delay: 0.2s;
}

.intro-left h2 {
    animation-delay: 0.4s;
}

.intro-left p {
    animation-delay: 0.7s;
}

.intro-right h3 {
    animation-delay: 0.3s;
}

.intro-right .desc {
    animation-delay: 0.5s;
}

.intro-right .pillar:nth-child(1) {
    animation-delay: 0.7s;
}

.intro-right .pillar:nth-child(2) {
    animation-delay: 0.8s;
}

.intro-right .pillar:nth-child(3) {
    animation-delay: 0.9s;
}

.intro-right button {
    animation-delay: 1.1s;
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    max-width: 1300px;
    width: 100%;
}

.intro-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 5rem;
}

.outro-left h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--primary-light);
    /* Azul claro */
    text-transform: uppercase;
    text-shadow: 0 5px 20px rgba(100, 205, 246, 0.4);
}

.intro-left h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 2rem;
    /* Efeito de brilho de vídeo no texto */
    background: linear-gradient(90deg, var(--primary-light) 0%, #ffffff 30%, var(--primary-light) 70%, var(--primary-light) 100%);
    background-size: 200% auto;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
    animation: cinematicReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, textShimmer 4s linear infinite !important;
}

.intro-left .badge {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(243, 115, 62, 0.15);
    /* Fundo alaranjado */
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    text-transform: uppercase;
    animation: cinematicReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, pulseGlow 3s infinite 1s !important;
}

.intro-left .divider {
    display: none;
    /* Resolvendo a falha visual das duas linhas desalinhadas */
}

.intro-left p {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.intro-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-right h3 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #ffffff 0%, var(--primary-light) 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
    animation: cinematicReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, textShimmer 3s ease-in-out infinite alternate !important;
}

.intro-right h3 span {
    /* Forçando a cor do span passar pelo gradiente text-clip: */
    background: linear-gradient(90deg, var(--primary-color) 0%, #ffcfbc 50%, var(--primary-color) 100%);
    background-size: 200% auto;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
    /* Efeito de glitch / reflexo leve só na marca */
    animation: textShimmer 3s ease-in-out infinite alternate-reverse !important;
}

.intro-right .desc {
    color: var(--text-light);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}

.pillars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pillar {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    transition: var(--transition);
}

.pillar:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.pillar .icon-box {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(100, 205, 246, 0.15);
    /* Azul claro fading */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    /* Azul claro */
    font-size: 1.3rem;
}

.pillar h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: white;
}

.pillar p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* MAIN Form Container */
.form-wrapper {
    padding: 4rem 5rem;
    animation: fadeInSlide 0.5s ease forwards;
}

/* Content layer over bg effects */
.form-wrapper>header,
.form-wrapper>form,
.form-wrapper>.step-indicator {
    position: relative;
    z-index: 2;
}

/* Header inside Form */
.form-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.header-top .logo {
    height: 55px;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.form-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.form-header p {
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Step Indicator Setup (Line with Circles) */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.step.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    filter: drop-shadow(0 0 10px rgba(24, 174, 182, 0.4));
}

.step.completed {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.step-line {
    height: 1px;
    width: 80px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 15px;
    transition: var(--transition);
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeInSlide 0.4s ease forwards;
    max-width: 1000px;
    margin: 0 auto;
}

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

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Product Cards (Radio buttons) inside the form */
.product-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    cursor: pointer;
    position: relative;
}

.product-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.card-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(24, 174, 182, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.icon-wrapper i {
    font-size: 1.7rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.card-content h4 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-white);
    font-weight: 700;
}

.card-content strong {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

.card-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.product-card:hover .card-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Active State for Cards */
.product-card input:checked+.card-content {
    background: rgba(24, 174, 182, 0.05);
    border-color: var(--primary-color);
}

.product-card input:checked+.card-content .icon-wrapper {
    background: var(--primary-color);
}

.product-card input:checked+.card-content .icon-wrapper i {
    color: white;
}

/* Form Fields Setup */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 2rem;
}

.full-width {
    grid-column: 1 / -1;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.input-group label {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 1.2rem;
    color: var(--text-muted);
    font-size: 1.3rem;
    pointer-events: none;
    transition: var(--transition);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.1rem 1.1rem 1.1rem 3.5rem;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

textarea {
    padding: 1.1rem;
    resize: vertical;
    min-height: 120px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

input:focus+i,
.input-icon input:focus~i {
    color: var(--primary-color);
}

/* Custom Select */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.1rem 3rem 1.1rem 1.1rem;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.select-wrapper select option {
    background-color: var(--bg-container);
    color: white;
}

.select-wrapper select:required:invalid {
    color: rgba(255, 255, 255, 0.4);
}

select option[value=""][disabled] {
    display: none;
}

.select-wrapper i {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.3rem;
}

/* Validation */
.input-group.error input,
.input-group.error textarea,
.input-group.error select {
    border-color: #ff4d4f;
}

.error-msg {
    display: none;
    color: #ff4d4f;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    position: absolute;
    bottom: -22px;
    left: 0;
}

.input-group.error .error-msg {
    display: block;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 1.5rem;
}

.align-right {
    justify-content: flex-end;
}

.align-center {
    justify-content: center;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.w-100 {
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Success Step */
.success-step {
    text-align: center;
    padding: 4rem 0;
}

.success-icon {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-step h3 {
    font-size: 2.5rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.success-step p {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Responsive */
@media (max-width: 992px) {
    .form-wrapper {
        padding: 3rem;
    }

    .product-cards {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .glass-container {
        min-height: calc(100vh - 2rem);
        border-radius: 12px;
    }

    .form-wrapper,
    .auth-container {
        padding: 2rem;
    }

    .product-cards,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column-reverse;
    }

    .btn-group .btn-secondary,
    .btn-group .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .intro-wrapper {
        padding: 4rem 2rem;
        position: absolute;
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        overflow-y: auto;
    }

    .intro-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-top: 2rem;
    }

    .intro-left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding-right: 0;
        padding-bottom: 2.5rem;
    }

    .intro-left h2 {
        font-size: 2.2rem;
    }

    .intro-right h3 {
        font-size: 2.2rem;
    }
}