/* Aplicar padrão xadrez diagonal ao body */
body {
  --s: 32px; /* 40% de 80px = 32px */
  --c1: #260b3d; /* #4c1679 com 50% de preto */
  --c2: #581561; /* #b029c2 com 50% de preto */
  
  --_g: 
    #0000 calc(-650%/13) calc(50%/13), var(--c1) 0 calc(100%/13),
    #0000 0 calc(150%/13), var(--c1) 0 calc(200%/13),
    #0000 0 calc(250%/13), var(--c1) 0 calc(300%/13);
  --_g0: repeating-linear-gradient(45deg, var(--_g));
  --_g1: repeating-linear-gradient(-45deg, var(--_g));
  
  background:
    var(--_g0), var(--_g0) var(--s) var(--s),
    var(--_g1), var(--_g1) var(--s) var(--s) var(--c2);
  background-size: calc(2*var(--s)) calc(2*var(--s));
  background-attachment: fixed;
}

.numerologia-container {
    width: 85%;
    margin: 30px auto;
    padding: 24px;
    font-family: Arial, sans-serif;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid black;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: white;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .numerologia-container { width: 92%; padding: 20px; margin: 20px auto; }
}
@media (max-width: 480px) {
    .numerologia-container { width: 96%; padding: 16px; margin: 10px auto; }
}
@media (max-width: 360px) {
    .numerologia-container { width: 98%; padding: 12px; margin: 8px auto; }
}

.screen { 
    display: none; 
    text-align: center; 
    animation: fadeIn 0.8s ease-in;
    padding: 20px 0;
}
.screen.active { display: block; }

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

h1, h2 {
    margin: 0 0 20px 0;
    color: #fff; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 25px;
    text-align: center;
    line-height: 1.2;
}

h1 {
    font-size: 29px;
    line-height: 1.1;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    h1, h2 { font-size: 22px; margin-bottom: 20px; }
    h1 { font-size: 26px; margin-bottom: 25px; }
}

@media (max-width: 480px) {
    h1, h2 { font-size: 19px; margin-bottom: 15px; }
    h1 { font-size: 22px; margin-bottom: 20px; }
}

@media (max-width: 360px) {
    h1, h2 { font-size: 16px; margin-bottom: 12px; }
    h1 { font-size: 19px; margin-bottom: 15px; }
}

.form-group { 
    margin-bottom: 12px; 
    text-align: left;
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold; 
    color: #f0f0f0;
    font-size: 16px;
}

.label-primeiro-nome {
    text-align: center;
    margin: 28px 0 8px 0;
}

/* Padronização completa de inputs e selects para todos os navegadores */
input, select {
    width: 100%; 
    padding: 10px; 
    border: none; 
    border-radius: 180px !important;
    font-size: 16px; 
    box-sizing: border-box; 
    background: rgba(255,255,255,0.9); 
    color: #333;
    
    /* Remoção de estilos padrão do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Força altura consistente */
    height: 42px;
    line-height: 1.2;
    
    /* Estilos de borda e outline consistentes */
    outline: none;
    border: 1px solid transparent;
    
    /* Fonte consistente */
    font-family: Arial, sans-serif;
    font-weight: normal;
}

/* Ajustes específicos para desktop e tablet */
@media (min-width: 769px) {
    /* Inputs de texto alinhados com os campos de data */
    input[type="text"], 
    input[type="email"] {
        width: 456px; /* Largura total: 3 campos de 140px + 2 gaps de 12px = 456px */
        max-width: 456px;
        margin: 0 auto;
        padding: 16px;
        height: 50px;
        display: block;
    }
    
    /* Selects com mesmo tamanho dos inputs de texto */
    select {
        width: 456px;
        max-width: 456px;
        margin: 0 auto;
        padding: 16px;
        height: 50px;
        padding-right: 45px;
        display: block;
        background-position: right 16px center;
    }
    
    /* Input do ano com mesma altura dos selects */
    input[type="number"] {
        width: 140px;
        max-width: 140px;
        margin: 0 auto;
        padding: 16px;
        height: 50px;
        display: block;
    }
    
    /* Campos de data centralizados */
    .date-inputs {
        width: 456px; /* Mesma largura do input de nome */
        max-width: 456px;
        margin: 0 auto;
        gap: 12px;
        justify-content: center;
    }
    
    .date-inputs > div {
        flex: 0 0 140px; /* Largura fixa de 140px para cada campo */
        width: 140px;
    }
    
    /* Selects dos campos de data com tamanho específico */
    .date-inputs select {
        width: 140px;
        max-width: 140px;
        margin: 0;
        display: block;
        padding: 16px;
        padding-right: 45px;
        background-position: right 16px center;
    }
}

/* Seta customizada para selects */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Estados de foco e hover consistentes */
input:focus, select:focus {
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

input:hover, select:hover {
    background: rgba(255,255,255,0.95);
}

/* Placeholder consistente */
input::placeholder {
    color: #999;
    opacity: 1;
}

/* Correções específicas para WebKit (Safari/Chrome) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Correções específicas para Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

select::-ms-expand {
    display: none;
}

.date-inputs { 
    display: flex; 
    gap: 8px; 
}
.date-inputs > div { 
    flex: 1; 
}
.date-inputs label {
    text-align: center;
}

.botao-dourado-vivo {
    text-align: center;
    margin-top: 35px;
}

.botao-dourado-vivo button {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 26px;
    color: #1a0e00;
    padding: 18px 50px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 60px;
    background: linear-gradient(145deg, #f9d976, #f39c12, #f1c40f);
    background-size: 300% 300%;
    animation: shine 6s ease-in-out infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.botao-dourado-vivo button:hover {
    color: #1a0e00; /* Mantém a mesma cor do estado normal */
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

@keyframes shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (max-width: 768px) {
    .botao-dourado-vivo button { font-size: 22px; padding: 16px 40px; }
    .form-group { margin-bottom: 10px; }
    label { font-size: 15px; margin-bottom: 4px; }
    input, select { 
        padding: 9px; 
        font-size: 15px; 
        height: 38px;
        padding-right: 36px; /* Ajuste para seta em telas menores */
    }
    select {
        background-size: 14px;
        background-position: right 10px center;
    }
    .date-inputs { gap: 6px; }
}

@media (max-width: 480px) {
    .botao-dourado-vivo button { font-size: 18px; padding: 14px 30px; }
    .form-group { margin-bottom: 8px; }
    label { font-size: 14px; margin-bottom: 3px; }
    input, select { 
        padding: 8px; 
        font-size: 14px; 
        height: 34px;
        padding-right: 32px;
    }
    select {
        background-size: 12px;
        background-position: right 8px center;
    }
    .date-inputs { gap: 4px; }
}

@media (max-width: 360px) {
    .form-group { margin-bottom: 6px; }
    input, select { 
        padding: 7px; 
        font-size: 13px; 
        height: 32px;
        padding-right: 30px;
    }
    select {
        background-size: 11px;
        background-position: right 7px center;
    }
}

.loading-screen { 
    padding: 20px 0; 
}

.loading-screen h2 {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .loading-screen { padding: 15px 0; }
    .loading-screen h2 { margin-bottom: 15px; }
}

@media (max-width: 480px) {
    .loading-screen { padding: 12px 0; }
    .loading-screen h2 { margin-bottom: 12px; }
}

.loader {
    width: 60px;
    aspect-ratio: 1.154;
    display: grid;
    color: #fff;
    background:
        linear-gradient(to bottom left, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0) right/50% 100%,
        linear-gradient(to bottom right, transparent calc(50% - 1px), currentColor 0 calc(50% + 1px), transparent 0) left/50% 100%,
        linear-gradient(currentColor 0 0) bottom/100% 2px;
    background-repeat: no-repeat;
    transform-origin: 50% 66%;
    animation: spin 8s infinite linear;
    margin: 0 auto 20px auto;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.6));
}
.loader::before, .loader::after {
    content: "";
    grid-area: 1/1;
    background: inherit;
    transform-origin: inherit;
    animation: inherit;
}
.loader::after {
    animation-duration: 2s;
}

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

/* NOVO: Classe para números em CSS dourado */
.numero-dourado {
    font-family: 'Cinzel', serif;
    font-size: 280px;
    font-weight: 600;
    background: linear-gradient(to bottom, #FFF6C2, #F2C74F 40%, #A67C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
    line-height: 1;
    margin: 20px auto;
    display: inline-block;
    user-select: none;
    max-width: 90%;
    animation: pulsarNumero 3s ease-in-out infinite;
}

/* Animação de pulsação suave para os números */
@keyframes pulsarNumero {
    0% {
        transform: scale(1);
        text-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 6px 18px rgba(255, 204, 0, 0.6);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
    }
}

@media (max-width: 768px) {
    .numero-dourado { font-size: 220px; }
}

@media (max-width: 480px) {
    .numero-dourado { font-size: 180px; }
}

@media (max-width: 360px) {
    .numero-dourado { font-size: 150px; }
}

/* Container para números - substitui as imagens dos números */
.numero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    min-height: 350px;
    max-width: 90%;
}

@media (max-width: 768px) {
    .numero-container { min-height: 280px; }
}

@media (max-width: 480px) {
    .numero-container { min-height: 230px; }
}

@media (max-width: 360px) {
    .numero-container { min-height: 200px; }
}

.result-image {
    max-width: 90%;
    max-height: 550px;
    height: auto;
    border-radius: 15px;
    margin: 15px auto;
    object-fit: contain;
    background: rgba(255,255,255,0.1);
    min-height: 200px;
    display: block;
    color: #ccc;
    font-size: 14px;
    text-align: center;
    line-height: 200px;
}

.result-image.loaded {
    background: none;
    color: transparent;
    line-height: normal;
}

/* Animação de rotação para a imagem de introdução */
@keyframes rotateRight {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Classe só para rotação */
.rotating {
    animation: rotateRight 12s linear infinite;
}

/* Classe só para tamanho */
.intro-size {
    max-width: 50%;
    max-height: 350px;
}

/* Animações de fade */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeInImage {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-out {
    animation: fadeOut 1s ease-out forwards;
}

.fade-in {
    animation: fadeInImage 1s ease-in forwards;
}

.fade-in-number {
    animation: fadeInNumber 1s ease-in forwards;
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin: 10px 0;
    padding: 10px;
    background: rgba(255,107,107,0.1);
    border-radius: 8px;
    border: 1px solid rgba(255,107,107,0.3);
    display: none;
}

.subtitle-container {
    width: 100%;
    margin: 18px 0 10px 0;
    min-height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.subtitle-text {
    color: #fff;
    font-size: 22px;
    line-height: 1.4;
    margin: 0;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: left;
    flex: 1;
}

.custom-play-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 26px;
}

.custom-play-button:hover {
    transform: scale(1.05);
}

/* Remove o player customizado separado */
.custom-audio-player {
    display: none !important;
}

/* Estilos para a animação do pitch */
.container-animacao-pitch {
    position: relative;
    width: 5000px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    max-width: 90%;
}

.container-animacao-pitch .image-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container-animacao-pitch .image-layer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Animação da primeira imagem - pulsa a cada 3 segundos */
.container-animacao-pitch .image-1 {
    animation: pulse1 3s ease-in-out infinite;
}

/* Animação da segunda imagem - pulsa a cada 3 segundos com delay de 1s */
.container-animacao-pitch .image-2 {
    animation: pulse2 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* Animação da terceira imagem - pulsa a cada 3 segundos com delay de 2s */
.container-animacao-pitch .image-3 {
    animation: pulse3 3s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes pulse1 {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes pulse2 {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@keyframes pulse3 {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* Responsividade para a animação do pitch */
@media (max-width: 768px) {
    .container-animacao-pitch {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .container-animacao-pitch {
        width: 200px;
        height: 200px;
    }
}

/* Estilos para o botão rotativo do pitch */
.botao-rotativo-pitch {
    text-align: center;
    margin: 20px 0;
    opacity: 0;
    animation: aparecer 1s ease-in forwards;
}

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

.botao-rotativo-pitch button {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 24px;
    color: #1a0e00;
    padding: 16px 40px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 60px;
    background: linear-gradient(145deg, #f9d976, #f39c12, #f1c40f);
    background-size: 300% 300%;
    animation: shine 6s ease-in-out infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.botao-rotativo-pitch button:hover {
    color: #1a0e00;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .result-image { max-width: 85%; margin: 12px auto; min-height: 180px; line-height: 180px; }
    .audio-container { margin: 15px 0 0 0; }
    .subtitle-container {
        min-height: 50px;
        padding: 12px;
        margin: 15px 0 8px 0;
        gap: 15px;
    }
    .subtitle-text {
        font-size: 22px;
    }
    .custom-play-button { 
        width: 45px; 
        height: 45px; 
        font-size: 16px;
        margin-top: 22px;
    }
    .botao-rotativo-pitch button { 
        font-size: 20px; 
        padding: 14px 35px; 
    }
}

@media (max-width: 480px) {
    .result-image { max-width: 80%; margin: 10px auto; min-height: 160px; line-height: 160px; }
    .audio-container { margin: 12px 0 0 0; }
    .subtitle-container {
        min-height: 45px;
        padding: 10px;
        margin: 12px 0 6px 0;
        gap: 12px;
    }
    .subtitle-text {
        font-size: 20px;
    }
    .custom-play-button { 
        width: 40px; 
        height: 40px; 
        font-size: 14px;
        margin-top: 18px;
    }
    .botao-rotativo-pitch button { 
        font-size: 16px; 
        padding: 12px 25px; 
    }
}

audio {
    width: 100%;
    margin: 0;
    border-radius: 8px;
    display: none;
}

/* Oculta controles de tempo em todos os navegadores */
audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display,
audio::-webkit-media-controls-seek-back-button,
audio::-webkit-media-controls-seek-forward-button {
    display: none !important;
}

audio::-moz-range-progress,
audio::-moz-range-track {
    display: none !important;
}

audio::-ms-track {
    display: none !important;
}

/* Player customizado para Safari */
.custom-audio-player {
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

.custom-play-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.custom-play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.audio-container {
    margin: 20px 0 0 0;
    position: relative;
}

@media (max-width: 768px) {
    .audio-container { margin: 15px 0 0 0; }
    .custom-audio-player { height: 45px; }
    .custom-play-button { width: 35px; height: 35px; font-size: 14px; }
}

@media (max-width: 480px) {
    .audio-container { margin: 12px 0 0 0; }
    .custom-audio-player { height: 40px; }
    .custom-play-button { width: 32px; height: 32px; font-size: 12px; }
}
