/* Variáveis de Cores (Paleta Luz Negra/Neon) */
:root {
    --bg-deep-sea: #050b14;
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00de;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-deep-sea);
    color: #fff;
    overflow-x: hidden;
}

/* O Fundo com gradiente radial simulando a luz no centro */
.ocean-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1a0b2e 0%, var(--bg-deep-sea) 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* --------------------------------------
   GLASSMORPHISM (Menu)
--------------------------------------- */
.glass-nav {
    width: 90%;
    max-width: 1200px;
    margin-top: 2rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    z-index: 10;
}

.glass-nav .logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 300;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--neon-pink);
}

/* --------------------------------------
   TIPOGRAFIA NEON (Hero)
--------------------------------------- */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.neon-subtitle {
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
}

.neon-title {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    color: #fff;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink),
        0 0 80px var(--neon-pink);
    margin-bottom: 1.5rem;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Botão Neon com efeito Hover */
.btn-neon {
    padding: 15px 40px;
    font-size: 1.2rem;
    color: var(--neon-cyan);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid var(--neon-cyan);
    border-radius: 30px;
    box-shadow: 0 0 15px var(--neon-cyan) inset, 0 0 15px var(--neon-cyan);
    transition: 0.3s ease-in-out;
}

.btn-neon:hover {
    background: var(--neon-cyan);
    color: var(--bg-deep-sea);
    box-shadow: 0 0 40px var(--neon-cyan) inset, 0 0 40px var(--neon-cyan);
}

/* --------------------------------------
   ANIMAÇÃO DE BOLHAS (Background)
--------------------------------------- */
.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bubbles span {
    position: absolute;
    bottom: -50px;
    width: 30px;
    height: 30px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    animation: floatUp 15s linear infinite;
    animation-duration: calc(125s / var(--i));
}

/* Posicionando as bolhas aleatoriamente na tela */
.bubbles span:nth-child(1) { left: 10%; width: 40px; height: 40px; }
.bubbles span:nth-child(2) { left: 20%; width: 20px; height: 20px; }
.bubbles span:nth-child(3) { left: 35%; width: 50px; height: 50px; }
.bubbles span:nth-child(4) { left: 50%; width: 30px; height: 30px; }
.bubbles span:nth-child(5) { left: 65%; width: 45px; height: 45px; }
.bubbles span:nth-child(6) { left: 75%; width: 25px; height: 25px; }
.bubbles span:nth-child(7) { left: 85%; width: 35px; height: 35px; }
.bubbles span:nth-child(8) { left: 95%; width: 20px; height: 20px; }

@keyframes floatUp {
    0% {
        transform: translateY(0vh) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) scale(1.5);
        opacity: 0;
    }
}

/* --------------------------------------
   SEÇÃO DO MURAL SOCIAL
--------------------------------------- */
.social-wall-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    background-color: var(--bg-deep-sea);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem;
    overflow: hidden;
}

/* Tipografia das Seções (Reutilizável) */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    z-index: 2;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: #fff;
    /* Brilho Ciano para contrastar com o rosa da Hero */
    text-shadow: 
        0 0 5px #fff,
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan);
    margin-bottom: 1rem;
}

.section-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* O Contêiner de Vidro para o Mural */
.glass-card {
    width: 100%;
    max-width: 1100px;
    height: 700px; /* Altura fixa ou calc() para acomodar o grid de fotos */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px;
    /* Brilho interno e externo para destacar o mural */
    box-shadow: 
        0 0 20px rgba(0, 243, 255, 0.1),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
    z-index: 2;
}

.iframe-container iframe {
    border-radius: 10px; /* Arredonda os cantos internos do iframe */
    /* Algumas ferramentas permitem injetar CSS via dashboard deles. 
       Se possível, configure o fundo do iframe deles como transparente! */
}

/* --------------------------------------
   DECORAÇÕES NEON (Opcional - Layout)
--------------------------------------- */
.neon-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--neon-pink) 0%, transparent 60%);
    opacity: 0.15;
    filter: blur(50px);
    z-index: 1;
    pointer-events: none; /* Não interfere no clique das fotos */
}

.left-decor {
    top: 20%;
    left: -100px;
}

.right-decor {
    bottom: 10%;
    right: -100px;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 60%);
}

/* --------------------------------------
   GALERIA MASONRY
--------------------------------------- */
.gallery-container {
    /* Ajustando o glass-card para abraçar o conteúdo */
    height: auto; 
    min-height: 500px;
    padding: 20px;
}

.masonry-grid {
    /* O column-count divide o espaço em colunas. 
       No desktop teremos 3, no mobile ajustamos via media query */
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.masonry-item {
    /* Evita que uma foto seja cortada no meio e jogue o final para a próxima coluna */
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* Efeito de brilho neon sutil nas bordas das fotos */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block; /* Remove o espaço fantasma abaixo da imagem */
    filter: brightness(0.9); /* Escurece um pouco a foto para combinar com a festa */
    transition: filter 0.3s ease;
}

/* Interação Neon ao passar o mouse na foto */
.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.4);
    border-color: var(--neon-cyan);
    z-index: 2;
}

.masonry-item:hover img {
    filter: brightness(1.1); /* Acende a foto */
}

/* Responsividade para Celulares */
@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* --------------------------------------
   VITRINE DE PRESENTES (BOLHAS FLUTUANTES)
--------------------------------------- */
.gifts-grid {
    display: flex !important; /* Força o uso do flex em vez do grid antigo */
    flex-wrap: wrap; /* Permite que as bolhas quebrem a linha no celular */
    justify-content: center; /* Centraliza as bolhas horizontalmente */
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto; /* Centraliza o contêiner inteiro no meio da seção */
}

/* --------------------------------------
   BOLHAS DE VIDRO COM IMAGEM EMBAÇADA
--------------------------------------- */
.gift-bubble {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    cursor: pointer;
    /* Oculta o que vazar do círculo */
    overflow: hidden; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* A animação original de boiar */
    animation: bobbing 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Descompassando o tempo de flutuação */
.gift-bubble:nth-child(2) { animation-delay: -1.2s; }
.gift-bubble:nth-child(3) { animation-delay: -2.7s; }

/* 1. A CAMADA DA IMAGEM */
.gift-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a imagem preencher o círculo sem distorcer */
    z-index: 1;
    transition: transform 0.5s ease; /* Para o zoom no hover */
}

/* 2. A CAMADA DO VIDRO (A MÁGICA ACONTECE AQUI) */
.bubble-glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    
    /* Embaça a imagem que está na camada de trás */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    
    /* Dá o reflexo 3D curvo de uma esfera de vidro */
    background: radial-gradient(150% 150% at 30% 20%, rgba(255, 255, 255, 0.25), rgba(5, 11, 20, 0.5));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow: 
        inset 15px 15px 25px rgba(255, 255, 255, 0.2),
        inset -15px -15px 25px rgba(0, 243, 255, 0.3);
        
    transition: all 0.3s ease;
}

/* 3. A CAMADA DO TEXTO */
.gift-content {
    position: relative;
    z-index: 3; /* Fica acima do vidro embaçado, 100% legível */
    text-align: center;
    padding: 15px;
    width: 100%;
}

.gift-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.3rem;
    line-height: 1.1;
    /* Uma leve sombra para destacar do fundo acidentado da foto */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.gift-price {
    font-size: 1.1rem;
    color: var(--neon-cyan);
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --------------------------------------
   EFEITO HOVER (Interação com o mouse)
--------------------------------------- */
.gift-bubble:hover {
    animation-play-state: paused; /* Para de boiar para clicar */
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(255, 0, 222, 0.4);
}

.gift-bubble:hover .bubble-glass-overlay {
    /* Troca o neon para rosa choque e "limpa" um pouco o vidro */
    border-color: var(--neon-pink);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 
        inset 15px 15px 25px rgba(255, 255, 255, 0.3),
        inset -15px -15px 25px rgba(255, 0, 222, 0.4);
}

.gift-bubble:hover .gift-bg-img {
    /* A imagem dá um leve zoom para frente */
    transform: scale(1.15);
}

/* --------------------------------------
   A FÍSICA DO FLUTUAR (KEYFRAMES)
--------------------------------------- */
@keyframes bobbing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* --------------------------------------
   MODAL DO PIX
--------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 11, 20, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Diferenciando a borda do modal para ciano */
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    border-color: var(--neon-cyan);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--neon-pink);
}

.modal-text-highlight {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Formulários Glassmorphism */
.pix-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.glass-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.qr-code-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    margin-top: 10px;
}


/* Bolhas geradas via JavaScript no Scroll */
.burst-bubble {
    position: absolute;
    bottom: -50px; /* Começa escondida abaixo da seção */
    border-radius: 50%;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    pointer-events: none; /* Impede que a bolha bloqueie o clique nos botões */
    z-index: 5;
}

/* --------------------------------------
   FAUNA MARINHA (PARALLAX)
--------------------------------------- */
.sea-creature {
    position: absolute;
    pointer-events: none; /* O mouse ignora eles */
    will-change: transform; /* Otimiza a renderização na placa de vídeo */
}

/* Fundo (Background) - Profundo na água */
.bg-creature {
    width: 150px;
    z-index: 0;
    filter: blur(8px) brightness(0.6);
    top: 15%;
    left: 10%;
}
/* Fundo Secundário (Background 2) - Mais profundo na página */
.bg-creature-2 {
    width: 200px;
    z-index: 0;
    /* Mantém o blur alto para a ilusão de profundidade */
    filter: blur(7px) brightness(0.5); 
    top: 65%; /* Posiciona mais para baixo na altura total do documento */
    right: 45%; /* Coloquei na direita para balancear com o outro cardume na esquerda */
}
/* Fundo Secundário (Background 2) - Mais profundo na página */
.bg-creature-3 {
    width: 200px;
    z-index: 0;
    /* Mantém o blur alto para a ilusão de profundidade */
    filter: blur(6px) brightness(0.5); 
    top: 95%; /* Posiciona mais para baixo na altura total do documento */
    right: 35%; /* Coloquei na direita para balancear com o outro cardume na esquerda */
}
/* Meio (Midground) */
.mg-creature {
    width: 300px;
    z-index: 2;
    filter: blur(4px) brightness(0.8);
    top: 45%;
    right: 5%;
}

/* Frente (Foreground) - Perto da "câmera" */
.fg-creature {
    width: 450px;
    z-index: 20; /* Passa por cima de quase tudo, menos do Modal Pix */
    filter: blur(2px) drop-shadow(0 0 20px rgba(0, 243, 255, 0.4));
    bottom: -10%;
    left: -5%;
}

.spline-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* Atrás dos textos (z-index: 10) e do menu */
    pointer-events: auto; /* Permite que o 3D capture o movimento do mouse */
}

/* --------------------------------------
   SEÇÃO DE MENSAGENS
--------------------------------------- */
.messages-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    background: transparent; /* Deixa transparente */
    background-color: var(--bg-deep-sea);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem;
    overflow: hidden; /* APAGUE ESTA LINHA PARA AS BOLHAS SUBIREM LIVRES */
}

.form-mensagens {
    width: 100%;
    max-width: 500px;
    height: auto !important; /* Corta qualquer altura fixa vinda do glass-card */
    min-height: unset !important;
    padding: 2rem; /* Adiciona um espaço interno (respiro) nas bordas do vidro */
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.floating-messages-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Deixa o clique passar para o formulário atrás */
    z-index: 5;
}

/* O Design da Bolha de Texto */
.msg-bubble {
    position: absolute;
    bottom: -200px; /* Nasce escondida lá embaixo */
    width: 200px;
    aspect-ratio: 1 / 1; /* Força o círculo perfeito */
    padding: 20px;
    border-radius: 50%;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    pointer-events: auto; /* Permite hover e clique na bolha */
    cursor: pointer;
    
    /* Vidro Fosco */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), rgba(0, 243, 255, 0.05));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset 10px 10px 20px rgba(255, 255, 255, 0.1), 
        0 0 15px rgba(0, 243, 255, 0.2);
}

.msg-bubble .msg-author {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--neon-pink);
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.msg-bubble .msg-text {
    font-size: 0.85rem;
    color: #fff;
    line-height: 1.3;
    /* Limita o texto para não vazar da bolha */
    display: -webkit-box;
    -webkit-line-clamp: 4; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------
   SEÇÃO DE RSVP
--------------------------------------- */
.rsvp-section {
    position: relative;
    width: 100vw;
    min-height: 80vh;
    background: transparent; /* Tira o fundo escuro sólido */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem;
    z-index: 10;
}

/* --------------------------------------
   FORMULÁRIO RSVP COM EFEITO DE ÁGUA
--------------------------------------- */
.form-rsvp {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto !important; 
    min-height: unset !important;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    
    /* Configuração do Vidro Fosco */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    
    /* 1. Animação Fluida (Muda a forma levemente como água) */
    animation: liquidForm 6s ease-in-out infinite;
    overflow: hidden; /* Mantém a luz animada dentro do formulário */
}

/* --------------------------------------
   EFEITO SUBAQUÁTICO (RSVP & MENSAGENS)
--------------------------------------- */

/* Adiciona a animação da borda (líquida) e garante o overflow escondido em ambos */
.form-rsvp, 
.form-mensagens {
    animation: liquidForm 6s ease-in-out infinite;
    overflow: hidden; 
}

/* O Feixe de Luz Gigante */
.form-rsvp::before, 
.form-mensagens::before {
    content: '';
    position: absolute;
    /* Centraliza um elemento 4x maior que o próprio formulário */
    top: -150%; 
    left: -150%;
    width: 400%;
    height: 400%;
    
    background: linear-gradient(
        to bottom right,
        transparent 0%,
        transparent 45%,
        rgba(0, 243, 255, 0.2) 50%, /* Luz ciano suave */
        transparent 55%,
        transparent 100%
    );
    
    pointer-events: none;
    z-index: 0;
    
    /* Dispara a animação e trava a rotação diretamente aqui */
    animation: waterLight 7s linear infinite;
}

/* Garante que os inputs não sejam engolidos pela luz */
.form-rsvp > div, 
.form-rsvp > button,
.form-mensagens > input,
.form-mensagens > textarea,
.form-mensagens > button {
    position: relative;
    z-index: 1;
}

/* --------------------------------------
   KEYFRAMES (AS ANIMAÇÕES DA ÁGUA)
--------------------------------------- */

/* Faz as bordas do formulário ondularem sutilmente */
@keyframes liquidForm {
    0%   { border-radius: 20px; }
    50%  { border-radius: 35px 20px 40px 15px; } /* Distorce os cantos */
    100% { border-radius: 20px; }
}

/* --------------------------------------
   O LOOP PERFEITO DA LUZ
--------------------------------------- */
@keyframes waterLight {
    /* O elemento é tão grande que mover 50% garante que as bordas nunca apareçam */
    0% { 
        transform: translate(-50%, -50%) rotate(35deg); 
    }
    100% { 
        transform: translate(50%, 50%) rotate(35deg); 
    }
}

/* Divisão de colunas para os inputs ficarem lado a lado */
.form-group-full {
    width: 100%;
}

.form-group-half {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* Ajustes no select para combinar com o tema escuro */
select.glass-input {
    appearance: none;
    background-color: rgba(5, 11, 20, 0.8); /* Fundo um pouco mais sólido para ler as options */
    cursor: pointer;
}

select.glass-input option {
    background-color: var(--bg-deep-sea);
    color: #fff;
    padding: 10px;
}

/* Responsividade: No celular, os campos lado a lado caem para linha única */
@media (max-width: 600px) {
    .form-group-half {
        flex-direction: column;
        gap: 15px;
    }
}

/* --------------------------------------
   FORMULÁRIO RSVP EM ETAPAS
--------------------------------------- */
.code-input {
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 8px;
    font-size: 1.5rem;
    font-weight: bold;
}

.error-msg {
    color: var(--neon-pink);
    font-size: 0.85rem;
    text-align: center;
    display: none; /* Escondido por padrão */
    margin-top: 10px;
}

/* --------------------------------------
   O CONVITE DOURADO (3D ANIMATION)
--------------------------------------- */
.golden-envelope-wrapper {
    perspective: 1200px;
    width: 90%;
    max-width: 450px;
    height: 300px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.golden-envelope {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #b8860b, #daa520);
    border-radius: 5px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(218, 165, 32, 0.4);
}

/* Atualize a Frente e a Aba do envelope adicionando o pointer-events */
.envelope-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #cf9b15, #e8b923, #cf9b15);
    clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
    z-index: 3;
    border-radius: 5px;
    pointer-events: none; /* NOVO: Permite clicar através do envelope */
}

/* A Aba do envelope (Estado Padrão: FECHANDO) */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, #f3ca3e, #d49c12);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    pointer-events: none;
    
    /* Fica na frente (4) quando está fechado */
    z-index: 4; 
    
    /* Quando FECHA: Espera o cartão descer (0.8s) para girar.
       O z-index espera 1.1s (0.8 do cartão + 0.3s de metade do giro) para pular pra frente de novo */
    transition: transform 0.6s ease-in-out 0.8s, z-index 0s 1.1s;
}

/* O Cartão Dourado Interno */
.envelope-card {
    position: absolute;
    bottom: 10px;
    left: 5%;
    width: 90%;
    height: 270px; /* Reduzido para caber nos 300px do envelope */
    background: linear-gradient(135deg, #fffde7, #fdf5e6);
    border: 2px solid #daa520;
    border-radius: 10px;
    padding: 20px 15px; /* Padding ajustado */
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 2;
    
    /* Mantém a transição do fechamento instantâneo */
    transform: translateY(0);
    transition: transform 0.8s ease-in-out;
    transition-delay: 0s; 
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #b8860b;
    margin-bottom: 20px;
}

.card-subtitle {
    font-size: 1rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-details p {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 15px;
}

.btn-dark {
    background: #333;
    color: #daa520;
    border-color: #daa520;
    box-shadow: none;
}

/* --------------------------------------
   CLASSES DE ANIMAÇÃO (Estado: ABRINDO)
--------------------------------------- */
.golden-envelope-wrapper.is-open .envelope-flap {
    transform: rotateX(180deg);
    
    /* Vai para trás do cartão (2) e da frente (3) quando está aberto */
    z-index: 1; 
    
    /* Quando ABRE: Gira na hora (delay 0s). 
       O z-index pula para trás exatamente no meio do giro (0.3s) */
    transition: transform 0.6s ease-in-out 0s, z-index 0s 0.3s;
}

.golden-envelope-wrapper.is-open .envelope-card {
    /* Mantive os 230px, pois com a nova altura de 270px, o cartão ficará preso 40px dentro do envelope */
    transform: translateY(-230px);
    transition-delay: 0.6s; 
}

#rsvpStep1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Opcional: Para garantir que o botão não estique demais se não quiser */
#rsvpStep1 .btn-full {
    width: 100%;
    max-width: 300px; /* Deixa o botão num tamanho elegante no meio */
    margin-top: 20px;
}

/* --------------------------------------
   MEMÓRIAS FLUTUANTES (VÍDEOS)
--------------------------------------- */
.memories-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none; /* Garante que os vídeos não bloqueiem o clique no menu */
}

.memory-vid {
    position: absolute;
    object-fit: cover;
    opacity: 0.25; 
    mix-blend-mode: screen; /* Mistura perfeitamente com o fundo escuro */
    filter: url(#underwater-ripple) blur(1px); /* A distorção da água */
    
    /* O delicado fundo/borda azulzinho */
    border-radius: 30px; 
    border: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.3), inset 0 0 20px rgba(0, 243, 255, 0.2);
}

/* Espalhando os vídeos organicamente pela Hero */
.vid-1 { 
    width: 250px; 
    height: 350px; 
    top: 15%; 
    left: 8%; 
    transform: rotate(-5deg);
}

.vid-2 { 
    width: 200px; 
    height: 200px; 
    top: 60%; 
    right: 10%; 
    border-radius: 50%; /* Este fica redondo como uma bolha! */
}

.vid-3 { 
    width: 300px; 
    height: 200px; 
    bottom: 15%; 
    left: 30%; 
    transform: rotate(3deg);
}