/* ACERTE & GANHE PIX - Estilos Customizados */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Gradiente Animado de Fundo */
.bg-gradient-animated {
    background: linear-gradient(-45deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animações de Entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* Cartas do Jogo */
.card {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    cursor: pointer;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: rotateY(180deg);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.card-back.winner {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.card:hover .card-inner {
    transform: translateY(-5px);
}

.card.flipped:hover .card-inner {
    transform: rotateY(180deg) translateY(0);
}

/* Ícones das Cartas */
.card-icon {
    font-size: 4rem;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

/* Conteúdo de Texto das Cartas */
.card-text-content {
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.winner-card {
    animation: winner-glow 1.5s ease-in-out infinite;
}

@keyframes winner-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.loser-card {
    opacity: 0.95;
}

@media (max-width: 640px) {
    .card-text-content {
        padding: 0.5rem;
    }
    
    .card-text-content .text-2xl {
        font-size: 1.25rem;
    }
    
    .card-text-content .text-lg {
        font-size: 0.875rem;
    }
    
    .card-text-content .text-xl {
        font-size: 1rem;
    }
}

/* Animação de Embaralhamento - Grid CSS para transições suaves */
#card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    position: relative;
}

@media (min-width: 768px) {
    #card-grid {
        gap: 1.5rem;
    }
}

/* Transição suave ao trocar posições */
.card {
    position: relative;
    will-change: transform;
}

/* Carta Selecionada - Borda Destacada */
.card.carta-selecionada {
    z-index: 10;
}

.card.carta-selecionada .card-inner {
    animation: pulse-selected 0.5s ease-in-out infinite;
}

@keyframes pulse-selected {
    0%, 100% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1));
    }
}

/* Borda na frente da carta (quando de costas) */
.card.carta-selecionada .card-front {
    border: 4px solid #fbbf24 !important;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 60px rgba(251, 191, 36, 0.4) !important;
}

/* Borda no verso da carta (quando virada) */
.card.carta-selecionada .card-back {
    border: 4px solid #fbbf24 !important;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.8), 0 0 60px rgba(251, 191, 36, 0.4) !important;
}

/* Animação de movimento físico durante embaralhamento */
.card.animating {
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

/* Efeito de Pulso */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

.card-back.winner {
    animation: pulse-glow 1s ease-in-out infinite;
}

/* Modal */
#modal-resultado {
    z-index: 9999;
}

#modal-resultado.show #modal-content {
    transform: scale(1);
}

/* Modal Tutorial */
#modal-tutorial {
    z-index: 10000;
}

#modal-tutorial #tutorial-content {
    max-height: 90vh;
    overflow-y: auto;
}

.etapa-indicador {
    transition: all 0.3s ease;
}

.demo-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Font Poppins */
.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Responsividade */
@media (max-width: 640px) {
    .card-icon {
        font-size: 2.5rem;
    }
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Loader */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Botões com efeito hover */
button, .btn {
    transition: all 0.3s ease;
}

button:active, .btn:active {
    transform: scale(0.95);
}

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    padding: 2rem 1rem;
    overflow-y: auto;
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    background: #f3f4f6;
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}

/* Cards Admin */
.admin-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.admin-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Tabelas Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tr:hover {
    background: #f9fafb;
}

/* Animação do Valor do Prêmio */
.prize-value {
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, 
        #ffffff 0%, 
        #fffacd 20%, 
        #ffffff 40%,
        #fffacd 60%,
        #ffffff 80%,
        #fffacd 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite, prize-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

@keyframes prize-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) 
                drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
    }
}

/* Container do prêmio com brilho */
.prize-container {
    position: relative;
    overflow: hidden;
}

.prize-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: prize-shine 3s ease-in-out infinite;
}

@keyframes prize-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Animação de Emoji - Não foi dessa vez */
.emoji-animado-triste {
    display: inline-block;
    animation: shake-sad 0.8s ease-in-out infinite;
    font-size: 4rem;
}

@keyframes shake-sad {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-15deg) scale(1.1);
    }
    75% {
        transform: rotate(15deg) scale(1.1);
    }
}

/* Animação de Emoji - Vitória */
.emoji-animado-vitoria {
    display: inline-block;
    animation: bounce-celebrate 0.6s ease-in-out infinite;
    font-size: 4rem;
}

@keyframes bounce-celebrate {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

/* Animação de Emoji - Segunda Chance */
.emoji-animado-fogo {
    display: inline-block;
    animation: fire-pulse 0.5s ease-in-out infinite alternate;
    font-size: 4rem;
}

@keyframes fire-pulse {
    0% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 5px rgba(255, 165, 0, 0.5));
    }
    100% {
        transform: scale(1.15);
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 69, 0, 0.8));
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Banner Carousel - Carrossel Rotativo */
.banner-carousel {
    position: relative;
    overflow: hidden;
    user-select: none;
}

.banner-slides {
    display: flex;
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.banner-slide {
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
}

.banner-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.banner-indicators .indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 300ms ease;
    padding: 0;
}

.banner-indicators .indicator:hover {
    transform: scale(1.2);
}

.banner-indicators .indicator.active {
    background: white !important;
    transform: scale(1.3);
}

/* Animação de entrada para os banners */
.banner-slide {
    animation: banner-fade-in 500ms ease-out;
}

@keyframes banner-fade-in {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
    }
}

/* Responsividade para o banner */
@media (max-width: 640px) {
    .banner-carousel {
        height: 200px !important;
    }
    
    .banner-slide h3 {
        font-size: 1.5rem !important;
    }
    
    .banner-slide p {
        font-size: 0.875rem !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .banner-carousel {
        height: 250px !important;
    }
}

