/* Container Principal */
.enetscores-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 20px auto;
    min-height: 400px; /* NOVO - Evita CLS */
    position: relative;
}

/* Loading */
.enetscores-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    position: absolute; /* NOVO */
    top: 0;
    left: 0;
    right: 0;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Erro */
.enetscores-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Container de jogos */
.enetscores-matches {
    width: 100%;
    animation: fadeIn 0.3s ease-in; /* NOVO - Animação suave */
}

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

/* Torneio */
.enetscores-tournament {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.enetscores-tournament:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.enetscores-tournament-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.enetscores-tournament-header .flag {
    font-size: 28px;
    line-height: 1;
}

.enetscores-tournament-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.enetscores-tournament-header .country {
    font-size: 13px;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* Eventos */
.enetscores-events {
    background: #fff;
}

.enetscores-event {
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 20px;
    transition: all 0.2s ease;
}

.enetscores-event:last-child {
    border-bottom: none;
}

.enetscores-event:hover {
    background: #f9fafb;
    transform: translateX(2px);
}

.enetscores-event.live {
    background: linear-gradient(90deg, #fef3c7 0%, #fef9e7 100%);
    border-left: 5px solid #f59e0b;
    padding-left: 15px;
}

/* Status do evento */
.enetscores-event-status {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    color: #dc2626;
    animation: pulse 2s infinite;
    font-size: 18px;
    line-height: 1;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.enetscores-event-status.finished {
    color: #059669;
}

.enetscores-event-status.scheduled {
    color: #3b82f6;
}

/* Times */
.enetscores-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.team.home {
    border-bottom: 1px solid #f3f4f6;
}

.team .name {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
    flex: 1;
    padding-right: 15px;
}

.team .score {
    font-size: 28px;
    font-weight: 800;
    color: #1e40af;
    min-width: 45px;
    text-align: right;
    font-family: 'Arial', sans-serif;
}

.enetscores-event.live .team .score {
    color: #dc2626;
    animation: scoreGlow 2s infinite;
}

@keyframes scoreGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Horário */
.time {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time::before {
    content: '🕐';
    font-size: 14px;
}

/* Responsivo */
@media (max-width: 640px) {
    .enetscores-tournament-header {
        padding: 12px 16px;
    }
    
    .enetscores-tournament-header h3 {
        font-size: 16px;
    }
    
    .enetscores-event {
        padding: 14px 16px;
    }
    
    .team .name {
        font-size: 14px;
    }
    
    .team .score {
        font-size: 24px;
    }
}

/* Estados vazios */
.enetscores-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.enetscores-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}