/* Estilos do Sistema de Bingo Online */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --gold-color: #ffd700;
    --blue-gradient-start: #0a1929;
    --blue-gradient-end: #1976d2;
}

/* PWA e Mobile Styles */
body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
}

/* Permitir seleção em inputs e textareas */
input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

/* PWA Instalado */
body.pwa-installed {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Botão de Instalação PWA */
#install-pwa-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: #1976d2;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#install-pwa-btn:hover {
    background: #1565c0;
    transform: scale(1.05);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Melhorar toque em mobile */
    button, .btn, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevenir zoom em inputs */
    input, select, textarea {
        font-size: 16px !important;
    }
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 50%, #dde5ed 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(13, 71, 161, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

main {
    flex: 1;
    background: transparent;
    padding: 0;
    position: relative;
    z-index: 1;
}

main .container-fluid {
    padding: 30px 20px;
}

/* Cards de Sorteio Modernos */
.sorteio-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.1),
        0 3px 10px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.8);
    overflow: hidden;
    position: relative;
}

.sorteio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd, #1976d2);
    opacity: 0.8;
}

.sorteio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.15),
        0 8px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

.sorteio-card.ativo::before {
    background: linear-gradient(90deg, var(--success-color), #20c997);
}

.sorteio-card.em-andamento {
    border-left: 4px solid var(--warning-color);
    animation: pulseCard 2s ease-in-out infinite;
}

.sorteio-card.em-andamento::before {
    background: linear-gradient(90deg, var(--warning-color), #ffd700);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes pulseCard {
    0%, 100% { 
        box-shadow: 
            0 8px 25px rgba(0,0,0,0.1),
            0 0 0 rgba(255, 193, 7, 0);
    }
    50% { 
        box-shadow: 
            0 8px 25px rgba(0,0,0,0.1),
            0 0 20px rgba(255, 193, 7, 0.5);
    }
}

/* Cartela de Bingo */
.cartela-bingo {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    max-width: 500px;
    margin: 20px auto;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cartela-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.numero-bingo {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    font-weight: bold;
    background: white;
    transition: all 0.3s;
}

.numero-bingo.centro {
    background: var(--info-color);
    color: white;
    font-weight: bold;
}

.numero-bingo.sorteado {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
    animation: bounce 0.5s;
}

.numero-bingo.ganhou {
    background: var(--warning-color);
    color: #000;
    border-color: var(--warning-color);
    animation: pulse 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Dashboard - Cards de Estatísticas Modernos */
.stats-card {
    border: none;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.1),
        0 3px 10px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.8);
    overflow: hidden;
    position: relative;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.6;
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.15),
        0 5px 15px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

.stats-card .card-body {
    padding: 25px;
    position: relative;
    z-index: 1;
}

.stats-card .card-title {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-card .card-title i {
    font-size: 1.2rem;
}

.stats-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card.success {
    color: var(--success-color);
}

.stats-card.success::before {
    background: linear-gradient(90deg, transparent, var(--success-color), transparent);
}

.stats-card.warning {
    color: var(--warning-color);
}

.stats-card.warning::before {
    background: linear-gradient(90deg, transparent, var(--warning-color), transparent);
}

.stats-card.danger {
    color: var(--danger-color);
}

.stats-card.danger::before {
    background: linear-gradient(90deg, transparent, var(--danger-color), transparent);
}

.stats-card.info {
    color: var(--info-color);
}

.stats-card.info::before {
    background: linear-gradient(90deg, transparent, var(--info-color), transparent);
}

/* Botões */
.btn-action {
    margin: 5px;
}

/* Tabelas */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

/* Badges */
.badge-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Alertas Modernos */
.alert {
    border-radius: 15px;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px 25px;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.15) 0%, rgba(13, 202, 240, 0.25) 100%);
    border: 2px solid rgba(13, 202, 240, 0.3);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15) 0%, rgba(25, 135, 84, 0.25) 100%);
    border: 2px solid rgba(25, 135, 84, 0.3);
    color: #0f5132;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.25) 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
    color: #664d03;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.25) 100%);
    border: 2px solid rgba(220, 53, 69, 0.3);
    color: #842029;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    .cartela-bingo {
        max-width: 100%;
        padding: 10px;
    }
    
    .numero-bingo {
        font-size: 0.9rem;
    }
}

/* Animações de Sorteio */
.sorteio-animacao {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.numero-sorteado {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    animation: zoom 0.5s;
}

@keyframes zoom {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

