/* =========================================
   CONTAINER E ESTRUTURA
   ========================================= */
.oraculo-cards-wrapper {
    perspective: 1200px; /* Aumentei um pouco para suavizar o 3D */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.deck-container {
    position: relative;
    width: 300px;
    height: 520px; /* Um pouco mais alta para caber tudo */
    margin-bottom: 30px;
    z-index: 10;
    transform-style: preserve-3d;
    will-change: transform; 
}

@media (max-width: 1360px) {
    .deck-container {
        position: relative;
        width: 280px;
        height: 451px; /* Um pouco mais alta para caber tudo */
        margin-bottom: 10px;
        z-index: 10;
        transform-style: preserve-3d;
        will-change: transform; 
    }
}

@media (max-width: 768px) {
    .deck-container {
        position: relative;
        width: 280px;
        height: 451px; /* Um pouco mais alta para caber tudo */
        margin-bottom: 10px;
        z-index: 10;
        transform-style: preserve-3d;
        will-change: transform; 
    }
}

/* =========================================
   CARTAS (ESTILO BASE)
   ========================================= */
.card-stack, .main-card {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 18px; /* Arredondamento suave */
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

/* Cartas de Fundo */
.card-stack.card-1 { z-index: 1; transform: translate(0, 0) scale(0.95); }
.card-stack.card-2 { z-index: 2; transform: translate(0, -3px) scale(0.97); }
.card-stack.card-3 { z-index: 3; transform: translate(0, -6px) scale(0.99); }

/* Carta Principal */
.main-card {
    z-index: 10;
    transform: translate(0, -9px);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* =========================================
   ANIMAÇÃO DE EMBARALHAR
   ========================================= */
@keyframes deckPassTop {
    0% { transform: translate(0, -9px) scale(1); z-index: 10; }
    25% { transform: translate(150px, 10px) rotate(10deg) scale(1); }
    50% { transform: translate(0, 0) scale(0.9); z-index: 0; }
    100% { transform: translate(0, -9px) scale(1); z-index: 10; }
}

@keyframes deckPassBottom {
    0% { transform: translate(0, 0) scale(0.95); }
    25% { transform: translate(-10px, -5px) scale(0.98); }
    50% { transform: translate(0, -9px) scale(1); }
    100% { transform: translate(0, 0) scale(0.95); }
}

.is-shuffling .main-card {
    animation: deckPassTop 0.6s infinite linear;
}

.is-shuffling .card-stack {
    animation: deckPassBottom 0.6s infinite linear;
    animation-delay: 0.1s;
}

/* =========================================
   ESTADO VIRADO (FLIP)
   ========================================= */
.main-card.flipped {
    transform: rotateY(180deg);
    z-index: 20;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
}

/* Frente e Verso */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 18px;
    overflow: hidden;
    /* Fix de Nitidez: Remove anti-aliasing forçado que pode borrar em transforms */
    -webkit-font-smoothing: subpixel-antialiased;
    background-color: #000; /* Fundo padrão */
}

.card-back {
    background-color: #222;
    background-size: cover;
    background-position: center;
    border: 2px solid #D4AF37;
    transform: rotateX(0deg); 
}

.card-front {
    color: #fff;
    transform: rotateY(180deg);
    border: 1px solid #939393;
    display: flex;
    flex-direction: column; /* Flex Vertical para layout Scroll/Footer */
    justify-content: space-between;
}

/* =========================================
   1. ÁREA DE SCROLL (CONTEÚDO)
   ========================================= */
.card-scroll-area {
    flex: 1; /* Ocupa todo espaço disponível */
    overflow-y: auto; /* Scroll apenas aqui */
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Estilização da Barra de Rolagem (Webkit) */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #D4AF37 #222;
}

/* Scrollbar Customizada (Chrome/Safari) */
.card-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.card-scroll-area::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.card-scroll-area::-webkit-scrollbar-thumb {
    background-color: #D4AF37;
    border-radius: 10px;
    border: 1px solid #000;
}

.card-title {
    color: #D4AF37;
    font-size: 15px;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 1px 1px 0px rgba(0,0,0,1); /* Ajuda na nitidez */
}

.card-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #f0f0f0;
    margin-bottom: 10px;
    font-weight: 400;
    text-align: center;
}

.card-video-wrap {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-bottom: 20px;
    background: #000;
    border-radius: 8px;
    border: 1px solid #333;
    flex-shrink: 0; /* Impede que o vídeo encolha */
}
.card-video-wrap iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* =========================================
   2. RODAPÉ FIXO (BOTÃO INTERNO)
   ========================================= */
.card-footer {
    flex: 0 0 auto; /* Não encolhe nem cresce */
    padding: 15px;
    background: #111; /* Fundo escuro para destacar */
    border-top: 1px solid #333;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.card-link-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #D4AF37; /* Dourado Sólido */
    color: #000;
    font-weight: 800;
    text-decoration: none;
    border-radius: 50px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.card-link-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

/* =========================================
   CONTROLES GERAIS & BOTÃO PULSANTE
   ========================================= */
.oraculo-controls { text-align: center; margin-top: 25px; }

/* Animação de Pulso Dourado */
@keyframes goldPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    }
    50% {
        transform: scale(1.05); /* Aumenta 5% */
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.8), 0 0 10px rgba(212, 175, 55, 0.4); /* Brilho intenso */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    }
}

.btn-oraculo-shuffle {
    background: linear-gradient(45deg, #D4AF37, #F2D06B);
    border: none;
    padding: 14px 40px; /* Aumentei levemente o padding lateral */
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    color: #111;
    position: relative;
    
    /* Aplica a animação */
    animation: goldPulse 2s infinite ease-in-out;
    transition: all 0.3s ease;
}

/* Para a animação ao passar o mouse para dar firmeza ao clique */
.btn-oraculo-shuffle:hover {
    animation: none; 
    transform: scale(1.1);
    background: linear-gradient(45deg, #fff, #F2D06B);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.btn-oraculo-shuffle:disabled { 
    filter: grayscale(1); 
    opacity: 0.6; 
    cursor: not-allowed; 
    animation: none; /* Sem pulso se estiver desabilitado */
}

.message-status { margin-top: 12px; color: #D4AF37; font-size: 14px; font-style: italic; }