-- Tabela para reações ao vivo (multiplayer)
CREATE TABLE IF NOT EXISTS live_reactions (
    id INT PRIMARY KEY AUTO_INCREMENT,
    round_id INT,
    user_id INT,
    user_name VARCHAR(100),
    reaction_type ENUM('bravo', 'feliz', 'dinheiro', 'chorando') NOT NULL,
    position_x FLOAT,
    position_y FLOAT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    expires_at TIMESTAMP,
    INDEX idx_round_expires (round_id, expires_at),
    INDEX idx_created (created_at),
    FOREIGN KEY (round_id) REFERENCES game_rounds(id) ON DELETE CASCADE,
    FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);

-- Reações expiram após 5 segundos
-- Limpeza automática acontece via daemon
